/* Generated by Cython 3.2.4 */

#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 <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

/* 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 */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* 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__pyverbs__device
#define __PYX_HAVE_API__pyverbs__device
/* Early includes */
#include <stdint.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/time.h>
#include <infiniband/verbs.h>
#include <infiniband/verbs_api.h>
#include <infiniband/driver.h>
#include <infiniband/tm_types.h>
#include "infiniband/verbs.h"
#include "infiniband/driver.h"
#include <rdma/rdma_cma.h>
#include <infiniband/ib.h>
#include <rdma/rdma_verbs.h>
#include <string.h>
#include <stdlib.h>
#include "endian.h"
#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[] = {
  "pyverbs/device.pyx",
  "EnumTypeToPy",
  "pyverbs/cq.pxd",
  "pyverbs/pd.pxd",
  "pyverbs/wq.pxd",
  "pyverbs/cmid.pxd",
  "pyverbs/xrcd.pxd",
  "pyverbs/addr.pxd",
  "pyverbs/qp.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

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

/* 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_7pyverbs_4base_PyverbsObject;
struct __pyx_obj_7pyverbs_4base_PyverbsCM;
struct __pyx_obj_7pyverbs_2cq_CompChannel;
struct __pyx_obj_7pyverbs_2cq_CQ;
struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx;
struct __pyx_obj_7pyverbs_2cq_CQEX;
struct __pyx_obj_7pyverbs_2cq_WC;
struct __pyx_obj_7pyverbs_2cq_PollCqAttr;
struct __pyx_obj_7pyverbs_2cq_WcTmInfo;
struct __pyx_obj_7pyverbs_2pd_PD;
struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr;
struct __pyx_obj_7pyverbs_2pd_ParentDomain;
struct __pyx_obj_7pyverbs_2pd_ParentDomainContext;
struct __pyx_obj_7pyverbs_2wq_WQInitAttr;
struct __pyx_obj_7pyverbs_2wq_WQAttr;
struct __pyx_obj_7pyverbs_2wq_WQ;
struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr;
struct __pyx_obj_7pyverbs_2wq_RwqIndTable;
struct __pyx_obj_7pyverbs_2wq_RxHashConf;
struct __pyx_obj_7pyverbs_4cmid_CMID;
struct __pyx_obj_7pyverbs_4cmid_CMEventChannel;
struct __pyx_obj_7pyverbs_4cmid_CMEvent;
struct __pyx_obj_7pyverbs_4cmid_AddrInfo;
struct __pyx_obj_7pyverbs_4cmid_ConnParam;
struct __pyx_obj_7pyverbs_4cmid_UDParam;
struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx;
struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr;
struct __pyx_obj_7pyverbs_4xrcd_XRCD;
struct __pyx_obj_7pyverbs_4addr_GID;
struct __pyx_obj_7pyverbs_4addr_GRH;
struct __pyx_obj_7pyverbs_4addr_GlobalRoute;
struct __pyx_obj_7pyverbs_4addr_AHAttr;
struct __pyx_obj_7pyverbs_4addr_AH;
struct __pyx_obj_7pyverbs_2qp_QPCap;
struct __pyx_obj_7pyverbs_2qp_QPInitAttr;
struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx;
struct __pyx_obj_7pyverbs_2qp_QPAttr;
struct __pyx_obj_7pyverbs_2qp_QP;
struct __pyx_obj_7pyverbs_2qp_DataBuffer;
struct __pyx_obj_7pyverbs_2qp_QPEx;
struct __pyx_obj_7pyverbs_2qp_ECE;
struct __pyx_obj_7pyverbs_6device_Context;
struct __pyx_obj_7pyverbs_6device_DeviceAttr;
struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput;
struct __pyx_obj_7pyverbs_6device_ODPCaps;
struct __pyx_obj_7pyverbs_6device_RSSCaps;
struct __pyx_obj_7pyverbs_6device_PacketPacingCaps;
struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps;
struct __pyx_obj_7pyverbs_6device_TMCaps;
struct __pyx_obj_7pyverbs_6device_CQModerationCaps;
struct __pyx_obj_7pyverbs_6device_TSOCaps;
struct __pyx_obj_7pyverbs_6device_DeviceAttrEx;
struct __pyx_obj_7pyverbs_6device_AllocDmAttr;
struct __pyx_obj_7pyverbs_6device_DM;
struct __pyx_obj_7pyverbs_6device_PortAttr;
struct __pyx_obj_7pyverbs_6device_GIDEntry;
struct __pyx_obj_7pyverbs_6device_AsyncEvent;
struct __pyx_obj_7pyverbs_6device_FdArr;

/* "base.pxd":6
 * #cython: language_level=3
 * 
 * cdef class PyverbsObject(object):             # <<<<<<<<<<<<<<
 *     cdef object __weakref__
 *     cdef object logger
*/
struct __pyx_obj_7pyverbs_4base_PyverbsObject {
  PyObject_HEAD
  PyObject *__weakref__;
  PyObject *logger;
};


/* "base.pxd":10
 *     cdef object logger
 * 
 * cdef class PyverbsCM(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cpdef close(self)
 * 
*/
struct __pyx_obj_7pyverbs_4base_PyverbsCM {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM *__pyx_vtab;
};


/* "pyverbs/cq.pxd":9
 * cimport pyverbs.libibverbs as v
 * 
 * cdef class CompChannel(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_comp_channel *cc
 *     cpdef close(self)
*/
struct __pyx_obj_7pyverbs_2cq_CompChannel {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_comp_channel *cc;
  PyObject *context;
  PyObject *cqs;
};


/* "pyverbs/cq.pxd":16
 *     cdef object cqs
 * 
 * cdef class CQ(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_cq *cq
 *     cpdef close(self)
*/
struct __pyx_obj_7pyverbs_2cq_CQ {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_cq *cq;
  PyObject *context;
  PyObject *qps;
  PyObject *srqs;
  PyObject *channel;
  PyObject *num_events;
  PyObject *wqs;
};


/* "pyverbs/cq.pxd":27
 *     cdef object wqs
 * 
 * cdef class CqInitAttrEx(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_cq_init_attr_ex attr
 *     cdef object channel
*/
struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_cq_init_attr_ex attr;
  PyObject *channel;
  PyObject *parent_domain;
};


/* "pyverbs/cq.pxd":32
 *     cdef object parent_domain
 * 
 * cdef class CQEX(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_cq_ex *cq
 *     cdef v.ibv_cq *ibv_cq
*/
struct __pyx_obj_7pyverbs_2cq_CQEX {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_cq_ex *cq;
  struct ibv_cq *ibv_cq;
  PyObject *context;
  PyObject *qps;
  PyObject *srqs;
  PyObject *wqs;
};


/* "pyverbs/cq.pxd":42
 *     cdef object wqs
 * 
 * cdef class WC(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_wc wc
 * 
*/
struct __pyx_obj_7pyverbs_2cq_WC {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_wc wc;
};


/* "pyverbs/cq.pxd":45
 *     cdef v.ibv_wc wc
 * 
 * cdef class PollCqAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_poll_cq_attr attr
 * 
*/
struct __pyx_obj_7pyverbs_2cq_PollCqAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_poll_cq_attr attr;
};


/* "pyverbs/cq.pxd":48
 *     cdef v.ibv_poll_cq_attr attr
 * 
 * cdef class WcTmInfo(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_wc_tm_info info
*/
struct __pyx_obj_7pyverbs_2cq_WcTmInfo {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_wc_tm_info info;
};


/* "pyverbs/pd.pxd":12
 * 
 * 
 * cdef class PD(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_pd *pd
 *     cdef Context ctx
*/
struct __pyx_obj_7pyverbs_2pd_PD {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_pd *pd;
  struct __pyx_obj_7pyverbs_6device_Context *ctx;
  PyObject *srqs;
  PyObject *mrs;
  PyObject *mws;
  PyObject *ahs;
  PyObject *qps;
  PyObject *parent_domains;
  PyObject *wqs;
  PyObject *mkeys;
  PyObject *deks;
  PyObject *_is_imported;
};


/* "pyverbs/pd.pxd":28
 *     cdef object _is_imported
 * 
 * cdef class ParentDomainInitAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_parent_domain_init_attr init_attr
 *     cdef object pd
*/
struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_parent_domain_init_attr init_attr;
  PyObject *pd;
  PyObject *alloc;
  PyObject *dealloc;
};


/* "pyverbs/pd.pxd":34
 *     cdef object dealloc
 * 
 * cdef class ParentDomain(PD):             # <<<<<<<<<<<<<<
 *     cdef add_ref(self, obj)
 *     cdef object protection_domain
*/
struct __pyx_obj_7pyverbs_2pd_ParentDomain {
  struct __pyx_obj_7pyverbs_2pd_PD __pyx_base;
  PyObject *protection_domain;
  PyObject *cqs;
};


/* "pyverbs/pd.pxd":39
 *     cdef object cqs
 * 
 * cdef class ParentDomainContext(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef object p_alloc
 *     cdef object p_free
*/
struct __pyx_obj_7pyverbs_2pd_ParentDomainContext {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  PyObject *p_alloc;
  PyObject *p_free;
  PyObject *pd;
  PyObject *user_data;
};


/* "pyverbs/wq.pxd":13
 * 
 * 
 * cdef class WQInitAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_wq_init_attr attr
 *     cdef PD pd
*/
struct __pyx_obj_7pyverbs_2wq_WQInitAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_wq_init_attr attr;
  struct __pyx_obj_7pyverbs_2pd_PD *pd;
  PyObject *cq;
};


/* "pyverbs/wq.pxd":18
 *     cdef object cq
 * 
 * cdef class WQAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_wq_attr attr
 * 
*/
struct __pyx_obj_7pyverbs_2wq_WQAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_wq_attr attr;
};


/* "pyverbs/wq.pxd":21
 *     cdef v.ibv_wq_attr attr
 * 
 * cdef class WQ(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_wq *wq
 *     cdef Context context
*/
struct __pyx_obj_7pyverbs_2wq_WQ {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_wq *wq;
  struct __pyx_obj_7pyverbs_6device_Context *context;
  struct __pyx_obj_7pyverbs_2pd_PD *pd;
  PyObject *cq;
  PyObject *rwq_ind_tables;
};


/* "pyverbs/wq.pxd":29
 *     cpdef add_ref(self, obj)
 * 
 * cdef class RwqIndTableInitAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_rwq_ind_table_init_attr attr
 *     cdef object wqs_list
*/
struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_rwq_ind_table_init_attr attr;
  PyObject *wqs_list;
};


/* "pyverbs/wq.pxd":33
 *     cdef object wqs_list
 * 
 * cdef class RwqIndTable(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_rwq_ind_table *rwq_ind_table
 *     cdef Context context
*/
struct __pyx_obj_7pyverbs_2wq_RwqIndTable {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_rwq_ind_table *rwq_ind_table;
  struct __pyx_obj_7pyverbs_6device_Context *context;
  PyObject *wqs;
  PyObject *qps;
};


/* "pyverbs/wq.pxd":40
 *     cpdef add_ref(self, obj)
 * 
 * cdef class RxHashConf(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_rx_hash_conf rx_hash_conf
*/
struct __pyx_obj_7pyverbs_2wq_RxHashConf {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_rx_hash_conf rx_hash_conf;
};


/* "pyverbs/cmid.pxd":10
 * 
 * 
 * cdef class CMID(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_cm_id *id
 *     cdef object event_channel
*/
struct __pyx_obj_7pyverbs_4cmid_CMID {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct rdma_cm_id *id;
  PyObject *event_channel;
  PyObject *ctx;
  PyObject *pd;
  PyObject *mrs;
};


/* "pyverbs/cmid.pxd":20
 * 
 * 
 * cdef class CMEventChannel(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_event_channel *event_channel
 *     cpdef close(self)
*/
struct __pyx_obj_7pyverbs_4cmid_CMEventChannel {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct __pyx_vtabstruct_7pyverbs_4cmid_CMEventChannel *__pyx_vtab;
  struct rdma_event_channel *event_channel;
};


/* "pyverbs/cmid.pxd":25
 * 
 * 
 * cdef class CMEvent(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_cm_event *event
 *     cpdef close(self)
*/
struct __pyx_obj_7pyverbs_4cmid_CMEvent {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct __pyx_vtabstruct_7pyverbs_4cmid_CMEvent *__pyx_vtab;
  struct rdma_cm_event *event;
};


/* "pyverbs/cmid.pxd":30
 * 
 * 
 * cdef class AddrInfo(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_addrinfo *addr_info
 *     cpdef close(self)
*/
struct __pyx_obj_7pyverbs_4cmid_AddrInfo {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct __pyx_vtabstruct_7pyverbs_4cmid_AddrInfo *__pyx_vtab;
  struct rdma_addrinfo *addr_info;
};


/* "pyverbs/cmid.pxd":35
 * 
 * 
 * cdef class ConnParam(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_conn_param conn_param
 *     cdef object data
*/
struct __pyx_obj_7pyverbs_4cmid_ConnParam {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct rdma_conn_param conn_param;
  PyObject *data;
};


/* "pyverbs/cmid.pxd":40
 * 
 * 
 * cdef class UDParam(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_ud_param ud_param
 * 
*/
struct __pyx_obj_7pyverbs_4cmid_UDParam {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct rdma_ud_param ud_param;
};


/* "pyverbs/cmid.pxd":43
 *     cdef cm.rdma_ud_param ud_param
 * 
 * cdef class JoinMCAttrEx(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_cm_join_mc_attr_ex join_mc_attr_ex
*/
struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct rdma_cm_join_mc_attr_ex join_mc_attr_ex;
};


/* "pyverbs/xrcd.pxd":11
 * 
 * 
 * cdef class XRCDInitAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_xrcd_init_attr attr
 * 
*/
struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_xrcd_init_attr attr;
};


/* "pyverbs/xrcd.pxd":15
 * 
 * 
 * cdef class XRCD(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_xrcd *xrcd
 *     cdef Context ctx
*/
struct __pyx_obj_7pyverbs_4xrcd_XRCD {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_xrcd *xrcd;
  struct __pyx_obj_7pyverbs_6device_Context *ctx;
  PyObject *srqs;
  PyObject *qps;
};


/* "pyverbs/addr.pxd":11
 * 
 * 
 * cdef class GID(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_gid gid
 * 
*/
struct __pyx_obj_7pyverbs_4addr_GID {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  union ibv_gid gid;
};


/* "pyverbs/addr.pxd":14
 *     cdef v.ibv_gid gid
 * 
 * cdef class GRH(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_grh grh
 * 
*/
struct __pyx_obj_7pyverbs_4addr_GRH {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_grh grh;
};


/* "pyverbs/addr.pxd":17
 *     cdef v.ibv_grh grh
 * 
 * cdef class GlobalRoute(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_global_route gr
 * 
*/
struct __pyx_obj_7pyverbs_4addr_GlobalRoute {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_global_route gr;
};


/* "pyverbs/addr.pxd":20
 *     cdef v.ibv_global_route gr
 * 
 * cdef class AHAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_ah_attr ah_attr
 *     cdef init_from_ud_param(self, UDParam udparam)
*/
struct __pyx_obj_7pyverbs_4addr_AHAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct __pyx_vtabstruct_7pyverbs_4addr_AHAttr *__pyx_vtab;
  struct ibv_ah_attr ah_attr;
};


/* "pyverbs/addr.pxd":24
 *     cdef init_from_ud_param(self, UDParam udparam)
 * 
 * cdef class AH(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_ah *ah
 *     cdef object pd
*/
struct __pyx_obj_7pyverbs_4addr_AH {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_ah *ah;
  PyObject *pd;
};


/* "pyverbs/qp.pxd":9
 * cimport pyverbs.libibverbs as v
 * 
 * cdef class QPCap(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp_cap cap
 * 
*/
struct __pyx_obj_7pyverbs_2qp_QPCap {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_qp_cap cap;
};


/* "pyverbs/qp.pxd":12
 *     cdef v.ibv_qp_cap cap
 * 
 * cdef class QPInitAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp_init_attr attr
 *     cdef object scq
*/
struct __pyx_obj_7pyverbs_2qp_QPInitAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_qp_init_attr attr;
  PyObject *scq;
  PyObject *rcq;
  PyObject *srq;
};


/* "pyverbs/qp.pxd":18
 *     cdef object srq
 * 
 * cdef class QPInitAttrEx(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp_init_attr_ex attr
 *     cdef object scq
*/
struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_qp_init_attr_ex attr;
  PyObject *scq;
  PyObject *rcq;
  PyObject *_pd;
  PyObject *xrcd;
  PyObject *srq;
  PyObject *ind_table;
};


/* "pyverbs/qp.pxd":27
 *     cdef object ind_table
 * 
 * cdef class QPAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp_attr attr
 * 
*/
struct __pyx_obj_7pyverbs_2qp_QPAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_qp_attr attr;
};


/* "pyverbs/qp.pxd":30
 *     cdef v.ibv_qp_attr attr
 * 
 * cdef class QP(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp *qp
 *     cdef int type
*/
struct __pyx_obj_7pyverbs_2qp_QP {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_qp *qp;
  int type;
  int state;
  PyObject *pd;
  PyObject *context;
  PyObject *xrcd;
  PyObject *scq;
  PyObject *rcq;
  PyObject *mws;
  PyObject *srq;
  PyObject *flows;
  PyObject *dr_actions;
};


/* "pyverbs/qp.pxd":47
 *     cdef add_ref(self, obj)
 * 
 * cdef class DataBuffer(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_data_buf data
 * 
*/
struct __pyx_obj_7pyverbs_2qp_DataBuffer {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_data_buf data;
};


/* "pyverbs/qp.pxd":50
 *     cdef v.ibv_data_buf data
 * 
 * cdef class QPEx(QP):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp_ex *qp_ex
 *     cdef object ind_table
*/
struct __pyx_obj_7pyverbs_2qp_QPEx {
  struct __pyx_obj_7pyverbs_2qp_QP __pyx_base;
  struct ibv_qp_ex *qp_ex;
  PyObject *ind_table;
};


/* "pyverbs/qp.pxd":54
 *     cdef object ind_table
 * 
 * cdef class ECE(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_ece ece
*/
struct __pyx_obj_7pyverbs_2qp_ECE {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_ece ece;
};


/* "pyverbs/device.pxd":10
 * 
 * 
 * cdef class Context(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_context *context
 *     cdef v.ibv_device *device
*/
struct __pyx_obj_7pyverbs_6device_Context {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_context *context;
  struct ibv_device *device;
  PyObject *name;
  PyObject *pds;
  PyObject *dms;
  PyObject *ccs;
  PyObject *cqs;
  PyObject *qps;
  PyObject *xrcds;
  PyObject *vars;
  PyObject *uars;
  PyObject *pps;
  PyObject *sched_nodes;
  PyObject *sched_leafs;
  PyObject *dr_domains;
  PyObject *wqs;
  PyObject *rwq_ind_tbls;
  PyObject *crypto_logins;
  PyObject *event_channels;
  PyObject *dmahs;
};


/* "pyverbs/device.pxd":33
 *     cdef object dmahs
 * 
 * cdef class DeviceAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_device_attr dev_attr
 * 
*/
struct __pyx_obj_7pyverbs_6device_DeviceAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_device_attr dev_attr;
};


/* "pyverbs/device.pxd":36
 *     cdef v.ibv_device_attr dev_attr
 * 
 * cdef class QueryDeviceExInput(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_query_device_ex_input input
 * 
*/
struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_query_device_ex_input input;
};


/* "pyverbs/device.pxd":39
 *     cdef v.ibv_query_device_ex_input input
 * 
 * cdef class ODPCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_odp_caps odp_caps
 *     cdef object xrc_odp_caps
*/
struct __pyx_obj_7pyverbs_6device_ODPCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_odp_caps odp_caps;
  PyObject *xrc_odp_caps;
};


/* "pyverbs/device.pxd":43
 *     cdef object xrc_odp_caps
 * 
 * cdef class RSSCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_rss_caps rss_caps
 * 
*/
struct __pyx_obj_7pyverbs_6device_RSSCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_rss_caps rss_caps;
};


/* "pyverbs/device.pxd":46
 *     cdef v.ibv_rss_caps rss_caps
 * 
 * cdef class PacketPacingCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_packet_pacing_caps packet_pacing_caps
 * 
*/
struct __pyx_obj_7pyverbs_6device_PacketPacingCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_packet_pacing_caps packet_pacing_caps;
};


/* "pyverbs/device.pxd":49
 *     cdef v.ibv_packet_pacing_caps packet_pacing_caps
 * 
 * cdef class PCIAtomicCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_pci_atomic_caps caps
 * 
*/
struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_pci_atomic_caps caps;
};


/* "pyverbs/device.pxd":52
 *     cdef v.ibv_pci_atomic_caps caps
 * 
 * cdef class TMCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_tm_caps tm_caps
 * 
*/
struct __pyx_obj_7pyverbs_6device_TMCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_tm_caps tm_caps;
};


/* "pyverbs/device.pxd":55
 *     cdef v.ibv_tm_caps tm_caps
 * 
 * cdef class CQModerationCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_cq_moderation_caps cq_mod_caps
 * 
*/
struct __pyx_obj_7pyverbs_6device_CQModerationCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_cq_moderation_caps cq_mod_caps;
};


/* "pyverbs/device.pxd":58
 *     cdef v.ibv_cq_moderation_caps cq_mod_caps
 * 
 * cdef class TSOCaps(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_tso_caps tso_caps
 * 
*/
struct __pyx_obj_7pyverbs_6device_TSOCaps {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_tso_caps tso_caps;
};


/* "pyverbs/device.pxd":61
 *     cdef v.ibv_tso_caps tso_caps
 * 
 * cdef class DeviceAttrEx(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_device_attr_ex dev_attr
 * 
*/
struct __pyx_obj_7pyverbs_6device_DeviceAttrEx {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_device_attr_ex dev_attr;
};


/* "pyverbs/device.pxd":64
 *     cdef v.ibv_device_attr_ex dev_attr
 * 
 * cdef class AllocDmAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_alloc_dm_attr alloc_dm_attr
 * 
*/
struct __pyx_obj_7pyverbs_6device_AllocDmAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_alloc_dm_attr alloc_dm_attr;
};


/* "pyverbs/device.pxd":67
 *     cdef v.ibv_alloc_dm_attr alloc_dm_attr
 * 
 * cdef class DM(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_dm *dm
 *     cdef object dm_mrs
*/
struct __pyx_obj_7pyverbs_6device_DM {
  struct __pyx_obj_7pyverbs_4base_PyverbsCM __pyx_base;
  struct ibv_dm *dm;
  PyObject *dm_mrs;
  PyObject *context;
  PyObject *_is_imported;
};


/* "pyverbs/device.pxd":74
 *     cdef add_ref(self, obj)
 * 
 * cdef class PortAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_port_attr attr
 * 
*/
struct __pyx_obj_7pyverbs_6device_PortAttr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_port_attr attr;
};


/* "pyverbs/device.pxd":77
 *     cdef v.ibv_port_attr attr
 * 
 * cdef class GIDEntry(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_gid_entry entry
 * 
*/
struct __pyx_obj_7pyverbs_6device_GIDEntry {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_gid_entry entry;
};


/* "pyverbs/device.pxd":80
 *     cdef v.ibv_gid_entry entry
 * 
 * cdef class AsyncEvent(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_async_event event
 * 
*/
struct __pyx_obj_7pyverbs_6device_AsyncEvent {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct ibv_async_event event;
};


/* "pyverbs/device.pxd":83
 *     cdef v.ibv_async_event event
 * 
 * cdef class FdArr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_fd_arr attr
 *     cpdef close(self)
*/
struct __pyx_obj_7pyverbs_6device_FdArr {
  struct __pyx_obj_7pyverbs_4base_PyverbsObject __pyx_base;
  struct __pyx_vtabstruct_7pyverbs_6device_FdArr *__pyx_vtab;
  struct ibv_fd_arr attr;
};



/* "base.pxd":10
 *     cdef object logger
 * 
 * cdef class PyverbsCM(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cpdef close(self)
 * 
*/

struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM {
  PyObject *(*close)(struct __pyx_obj_7pyverbs_4base_PyverbsCM *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM *__pyx_vtabptr_7pyverbs_4base_PyverbsCM;


/* "pyverbs/cq.pxd":9
 * cimport pyverbs.libibverbs as v
 * 
 * cdef class CompChannel(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_comp_channel *cc
 *     cpdef close(self)
*/

struct __pyx_vtabstruct_7pyverbs_2cq_CompChannel {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2cq_CompChannel *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_2cq_CompChannel *__pyx_vtabptr_7pyverbs_2cq_CompChannel;


/* "pyverbs/cq.pxd":16
 *     cdef object cqs
 * 
 * cdef class CQ(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_cq *cq
 *     cpdef close(self)
*/

struct __pyx_vtabstruct_7pyverbs_2cq_CQ {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2cq_CQ *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_2cq_CQ *__pyx_vtabptr_7pyverbs_2cq_CQ;


/* "pyverbs/cq.pxd":32
 *     cdef object parent_domain
 * 
 * cdef class CQEX(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_cq_ex *cq
 *     cdef v.ibv_cq *ibv_cq
*/

struct __pyx_vtabstruct_7pyverbs_2cq_CQEX {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2cq_CQEX *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_2cq_CQEX *__pyx_vtabptr_7pyverbs_2cq_CQEX;


/* "pyverbs/pd.pxd":12
 * 
 * 
 * cdef class PD(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_pd *pd
 *     cdef Context ctx
*/

struct __pyx_vtabstruct_7pyverbs_2pd_PD {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2pd_PD *, PyObject *);
  PyObject *(*remove_ref)(struct __pyx_obj_7pyverbs_2pd_PD *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_2pd_PD *__pyx_vtabptr_7pyverbs_2pd_PD;


/* "pyverbs/pd.pxd":34
 *     cdef object dealloc
 * 
 * cdef class ParentDomain(PD):             # <<<<<<<<<<<<<<
 *     cdef add_ref(self, obj)
 *     cdef object protection_domain
*/

struct __pyx_vtabstruct_7pyverbs_2pd_ParentDomain {
  struct __pyx_vtabstruct_7pyverbs_2pd_PD __pyx_base;
};
static struct __pyx_vtabstruct_7pyverbs_2pd_ParentDomain *__pyx_vtabptr_7pyverbs_2pd_ParentDomain;


/* "pyverbs/wq.pxd":21
 *     cdef v.ibv_wq_attr attr
 * 
 * cdef class WQ(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_wq *wq
 *     cdef Context context
*/

struct __pyx_vtabstruct_7pyverbs_2wq_WQ {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2wq_WQ *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_2wq_WQ *__pyx_vtabptr_7pyverbs_2wq_WQ;


/* "pyverbs/wq.pxd":33
 *     cdef object wqs_list
 * 
 * cdef class RwqIndTable(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_rwq_ind_table *rwq_ind_table
 *     cdef Context context
*/

struct __pyx_vtabstruct_7pyverbs_2wq_RwqIndTable {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2wq_RwqIndTable *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_2wq_RwqIndTable *__pyx_vtabptr_7pyverbs_2wq_RwqIndTable;


/* "pyverbs/cmid.pxd":10
 * 
 * 
 * cdef class CMID(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_cm_id *id
 *     cdef object event_channel
*/

struct __pyx_vtabstruct_7pyverbs_4cmid_CMID {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_4cmid_CMID *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_4cmid_CMID *__pyx_vtabptr_7pyverbs_4cmid_CMID;


/* "pyverbs/cmid.pxd":20
 * 
 * 
 * cdef class CMEventChannel(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_event_channel *event_channel
 *     cpdef close(self)
*/

struct __pyx_vtabstruct_7pyverbs_4cmid_CMEventChannel {
  PyObject *(*close)(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_4cmid_CMEventChannel *__pyx_vtabptr_7pyverbs_4cmid_CMEventChannel;


/* "pyverbs/cmid.pxd":25
 * 
 * 
 * cdef class CMEvent(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_cm_event *event
 *     cpdef close(self)
*/

struct __pyx_vtabstruct_7pyverbs_4cmid_CMEvent {
  PyObject *(*close)(struct __pyx_obj_7pyverbs_4cmid_CMEvent *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_4cmid_CMEvent *__pyx_vtabptr_7pyverbs_4cmid_CMEvent;


/* "pyverbs/cmid.pxd":30
 * 
 * 
 * cdef class AddrInfo(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef cm.rdma_addrinfo *addr_info
 *     cpdef close(self)
*/

struct __pyx_vtabstruct_7pyverbs_4cmid_AddrInfo {
  PyObject *(*close)(struct __pyx_obj_7pyverbs_4cmid_AddrInfo *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_4cmid_AddrInfo *__pyx_vtabptr_7pyverbs_4cmid_AddrInfo;


/* "pyverbs/xrcd.pxd":15
 * 
 * 
 * cdef class XRCD(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_xrcd *xrcd
 *     cdef Context ctx
*/

struct __pyx_vtabstruct_7pyverbs_4xrcd_XRCD {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_4xrcd_XRCD *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_4xrcd_XRCD *__pyx_vtabptr_7pyverbs_4xrcd_XRCD;


/* "pyverbs/addr.pxd":20
 *     cdef v.ibv_global_route gr
 * 
 * cdef class AHAttr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_ah_attr ah_attr
 *     cdef init_from_ud_param(self, UDParam udparam)
*/

struct __pyx_vtabstruct_7pyverbs_4addr_AHAttr {
  PyObject *(*init_from_ud_param)(struct __pyx_obj_7pyverbs_4addr_AHAttr *, struct __pyx_obj_7pyverbs_4cmid_UDParam *);
};
static struct __pyx_vtabstruct_7pyverbs_4addr_AHAttr *__pyx_vtabptr_7pyverbs_4addr_AHAttr;


/* "pyverbs/addr.pxd":24
 *     cdef init_from_ud_param(self, UDParam udparam)
 * 
 * cdef class AH(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_ah *ah
 *     cdef object pd
*/

struct __pyx_vtabstruct_7pyverbs_4addr_AH {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
};
static struct __pyx_vtabstruct_7pyverbs_4addr_AH *__pyx_vtabptr_7pyverbs_4addr_AH;


/* "pyverbs/qp.pxd":30
 *     cdef v.ibv_qp_attr attr
 * 
 * cdef class QP(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp *qp
 *     cdef int type
*/

struct __pyx_vtabstruct_7pyverbs_2qp_QP {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*update_cqs)(struct __pyx_obj_7pyverbs_2qp_QP *, PyObject *);
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_2qp_QP *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_2qp_QP *__pyx_vtabptr_7pyverbs_2qp_QP;


/* "pyverbs/qp.pxd":47
 *     cdef add_ref(self, obj)
 * 
 * cdef class DataBuffer(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_data_buf data
 * 
*/

struct __pyx_vtabstruct_7pyverbs_2qp_DataBuffer {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
};
static struct __pyx_vtabstruct_7pyverbs_2qp_DataBuffer *__pyx_vtabptr_7pyverbs_2qp_DataBuffer;


/* "pyverbs/qp.pxd":50
 *     cdef v.ibv_data_buf data
 * 
 * cdef class QPEx(QP):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_qp_ex *qp_ex
 *     cdef object ind_table
*/

struct __pyx_vtabstruct_7pyverbs_2qp_QPEx {
  struct __pyx_vtabstruct_7pyverbs_2qp_QP __pyx_base;
};
static struct __pyx_vtabstruct_7pyverbs_2qp_QPEx *__pyx_vtabptr_7pyverbs_2qp_QPEx;


/* "pyverbs/qp.pxd":54
 *     cdef object ind_table
 * 
 * cdef class ECE(PyverbsCM):             # <<<<<<<<<<<<<<
 *     cdef v.ibv_ece ece
*/

struct __pyx_vtabstruct_7pyverbs_2qp_ECE {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
};
static struct __pyx_vtabstruct_7pyverbs_2qp_ECE *__pyx_vtabptr_7pyverbs_2qp_ECE;


/* "pyverbs/device.pyx":79
 * 
 * 
 * cdef class Context(PyverbsCM):             # <<<<<<<<<<<<<<
 *     """
 *     Context class represents the C ibv_context.
*/

struct __pyx_vtabstruct_7pyverbs_6device_Context {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_6device_Context *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_6device_Context *__pyx_vtabptr_7pyverbs_6device_Context;


/* "pyverbs/device.pyx":776
 * 
 * 
 * cdef class DM(PyverbsCM):             # <<<<<<<<<<<<<<
 *     def __init__(self, Context context, AllocDmAttr dm_attr=None, **kwargs):
 *         """
*/

struct __pyx_vtabstruct_7pyverbs_6device_DM {
  struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM __pyx_base;
  PyObject *(*add_ref)(struct __pyx_obj_7pyverbs_6device_DM *, PyObject *);
};
static struct __pyx_vtabstruct_7pyverbs_6device_DM *__pyx_vtabptr_7pyverbs_6device_DM;


/* "pyverbs/device.pyx":1277
 * 
 * 
 * cdef class FdArr(PyverbsObject):             # <<<<<<<<<<<<<<
 *     """
 *     Represent ibv_fd_arr struct. This class is used a pointer to the file descriptor array
*/

struct __pyx_vtabstruct_7pyverbs_6device_FdArr {
  PyObject *(*close)(struct __pyx_obj_7pyverbs_6device_FdArr *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyverbs_6device_FdArr *__pyx_vtabptr_7pyverbs_6device_FdArr;
/* #### Code section: utility_code_proto ### */

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

/* 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) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

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

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

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

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

/* TupleAndListFromArray.proto (used by ImportImpl) */
#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 ImportImpl) */
#include <string.h>

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

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

/* PyImportError_Check.proto */
#define __Pyx_PyExc_ImportError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ImportError)

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

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

/* 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 */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#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);

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

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */
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

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

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

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

/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* CallUnboundCMethod1.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

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

/* decode_c_string_utf16.proto (used by decode_c_string) */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

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

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

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

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

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

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

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

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_uint32_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_uint32_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_uint32_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_uint32_t(uint32_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_uint32_t(uint32_t value, Py_ssize_t width, char padding_char, char format_char);

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

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared)
    #endif
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference)
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right))

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

/* DictGetItem.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

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

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

/* PyUnicode_Substring.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop);

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

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

/* PyRange_Check.proto */
#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check)
  #define PyRange_Check(obj)  __Pyx_TypeCheck((obj), &PyRange_Type)
#endif

/* CallNextTpDealloc.proto */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

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

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear);

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

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

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

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

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

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

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* FunctionImport.proto */
static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

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

/* 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) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

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

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

/* 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 size_t __Pyx_PyLong_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint16_t(uint16_t value);

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

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

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

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

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_short(unsigned short value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_char(unsigned char value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE enum ibv_event_type __Pyx_PyLong_As_enum__ibv_event_type(PyObject *);

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

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

/* 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 */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."

static PyObject *__pyx_f_7pyverbs_6device_7Context_close(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyverbs_6device_7Context_add_ref(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_f_7pyverbs_6device_2DM_close(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyverbs_6device_2DM_add_ref(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_f_7pyverbs_6device_5FdArr_close(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from "pyverbs.base" */
static PyObject *(*__pyx_f_7pyverbs_4base_close_weakrefs)(PyObject *); /*proto*/

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

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

/* Module declarations from "posix.signal" */

/* Module declarations from "posix.time" */

/* Module declarations from "pyverbs.libibverbs_enums" */

/* Module declarations from "pyverbs.libibverbs" */

/* Module declarations from "pyverbs.cq" */

/* Module declarations from "pyverbs.pd" */

/* Module declarations from "pyverbs.wq" */

/* Module declarations from "pyverbs.librdmacm_enums" */

/* Module declarations from "pyverbs.librdmacm" */

/* Module declarations from "pyverbs.cmid" */

/* Module declarations from "pyverbs.xrcd" */

/* Module declarations from "pyverbs" */

/* Module declarations from "pyverbs.addr" */

/* Module declarations from "pyverbs.qp" */

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

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

/* Module declarations from "pyverbs.device" */
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = 0;
static PyObject *__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = 0;
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(enum ibv_values_mask); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py(enum ibv_gid_type_sysfs); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py(enum ibv_atomic_cap); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py(enum ibv_odp_general_caps); /*proto*/
static PyObject *__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(enum ibv_odp_transport_cap_bits); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py(enum ibv_port_state); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(enum ibv_mtu); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(enum ibv_event_type); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(enum ibv_gid_type); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(enum ibv_port_cap_flags); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(enum ibv_port_cap_flags2); /*proto*/
static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(enum ibv_device_cap_flags); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "pyverbs.device"
extern int __pyx_module_is_main_pyverbs__device;
int __pyx_module_is_main_pyverbs__device = 0;

/* Implementation of "pyverbs.device" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_zip;
/* #### Code section: string_decls ### */
static const char __pyx_k_Device_module_introduces_the_Co[] = "\nDevice module introduces the Context and DeviceAttr class.\nIt allows user to open an IB device (using Context(name=<name>) and query it,\nwhich returns a DeviceAttr object.\n";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7pyverbs_6device_6Device___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_guid, PyObject *__pyx_v_node_type, PyObject *__pyx_v_transport_type, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6Device_2name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6Device_4node_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6Device_6transport_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6Device_8guid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6Device_10index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6Device_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_7pyverbs_6device_7Context___init__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static void __pyx_pf_7pyverbs_6device_7Context_2__dealloc__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_4close(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_7context___get__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_16num_comp_vectors___get__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_6query_device(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_8query_device_ex(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_ex_input); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_10query_pkey(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_12get_pkey_index(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, int __pyx_v_pkey); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_14query_gid(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_16query_gid_type(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, unsigned int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_18query_port(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_20query_gid_table(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, size_t __pyx_v_max_entries, uint32_t __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_22query_gid_ex(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, uint32_t __pyx_v_port_num, uint32_t __pyx_v_gid_index, uint32_t __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_24query_rt_values_ex(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, PyObject *__pyx_v_comp_mask); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_26get_async_event(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_6cmd_fd___get__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_4name___get__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7Context_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_10fw_version___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9node_guid___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14sys_image_guid___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_11max_mr_size___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_13page_size_cap___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9vendor_id___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14vendor_part_id___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6hw_ver___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_qp___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9max_qp_wr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_16device_cap_flags___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_sge___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_10max_sge_rd___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_cq___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_cqe___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_mr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_pd___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14max_qp_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14max_ee_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_15max_res_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_19max_qp_init_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_19max_ee_init_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_11atomic_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_ee___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_rdd___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_mw___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_16max_raw_ipv6_qps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_15max_raw_ethy_qp___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_13max_mcast_grp___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_19max_mcast_qp_attach___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_ah___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_fmr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_15max_map_per_fmr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_srq___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_10max_srq_wr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_11max_srq_sge___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9max_pkeys___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_18local_ca_ack_delay___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_13phys_port_cnt___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr___str__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyverbs_6device_18QueryDeviceExInput___init__(struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_self, PyObject *__pyx_v_comp_mask); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_18QueryDeviceExInput_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_18QueryDeviceExInput_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_12general_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_11rc_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_11uc_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_11ud_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_12xrc_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static int __pyx_pf_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_2__set__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps___str__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_9fetch_add___get__(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_4swap___get__(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_12compare_swap___get__(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps_7max_tso___get__(struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps_14supported_qpts___get__(struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_14supported_qpts___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_26max_rwq_indirection_tables___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_19rx_hash_fields_mask___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_16rx_hash_function___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_30max_rwq_indirection_table_size___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_min___get__(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_max___get__(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_14supported_qpts___get__(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_17max_rndv_hdr_size___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_12max_num_tags___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_5flags___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_7max_ops___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_7max_sge___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps_12max_cq_count___get__(struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps_13max_cq_period___get__(struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_9orig_attr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_9comp_mask___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static int __pyx_pf_7pyverbs_6device_12DeviceAttrEx_9comp_mask_2__set__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_8odp_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_25completion_timestamp_mask___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_14hca_core_clock___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_19device_cap_flags_ex___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_8tso_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_15pci_atomic_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_8rss_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_14max_wq_type_rq___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_18packet_pacing_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_15raw_packet_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_7tm_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_11cq_mod_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_11max_dm_size___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_16phys_port_cnt_ex___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyverbs_6device_11AllocDmAttr___init__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_length, PyObject *__pyx_v_log_align_req, PyObject *__pyx_v_comp_mask); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_6length___get__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self); /* proto */
static int __pyx_pf_7pyverbs_6device_11AllocDmAttr_6length_2__set__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_13log_align_req___get__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self); /* proto */
static int __pyx_pf_7pyverbs_6device_11AllocDmAttr_13log_align_req_2__set__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_9comp_mask___get__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self); /* proto */
static int __pyx_pf_7pyverbs_6device_11AllocDmAttr_9comp_mask_2__set__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyverbs_6device_2DM___init__(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_context, struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_dm_attr, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_2unimport(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self); /* proto */
static void __pyx_pf_7pyverbs_6device_2DM_4__dealloc__(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_6close(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_8copy_to_dm(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, PyObject *__pyx_v_dm_offset, PyObject *__pyx_v_data, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_10copy_from_dm(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, PyObject *__pyx_v_dm_offset, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_6handle___get__(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2DM_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_5state___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_7max_mtu___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10active_mtu___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_11gid_tbl_len___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_14port_cap_flags___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10max_msg_sz___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_13bad_pkey_cntr___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_14qkey_viol_cntr___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_12pkey_tbl_len___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_3lid___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_6sm_lid___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_3lmc___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10max_vl_num___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_5sm_sl___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_14subnet_timeout___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_15init_type_reply___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_12active_width___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_12active_speed___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10phys_state___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10link_layer___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_5flags___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_15port_cap_flags2___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_15active_speed_ex___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr___str__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyverbs_6device_8GIDEntry___init__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self, PyObject *__pyx_v_subnet_prefix, PyObject *__pyx_v_interface_id, PyObject *__pyx_v_gid_index, PyObject *__pyx_v_port_num, PyObject *__pyx_v_gid_type, PyObject *__pyx_v_ndev_ifindex); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_17gid_subnet_prefix___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_16gid_interface_id___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_9gid_index___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_8port_num___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_8gid_type___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_12ndev_ifindex___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_2gid_str(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_4__str__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyverbs_6device_10AsyncEvent___init__(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self, PyObject *__pyx_v_event_type); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_2ack(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_10event_type___get__(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_4__str__(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_translate_gid_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gid_type); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_2guid_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_num); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_4translate_transport_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transport_type); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_6translate_node_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node_type); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_8guid_to_hex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node_guid); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_10port_state_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_port_state); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_12translate_mtu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mtu); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_14translate_link_layer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ll); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_16translate_port_cap_flags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_18translate_port_cap_flags2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_20translate_device_caps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_22str_from_flags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_dictionary); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_24phys_state_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phys); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_26width_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_28speed_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_active_speed, PyObject *__pyx_v_active_speed_ex); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_30get_device_list(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_32rdma_get_devices(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_34translate_event_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type); /* proto */
static int __pyx_pf_7pyverbs_6device_5FdArr___init__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_count); /* proto */
static void __pyx_pf_7pyverbs_6device_5FdArr_2__dealloc__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_4close(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_6__str__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_3arr___get__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_5count___get__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_7pyverbs_6device_Context(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_DeviceAttr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_QueryDeviceExInput(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_ODPCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_RSSCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_PacketPacingCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_PCIAtomicCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_TMCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_CQModerationCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_TSOCaps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_DeviceAttrEx(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_AllocDmAttr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_DM(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_PortAttr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_GIDEntry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_AsyncEvent(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyverbs_6device_FdArr(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_7pyverbs_4base_PyverbsObject;
  PyTypeObject *__pyx_ptype_7pyverbs_4base_PyverbsCM;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_CompChannel;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_CQ;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_CqInitAttrEx;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_CQEX;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_WC;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_PollCqAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2cq_WcTmInfo;
  PyTypeObject *__pyx_ptype_7pyverbs_2pd_PD;
  PyTypeObject *__pyx_ptype_7pyverbs_2pd_ParentDomainInitAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2pd_ParentDomain;
  PyTypeObject *__pyx_ptype_7pyverbs_2pd_ParentDomainContext;
  PyTypeObject *__pyx_ptype_7pyverbs_2wq_WQInitAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2wq_WQAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2wq_WQ;
  PyTypeObject *__pyx_ptype_7pyverbs_2wq_RwqIndTableInitAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2wq_RwqIndTable;
  PyTypeObject *__pyx_ptype_7pyverbs_2wq_RxHashConf;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_CMID;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_CMEventChannel;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_CMEvent;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_AddrInfo;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_ConnParam;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_UDParam;
  PyTypeObject *__pyx_ptype_7pyverbs_4cmid_JoinMCAttrEx;
  PyTypeObject *__pyx_ptype_7pyverbs_4xrcd_XRCDInitAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_4xrcd_XRCD;
  PyTypeObject *__pyx_ptype_7pyverbs_4addr_GID;
  PyTypeObject *__pyx_ptype_7pyverbs_4addr_GRH;
  PyTypeObject *__pyx_ptype_7pyverbs_4addr_GlobalRoute;
  PyTypeObject *__pyx_ptype_7pyverbs_4addr_AHAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_4addr_AH;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_QPCap;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_QPInitAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_QPInitAttrEx;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_QPAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_QP;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_DataBuffer;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_QPEx;
  PyTypeObject *__pyx_ptype_7pyverbs_2qp_ECE;
  PyObject *__pyx_type_7pyverbs_6device_Context;
  PyObject *__pyx_type_7pyverbs_6device_DeviceAttr;
  PyObject *__pyx_type_7pyverbs_6device_QueryDeviceExInput;
  PyObject *__pyx_type_7pyverbs_6device_ODPCaps;
  PyObject *__pyx_type_7pyverbs_6device_RSSCaps;
  PyObject *__pyx_type_7pyverbs_6device_PacketPacingCaps;
  PyObject *__pyx_type_7pyverbs_6device_PCIAtomicCaps;
  PyObject *__pyx_type_7pyverbs_6device_TMCaps;
  PyObject *__pyx_type_7pyverbs_6device_CQModerationCaps;
  PyObject *__pyx_type_7pyverbs_6device_TSOCaps;
  PyObject *__pyx_type_7pyverbs_6device_DeviceAttrEx;
  PyObject *__pyx_type_7pyverbs_6device_AllocDmAttr;
  PyObject *__pyx_type_7pyverbs_6device_DM;
  PyObject *__pyx_type_7pyverbs_6device_PortAttr;
  PyObject *__pyx_type_7pyverbs_6device_GIDEntry;
  PyObject *__pyx_type_7pyverbs_6device_AsyncEvent;
  PyObject *__pyx_type_7pyverbs_6device_FdArr;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_Context;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_DeviceAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_QueryDeviceExInput;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_ODPCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_RSSCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_PacketPacingCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_PCIAtomicCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_TMCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_CQModerationCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_TSOCaps;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_DeviceAttrEx;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_AllocDmAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_DM;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_PortAttr;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_GIDEntry;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_AsyncEvent;
  PyTypeObject *__pyx_ptype_7pyverbs_6device_FdArr;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type__format;
  PyObject *__pyx_k__2;
  PyObject *__pyx_k__8;
  PyObject *__pyx_slice[2];
  PyObject *__pyx_tuple[2];
  PyObject *__pyx_codeobj_tab[78];
  PyObject *__pyx_string_tab[664];
  PyObject *__pyx_number_tab[18];
/* #### 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_016x __pyx_string_tab[1]
#define __pyx_kp_u_0_0_Gbps __pyx_string_tab[2]
#define __pyx_kp_u_0x __pyx_string_tab[3]
#define __pyx_kp_u_100_0_Gbps __pyx_string_tab[4]
#define __pyx_kp_u_10_0_Gbps __pyx_string_tab[5]
#define __pyx_kp_u_12X __pyx_string_tab[6]
#define __pyx_kp_u_14_0_Gbps __pyx_string_tab[7]
#define __pyx_kp_u_1X __pyx_string_tab[8]
#define __pyx_kp_u_200_0_Gbps __pyx_string_tab[9]
#define __pyx_kp_u_20_20 __pyx_string_tab[10]
#define __pyx_kp_u_22_20 __pyx_string_tab[11]
#define __pyx_kp_u_24_20 __pyx_string_tab[12]
#define __pyx_kp_u_25_0_Gbps __pyx_string_tab[13]
#define __pyx_kp_u_2X __pyx_string_tab[14]
#define __pyx_kp_u_2_5_Gbps __pyx_string_tab[15]
#define __pyx_kp_u_4X __pyx_string_tab[16]
#define __pyx_kp_u_50_0_Gbps __pyx_string_tab[17]
#define __pyx_kp_u_5_0_Gbps __pyx_string_tab[18]
#define __pyx_kp_u_8X __pyx_string_tab[19]
#define __pyx_kp_u_Active_MTU __pyx_string_tab[20]
#define __pyx_kp_u_Active_speed __pyx_string_tab[21]
#define __pyx_kp_u_Active_width __pyx_string_tab[22]
#define __pyx_kp_u_Atomic_caps __pyx_string_tab[23]
#define __pyx_kp_u_Bad_Pkey_counter __pyx_string_tab[24]
#define __pyx_kp_u_Closing_Context __pyx_string_tab[25]
#define __pyx_kp_u_Closing_DM __pyx_string_tab[26]
#define __pyx_kp_u_Context_opened_device_dev __pyx_string_tab[27]
#define __pyx_kp_u_Device_cap_flags __pyx_string_tab[28]
#define __pyx_kp_u_Device_class_represents_the_C_i __pyx_string_tab[29]
#define __pyx_kp_u_Device_dev_node_type_ntype_trans __pyx_string_tab[30]
#define __pyx_kp_u_Device_doesn_t_support_dm_alloca __pyx_string_tab[31]
#define __pyx_kp_u_Device_name_must_be_provided __pyx_string_tab[32]
#define __pyx_kp_u_Event_Type __pyx_string_tab[33]
#define __pyx_kp_u_FDs_in_arr __pyx_string_tab[34]
#define __pyx_kp_u_FW_version __pyx_string_tab[35]
#define __pyx_kp_u_Failed_to_allocate_device_memory __pyx_string_tab[36]
#define __pyx_kp_u_Failed_to_close_device __pyx_string_tab[37]
#define __pyx_kp_u_Failed_to_copy_from_dm __pyx_string_tab[38]
#define __pyx_kp_u_Failed_to_copy_to_dm __pyx_string_tab[39]
#define __pyx_kp_u_Failed_to_find_device_dev __pyx_string_tab[40]
#define __pyx_kp_u_Failed_to_free_dm __pyx_string_tab[41]
#define __pyx_kp_u_Failed_to_get_async_event __pyx_string_tab[42]
#define __pyx_kp_u_Failed_to_get_device_list __pyx_string_tab[43]
#define __pyx_kp_u_Failed_to_get_devices_list __pyx_string_tab[44]
#define __pyx_kp_u_Failed_to_get_pkey_index_of_pkey __pyx_string_tab[45]
#define __pyx_kp_u_Failed_to_import_DM __pyx_string_tab[46]
#define __pyx_kp_u_Failed_to_import_device __pyx_string_tab[47]
#define __pyx_kp_u_Failed_to_malloc_FD_list __pyx_string_tab[48]
#define __pyx_kp_u_Failed_to_open_device_dev __pyx_string_tab[49]
#define __pyx_kp_u_Failed_to_query_EX_device_name __pyx_string_tab[50]
#define __pyx_kp_u_Failed_to_query_device_name __pyx_string_tab[51]
#define __pyx_kp_u_Failed_to_query_gid_idx_of_port __pyx_string_tab[52]
#define __pyx_kp_u_Failed_to_query_gid_table_of_por __pyx_string_tab[53]
#define __pyx_kp_u_Failed_to_query_gid_tables_of_th __pyx_string_tab[54]
#define __pyx_kp_u_Failed_to_query_gid_type_of_port __pyx_string_tab[55]
#define __pyx_kp_u_Failed_to_query_pkey __pyx_string_tab[56]
#define __pyx_kp_u_Failed_to_query_port_p __pyx_string_tab[57]
#define __pyx_kp_u_Failed_to_query_real_time_values __pyx_string_tab[58]
#define __pyx_kp_u_Failed_to_query_real_time_values_2 __pyx_string_tab[59]
#define __pyx_kp_u_GID_Index __pyx_string_tab[60]
#define __pyx_kp_u_GID_table_len __pyx_string_tab[61]
#define __pyx_kp_u_GID_type __pyx_string_tab[62]
#define __pyx_kp_u_HW_version __pyx_string_tab[63]
#define __pyx_kp_u_IBV_EVENT_QP_LAST_WQE_REACHED_2 __pyx_string_tab[64]
#define __pyx_kp_u_Init_type_reply __pyx_string_tab[65]
#define __pyx_kp_u_Invalid_MTU_m __pyx_string_tab[66]
#define __pyx_kp_u_Invalid_link_layer_ll __pyx_string_tab[67]
#define __pyx_kp_u_Invalid_physical_state __pyx_string_tab[68]
#define __pyx_kp_u_Invalid_speed __pyx_string_tab[69]
#define __pyx_kp_u_Invalid_state_s __pyx_string_tab[70]
#define __pyx_kp_u_Invalid_width __pyx_string_tab[71]
#define __pyx_kp_u_Link_error_recovery __pyx_string_tab[72]
#define __pyx_kp_u_Link_layer __pyx_string_tab[73]
#define __pyx_kp_u_Link_up __pyx_string_tab[74]
#define __pyx_kp_u_MAX_CQ __pyx_string_tab[75]
#define __pyx_kp_u_Max_AH __pyx_string_tab[76]
#define __pyx_kp_u_Max_CQE __pyx_string_tab[77]
#define __pyx_kp_u_Max_EE __pyx_string_tab[78]
#define __pyx_kp_u_Max_EE_RD_atom __pyx_string_tab[79]
#define __pyx_kp_u_Max_EE_init_RD_atom __pyx_string_tab[80]
#define __pyx_kp_u_Max_FMR __pyx_string_tab[81]
#define __pyx_kp_u_Max_MR __pyx_string_tab[82]
#define __pyx_kp_u_Max_MR_size __pyx_string_tab[83]
#define __pyx_kp_u_Max_MTU __pyx_string_tab[84]
#define __pyx_kp_u_Max_MW __pyx_string_tab[85]
#define __pyx_kp_u_Max_PD __pyx_string_tab[86]
#define __pyx_kp_u_Max_PKeys __pyx_string_tab[87]
#define __pyx_kp_u_Max_QP __pyx_string_tab[88]
#define __pyx_kp_u_Max_QP_RD_atom __pyx_string_tab[89]
#define __pyx_kp_u_Max_QP_WR __pyx_string_tab[90]
#define __pyx_kp_u_Max_QP_init_RD_atom __pyx_string_tab[91]
#define __pyx_kp_u_Max_RDD __pyx_string_tab[92]
#define __pyx_kp_u_Max_SGE __pyx_string_tab[93]
#define __pyx_kp_u_Max_SGE_RD __pyx_string_tab[94]
#define __pyx_kp_u_Max_SRQ __pyx_string_tab[95]
#define __pyx_kp_u_Max_SRQ_SGE __pyx_string_tab[96]
#define __pyx_kp_u_Max_SRQ_WR __pyx_string_tab[97]
#define __pyx_kp_u_Max_map_per_FMR __pyx_string_tab[98]
#define __pyx_kp_u_Max_mcast_QP_attach __pyx_string_tab[99]
#define __pyx_kp_u_Max_mcast_group __pyx_string_tab[100]
#define __pyx_kp_u_Max_message_size __pyx_string_tab[101]
#define __pyx_kp_u_Max_raw_IPv6_QPs __pyx_string_tab[102]
#define __pyx_kp_u_Max_raw_ethy_QP __pyx_string_tab[103]
#define __pyx_kp_u_Max_res_RD_atom __pyx_string_tab[104]
#define __pyx_kp_u_Ndev_ifindex __pyx_string_tab[105]
#define __pyx_kp_u_Node_guid __pyx_string_tab[106]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[107]
#define __pyx_kp_u_Number_of_fd_in_arr __pyx_string_tab[108]
#define __pyx_kp_u_ODP_General_caps __pyx_string_tab[109]
#define __pyx_kp_u_Page_size_cap __pyx_string_tab[110]
#define __pyx_kp_u_Phy_test __pyx_string_tab[111]
#define __pyx_kp_u_Phys_port_count __pyx_string_tab[112]
#define __pyx_kp_u_Phys_state __pyx_string_tab[113]
#define __pyx_kp_u_Pickling_of_struct_members_such __pyx_string_tab[114]
#define __pyx_kp_u_Pickling_of_struct_members_such_10 __pyx_string_tab[115]
#define __pyx_kp_u_Pickling_of_struct_members_such_11 __pyx_string_tab[116]
#define __pyx_kp_u_Pickling_of_struct_members_such_12 __pyx_string_tab[117]
#define __pyx_kp_u_Pickling_of_struct_members_such_2 __pyx_string_tab[118]
#define __pyx_kp_u_Pickling_of_struct_members_such_3 __pyx_string_tab[119]
#define __pyx_kp_u_Pickling_of_struct_members_such_4 __pyx_string_tab[120]
#define __pyx_kp_u_Pickling_of_struct_members_such_5 __pyx_string_tab[121]
#define __pyx_kp_u_Pickling_of_struct_members_such_6 __pyx_string_tab[122]
#define __pyx_kp_u_Pickling_of_struct_members_such_7 __pyx_string_tab[123]
#define __pyx_kp_u_Pickling_of_struct_members_such_8 __pyx_string_tab[124]
#define __pyx_kp_u_Pickling_of_struct_members_such_9 __pyx_string_tab[125]
#define __pyx_kp_u_Pkey_table_len __pyx_string_tab[126]
#define __pyx_kp_u_Port_cap_flags __pyx_string_tab[127]
#define __pyx_kp_u_Port_cap_flags_2 __pyx_string_tab[128]
#define __pyx_kp_u_Port_configuration_training __pyx_string_tab[129]
#define __pyx_kp_u_Port_lid __pyx_string_tab[130]
#define __pyx_kp_u_Port_number __pyx_string_tab[131]
#define __pyx_kp_u_Port_state __pyx_string_tab[132]
#define __pyx_kp_u_Qkey_violations_counter __pyx_string_tab[133]
#define __pyx_kp_u_RC_ODP_caps __pyx_string_tab[134]
#define __pyx_kp_u_SM_lid __pyx_string_tab[135]
#define __pyx_kp_u_SM_sl __pyx_string_tab[136]
#define __pyx_kp_u_Subnet_timeout __pyx_string_tab[137]
#define __pyx_kp_u_Sys_image_GUID __pyx_string_tab[138]
#define __pyx_kp_u_UC_ODP_caps __pyx_string_tab[139]
#define __pyx_kp_u_UD_ODP_caps __pyx_string_tab[140]
#define __pyx_kp_u_USNIC_UDP __pyx_string_tab[141]
#define __pyx_kp_u_Unknown_event_type __pyx_string_tab[142]
#define __pyx_kp_u_Unknown_gid_type __pyx_string_tab[143]
#define __pyx_kp_u_Unrecognized_object_type __pyx_string_tab[144]
#define __pyx_kp_u_Vendor_ID __pyx_string_tab[145]
#define __pyx_kp_u_Vendor_part_ID __pyx_string_tab[146]
#define __pyx_kp_u_XRC_ODP_caps __pyx_string_tab[147]
#define __pyx_kp_u__3 __pyx_string_tab[148]
#define __pyx_kp_u__4 __pyx_string_tab[149]
#define __pyx_kp_u__5 __pyx_string_tab[150]
#define __pyx_kp_u__6 __pyx_string_tab[151]
#define __pyx_kp_u__7 __pyx_string_tab[152]
#define __pyx_kp_u__9 __pyx_string_tab[153]
#define __pyx_kp_u_add_note __pyx_string_tab[154]
#define __pyx_kp_u_disable __pyx_string_tab[155]
#define __pyx_kp_u_enable __pyx_string_tab[156]
#define __pyx_kp_u_enum_class_ibv_atomic_cap_not_im __pyx_string_tab[157]
#define __pyx_kp_u_enum_class_ibv_device_cap_flags __pyx_string_tab[158]
#define __pyx_kp_u_enum_class_ibv_event_type_not_im __pyx_string_tab[159]
#define __pyx_kp_u_enum_class_ibv_gid_type_not_impo __pyx_string_tab[160]
#define __pyx_kp_u_enum_class_ibv_gid_type_sysfs_no __pyx_string_tab[161]
#define __pyx_kp_u_enum_class_ibv_mtu_not_importabl __pyx_string_tab[162]
#define __pyx_kp_u_enum_class_ibv_odp_general_caps __pyx_string_tab[163]
#define __pyx_kp_u_enum_class_ibv_odp_transport_cap __pyx_string_tab[164]
#define __pyx_kp_u_enum_class_ibv_port_cap_flags2_n __pyx_string_tab[165]
#define __pyx_kp_u_enum_class_ibv_port_cap_flags_no __pyx_string_tab[166]
#define __pyx_kp_u_enum_class_ibv_port_state_not_im __pyx_string_tab[167]
#define __pyx_kp_u_enum_class_ibv_values_mask_not_i __pyx_string_tab[168]
#define __pyx_kp_u_gc __pyx_string_tab[169]
#define __pyx_kp_u_in_index __pyx_string_tab[170]
#define __pyx_kp_u_isenabled __pyx_string_tab[171]
#define __pyx_kp_u_local_CA_ack_delay __pyx_string_tab[172]
#define __pyx_kp_u_max_VL_num __pyx_string_tab[173]
#define __pyx_kp_u_of_port __pyx_string_tab[174]
#define __pyx_kp_u_pyverbs_device_pyx __pyx_string_tab[175]
#define __pyx_kp_u_pyverbs_pyverbs_error __pyx_string_tab[176]
#define __pyx_kp_u_s_n __pyx_string_tab[177]
#define __pyx_kp_u_self_attr_cannot_be_converted_to __pyx_string_tab[178]
#define __pyx_kp_u_self_context_self_device_cannot __pyx_string_tab[179]
#define __pyx_kp_u_self_dm_cannot_be_converted_to_a __pyx_string_tab[180]
#define __pyx_kp_u_self_event_cannot_be_converted_t __pyx_string_tab[181]
#define __pyx_kp_u_tree_fragment __pyx_string_tab[182]
#define __pyx_n_u_Active __pyx_string_tab[183]
#define __pyx_n_u_AllocDmAttr __pyx_string_tab[184]
#define __pyx_n_u_AllocDmAttr___reduce_cython __pyx_string_tab[185]
#define __pyx_n_u_AllocDmAttr___setstate_cython __pyx_string_tab[186]
#define __pyx_n_u_Armed __pyx_string_tab[187]
#define __pyx_n_u_AsyncEvent __pyx_string_tab[188]
#define __pyx_n_u_AsyncEvent___reduce_cython __pyx_string_tab[189]
#define __pyx_n_u_AsyncEvent___setstate_cython __pyx_string_tab[190]
#define __pyx_n_u_AsyncEvent_ack __pyx_string_tab[191]
#define __pyx_n_u_CA __pyx_string_tab[192]
#define __pyx_n_u_CQModerationCaps __pyx_string_tab[193]
#define __pyx_n_u_CQModerationCaps___reduce_cython __pyx_string_tab[194]
#define __pyx_n_u_CQModerationCaps___setstate_cyth __pyx_string_tab[195]
#define __pyx_n_u_Context __pyx_string_tab[196]
#define __pyx_n_u_Context___reduce_cython __pyx_string_tab[197]
#define __pyx_n_u_Context___setstate_cython __pyx_string_tab[198]
#define __pyx_n_u_Context_close __pyx_string_tab[199]
#define __pyx_n_u_Context_get_async_event __pyx_string_tab[200]
#define __pyx_n_u_Context_get_pkey_index __pyx_string_tab[201]
#define __pyx_n_u_Context_query_device __pyx_string_tab[202]
#define __pyx_n_u_Context_query_device_ex __pyx_string_tab[203]
#define __pyx_n_u_Context_query_gid __pyx_string_tab[204]
#define __pyx_n_u_Context_query_gid_ex __pyx_string_tab[205]
#define __pyx_n_u_Context_query_gid_table __pyx_string_tab[206]
#define __pyx_n_u_Context_query_gid_type __pyx_string_tab[207]
#define __pyx_n_u_Context_query_pkey __pyx_string_tab[208]
#define __pyx_n_u_Context_query_port __pyx_string_tab[209]
#define __pyx_n_u_Context_query_rt_values_ex __pyx_string_tab[210]
#define __pyx_n_u_DM __pyx_string_tab[211]
#define __pyx_n_u_DMAHandle __pyx_string_tab[212]
#define __pyx_n_u_DMMR __pyx_string_tab[213]
#define __pyx_n_u_DM___reduce_cython __pyx_string_tab[214]
#define __pyx_n_u_DM___setstate_cython __pyx_string_tab[215]
#define __pyx_n_u_DM_close __pyx_string_tab[216]
#define __pyx_n_u_DM_copy_from_dm __pyx_string_tab[217]
#define __pyx_n_u_DM_copy_to_dm __pyx_string_tab[218]
#define __pyx_n_u_DM_unimport __pyx_string_tab[219]
#define __pyx_n_u_Defer __pyx_string_tab[220]
#define __pyx_n_u_Device __pyx_string_tab[221]
#define __pyx_n_u_DeviceAttr __pyx_string_tab[222]
#define __pyx_n_u_DeviceAttrEx __pyx_string_tab[223]
#define __pyx_n_u_DeviceAttrEx___reduce_cython __pyx_string_tab[224]
#define __pyx_n_u_DeviceAttrEx___setstate_cython __pyx_string_tab[225]
#define __pyx_n_u_DeviceAttr___reduce_cython __pyx_string_tab[226]
#define __pyx_n_u_DeviceAttr___setstate_cython __pyx_string_tab[227]
#define __pyx_n_u_Device___init __pyx_string_tab[228]
#define __pyx_n_u_Device___str __pyx_string_tab[229]
#define __pyx_n_u_Device_guid __pyx_string_tab[230]
#define __pyx_n_u_Device_index __pyx_string_tab[231]
#define __pyx_n_u_Device_name __pyx_string_tab[232]
#define __pyx_n_u_Device_node_type __pyx_string_tab[233]
#define __pyx_n_u_Device_transport_type __pyx_string_tab[234]
#define __pyx_n_u_Disabled __pyx_string_tab[235]
#define __pyx_n_u_Down __pyx_string_tab[236]
#define __pyx_n_u_Ethernet __pyx_string_tab[237]
#define __pyx_n_u_FdArr __pyx_string_tab[238]
#define __pyx_n_u_FdArr___reduce_cython __pyx_string_tab[239]
#define __pyx_n_u_FdArr___setstate_cython __pyx_string_tab[240]
#define __pyx_n_u_FdArr_close __pyx_string_tab[241]
#define __pyx_n_u_Flags __pyx_string_tab[242]
#define __pyx_n_u_GID __pyx_string_tab[243]
#define __pyx_n_u_GIDEntry __pyx_string_tab[244]
#define __pyx_n_u_GIDEntry___reduce_cython __pyx_string_tab[245]
#define __pyx_n_u_GIDEntry___setstate_cython __pyx_string_tab[246]
#define __pyx_n_u_GIDEntry_gid_str __pyx_string_tab[247]
#define __pyx_n_u_IB __pyx_string_tab[248]
#define __pyx_n_u_IBV_ATOMIC_GLOB __pyx_string_tab[249]
#define __pyx_n_u_IBV_ATOMIC_HCA __pyx_string_tab[250]
#define __pyx_n_u_IBV_ATOMIC_NONE __pyx_string_tab[251]
#define __pyx_n_u_IBV_DEVICE_AUTO_PATH_MIG __pyx_string_tab[252]
#define __pyx_n_u_IBV_DEVICE_BAD_PKEY_CNTR __pyx_string_tab[253]
#define __pyx_n_u_IBV_DEVICE_BAD_QKEY_CNTR __pyx_string_tab[254]
#define __pyx_n_u_IBV_DEVICE_CHANGE_PHY_PORT __pyx_string_tab[255]
#define __pyx_n_u_IBV_DEVICE_CURR_QP_STATE_MOD __pyx_string_tab[256]
#define __pyx_n_u_IBV_DEVICE_INIT_TYPE __pyx_string_tab[257]
#define __pyx_n_u_IBV_DEVICE_MANAGED_FLOW_STEERING __pyx_string_tab[258]
#define __pyx_n_u_IBV_DEVICE_MEM_MGT_EXTENSIONS __pyx_string_tab[259]
#define __pyx_n_u_IBV_DEVICE_MEM_WINDOW __pyx_string_tab[260]
#define __pyx_n_u_IBV_DEVICE_MEM_WINDOW_TYPE_2A __pyx_string_tab[261]
#define __pyx_n_u_IBV_DEVICE_MEM_WINDOW_TYPE_2B __pyx_string_tab[262]
#define __pyx_n_u_IBV_DEVICE_N_NOTIFY_CQ __pyx_string_tab[263]
#define __pyx_n_u_IBV_DEVICE_PORT_ACTIVE_EVENT __pyx_string_tab[264]
#define __pyx_n_u_IBV_DEVICE_RAW_IP_CSUM __pyx_string_tab[265]
#define __pyx_n_u_IBV_DEVICE_RAW_MULTI __pyx_string_tab[266]
#define __pyx_n_u_IBV_DEVICE_RC_IP_CSUM __pyx_string_tab[267]
#define __pyx_n_u_IBV_DEVICE_RC_RNR_NAK_GEN __pyx_string_tab[268]
#define __pyx_n_u_IBV_DEVICE_RESIZE_MAX_WR __pyx_string_tab[269]
#define __pyx_n_u_IBV_DEVICE_SHUTDOWN_PORT __pyx_string_tab[270]
#define __pyx_n_u_IBV_DEVICE_SRQ_RESIZE __pyx_string_tab[271]
#define __pyx_n_u_IBV_DEVICE_SYS_IMAGE_GUID __pyx_string_tab[272]
#define __pyx_n_u_IBV_DEVICE_UD_AV_PORT_ENFORCE __pyx_string_tab[273]
#define __pyx_n_u_IBV_DEVICE_UD_IP_CSUM __pyx_string_tab[274]
#define __pyx_n_u_IBV_DEVICE_XRC __pyx_string_tab[275]
#define __pyx_n_u_IBV_EVENT_CLIENT_REREGISTER __pyx_string_tab[276]
#define __pyx_n_u_IBV_EVENT_COMM_EST __pyx_string_tab[277]
#define __pyx_n_u_IBV_EVENT_CQ_ERR __pyx_string_tab[278]
#define __pyx_n_u_IBV_EVENT_DEVICE_FATAL __pyx_string_tab[279]
#define __pyx_n_u_IBV_EVENT_GID_CHANGE __pyx_string_tab[280]
#define __pyx_n_u_IBV_EVENT_LID_CHANGE __pyx_string_tab[281]
#define __pyx_n_u_IBV_EVENT_PATH_MIG __pyx_string_tab[282]
#define __pyx_n_u_IBV_EVENT_PATH_MIG_ERR __pyx_string_tab[283]
#define __pyx_n_u_IBV_EVENT_PKEY_CHANGE __pyx_string_tab[284]
#define __pyx_n_u_IBV_EVENT_PORT_ACTIVE __pyx_string_tab[285]
#define __pyx_n_u_IBV_EVENT_PORT_ERR __pyx_string_tab[286]
#define __pyx_n_u_IBV_EVENT_QP_ACCESS_ERR __pyx_string_tab[287]
#define __pyx_n_u_IBV_EVENT_QP_FATAL __pyx_string_tab[288]
#define __pyx_n_u_IBV_EVENT_QP_LAST_WQE_REACHED __pyx_string_tab[289]
#define __pyx_n_u_IBV_EVENT_QP_REQ_ERR __pyx_string_tab[290]
#define __pyx_n_u_IBV_EVENT_SM_CHANGE __pyx_string_tab[291]
#define __pyx_n_u_IBV_EVENT_SQ_DRAINED __pyx_string_tab[292]
#define __pyx_n_u_IBV_EVENT_SRQ_ERR __pyx_string_tab[293]
#define __pyx_n_u_IBV_EVENT_SRQ_LIMIT_REACHED __pyx_string_tab[294]
#define __pyx_n_u_IBV_EVENT_WQ_FATAL __pyx_string_tab[295]
#define __pyx_n_u_IBV_GID_TYPE_IB __pyx_string_tab[296]
#define __pyx_n_u_IBV_GID_TYPE_ROCE_V1 __pyx_string_tab[297]
#define __pyx_n_u_IBV_GID_TYPE_ROCE_V2 __pyx_string_tab[298]
#define __pyx_n_u_IBV_GID_TYPE_SYSFS_IB_ROCE_V1 __pyx_string_tab[299]
#define __pyx_n_u_IBV_GID_TYPE_SYSFS_ROCE_V2 __pyx_string_tab[300]
#define __pyx_n_u_IBV_MTU_1024 __pyx_string_tab[301]
#define __pyx_n_u_IBV_MTU_2048 __pyx_string_tab[302]
#define __pyx_n_u_IBV_MTU_256 __pyx_string_tab[303]
#define __pyx_n_u_IBV_MTU_4096 __pyx_string_tab[304]
#define __pyx_n_u_IBV_MTU_512 __pyx_string_tab[305]
#define __pyx_n_u_IBV_ODP_SUPPORT __pyx_string_tab[306]
#define __pyx_n_u_IBV_ODP_SUPPORT_ATOMIC __pyx_string_tab[307]
#define __pyx_n_u_IBV_ODP_SUPPORT_ATOMIC_WRITE __pyx_string_tab[308]
#define __pyx_n_u_IBV_ODP_SUPPORT_FLUSH __pyx_string_tab[309]
#define __pyx_n_u_IBV_ODP_SUPPORT_IMPLICIT __pyx_string_tab[310]
#define __pyx_n_u_IBV_ODP_SUPPORT_READ __pyx_string_tab[311]
#define __pyx_n_u_IBV_ODP_SUPPORT_RECV __pyx_string_tab[312]
#define __pyx_n_u_IBV_ODP_SUPPORT_SEND __pyx_string_tab[313]
#define __pyx_n_u_IBV_ODP_SUPPORT_SRQ_RECV __pyx_string_tab[314]
#define __pyx_n_u_IBV_ODP_SUPPORT_WRITE __pyx_string_tab[315]
#define __pyx_n_u_IBV_PORT_ACTIVE __pyx_string_tab[316]
#define __pyx_n_u_IBV_PORT_ACTIVE_DEFER __pyx_string_tab[317]
#define __pyx_n_u_IBV_PORT_ARMED __pyx_string_tab[318]
#define __pyx_n_u_IBV_PORT_AUTO_MIGR_SUP __pyx_string_tab[319]
#define __pyx_n_u_IBV_PORT_BOOT_MGMT_SUP __pyx_string_tab[320]
#define __pyx_n_u_IBV_PORT_CAP_MASK2_SUP __pyx_string_tab[321]
#define __pyx_n_u_IBV_PORT_CAP_MASK_NOTICE_SUP __pyx_string_tab[322]
#define __pyx_n_u_IBV_PORT_CLIENT_REG_SUP __pyx_string_tab[323]
#define __pyx_n_u_IBV_PORT_CM_SUP __pyx_string_tab[324]
#define __pyx_n_u_IBV_PORT_DEVICE_MGMT_SUP __pyx_string_tab[325]
#define __pyx_n_u_IBV_PORT_DOWN __pyx_string_tab[326]
#define __pyx_n_u_IBV_PORT_DR_NOTICE_SUP __pyx_string_tab[327]
#define __pyx_n_u_IBV_PORT_EXTENDED_SPEEDS_SUP __pyx_string_tab[328]
#define __pyx_n_u_IBV_PORT_INFO_EXT_SUP __pyx_string_tab[329]
#define __pyx_n_u_IBV_PORT_INIT __pyx_string_tab[330]
#define __pyx_n_u_IBV_PORT_IP_BASED_GIDS __pyx_string_tab[331]
#define __pyx_n_u_IBV_PORT_LED_INFO_SUP __pyx_string_tab[332]
#define __pyx_n_u_IBV_PORT_LINK_LATENCY_SUP __pyx_string_tab[333]
#define __pyx_n_u_IBV_PORT_LINK_SPEED_HDR_SUP __pyx_string_tab[334]
#define __pyx_n_u_IBV_PORT_LINK_SPEED_NDR_SUP __pyx_string_tab[335]
#define __pyx_n_u_IBV_PORT_LINK_WIDTH_2X_SUP __pyx_string_tab[336]
#define __pyx_n_u_IBV_PORT_MKEY_NVRAM __pyx_string_tab[337]
#define __pyx_n_u_IBV_PORT_NOP __pyx_string_tab[338]
#define __pyx_n_u_IBV_PORT_NOTICE_SUP __pyx_string_tab[339]
#define __pyx_n_u_IBV_PORT_OPT_IPD_SUP __pyx_string_tab[340]
#define __pyx_n_u_IBV_PORT_PKEY_NVRAM __pyx_string_tab[341]
#define __pyx_n_u_IBV_PORT_PKEY_SW_EXT_PORT_TRAP_S __pyx_string_tab[342]
#define __pyx_n_u_IBV_PORT_REINIT_SUP __pyx_string_tab[343]
#define __pyx_n_u_IBV_PORT_SET_NODE_DESC_SUP __pyx_string_tab[344]
#define __pyx_n_u_IBV_PORT_SL_MAP_SUP __pyx_string_tab[345]
#define __pyx_n_u_IBV_PORT_SM __pyx_string_tab[346]
#define __pyx_n_u_IBV_PORT_SNMP_TUNNEL_SUP __pyx_string_tab[347]
#define __pyx_n_u_IBV_PORT_SWITCH_PORT_STATE_TABLE __pyx_string_tab[348]
#define __pyx_n_u_IBV_PORT_SYS_IMAGE_GUID_SUP __pyx_string_tab[349]
#define __pyx_n_u_IBV_PORT_TRAP_SUP __pyx_string_tab[350]
#define __pyx_n_u_IBV_PORT_VENDOR_CLASS_SUP __pyx_string_tab[351]
#define __pyx_n_u_IBV_PORT_VIRT_SUP __pyx_string_tab[352]
#define __pyx_n_u_IBV_VALUES_MASK_RAW_CLOCK __pyx_string_tab[353]
#define __pyx_n_u_IWARP __pyx_string_tab[354]
#define __pyx_n_u_InfiniBand __pyx_string_tab[355]
#define __pyx_n_u_Init __pyx_string_tab[356]
#define __pyx_n_u_L __pyx_string_tab[357]
#define __pyx_n_u_NOP __pyx_string_tab[358]
#define __pyx_n_u_ODPCaps __pyx_string_tab[359]
#define __pyx_n_u_ODPCaps___reduce_cython __pyx_string_tab[360]
#define __pyx_n_u_ODPCaps___setstate_cython __pyx_string_tab[361]
#define __pyx_n_u_PCIAtomicCaps __pyx_string_tab[362]
#define __pyx_n_u_PCIAtomicCaps___reduce_cython __pyx_string_tab[363]
#define __pyx_n_u_PCIAtomicCaps___setstate_cython __pyx_string_tab[364]
#define __pyx_n_u_PacketPacingCaps __pyx_string_tab[365]
#define __pyx_n_u_PacketPacingCaps___reduce_cython __pyx_string_tab[366]
#define __pyx_n_u_PacketPacingCaps___setstate_cyth __pyx_string_tab[367]
#define __pyx_n_u_Polling __pyx_string_tab[368]
#define __pyx_n_u_PortAttr __pyx_string_tab[369]
#define __pyx_n_u_PortAttr___reduce_cython __pyx_string_tab[370]
#define __pyx_n_u_PortAttr___setstate_cython __pyx_string_tab[371]
#define __pyx_n_u_PyverbsError __pyx_string_tab[372]
#define __pyx_n_u_PyverbsRDMAErrno __pyx_string_tab[373]
#define __pyx_n_u_PyverbsRDMAError __pyx_string_tab[374]
#define __pyx_n_u_PyverbsUserError __pyx_string_tab[375]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[376]
#define __pyx_n_u_QueryDeviceExInput __pyx_string_tab[377]
#define __pyx_n_u_QueryDeviceExInput___reduce_cyth __pyx_string_tab[378]
#define __pyx_n_u_QueryDeviceExInput___setstate_cy __pyx_string_tab[379]
#define __pyx_n_u_RNIC __pyx_string_tab[380]
#define __pyx_n_u_RSSCaps __pyx_string_tab[381]
#define __pyx_n_u_RSSCaps___reduce_cython __pyx_string_tab[382]
#define __pyx_n_u_RSSCaps___setstate_cython __pyx_string_tab[383]
#define __pyx_n_u_RoCEv1 __pyx_string_tab[384]
#define __pyx_n_u_RoCEv2 __pyx_string_tab[385]
#define __pyx_n_u_Router __pyx_string_tab[386]
#define __pyx_n_u_Sleep __pyx_string_tab[387]
#define __pyx_n_u_Switch __pyx_string_tab[388]
#define __pyx_n_u_TMCaps __pyx_string_tab[389]
#define __pyx_n_u_TMCaps___reduce_cython __pyx_string_tab[390]
#define __pyx_n_u_TMCaps___setstate_cython __pyx_string_tab[391]
#define __pyx_n_u_TSOCaps __pyx_string_tab[392]
#define __pyx_n_u_TSOCaps___reduce_cython __pyx_string_tab[393]
#define __pyx_n_u_TSOCaps___setstate_cython __pyx_string_tab[394]
#define __pyx_n_u_USNIC __pyx_string_tab[395]
#define __pyx_n_u_Unknown __pyx_string_tab[396]
#define __pyx_n_u_Unspecified __pyx_string_tab[397]
#define __pyx_n_u_WeakSet __pyx_string_tab[398]
#define __pyx_n_u_ack __pyx_string_tab[399]
#define __pyx_n_u_active_speed __pyx_string_tab[400]
#define __pyx_n_u_active_speed_ex __pyx_string_tab[401]
#define __pyx_n_u_add __pyx_string_tab[402]
#define __pyx_n_u_arr __pyx_string_tab[403]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[404]
#define __pyx_n_u_atomic_caps __pyx_string_tab[405]
#define __pyx_n_u_attr __pyx_string_tab[406]
#define __pyx_n_u_bit __pyx_string_tab[407]
#define __pyx_n_u_class_getitem __pyx_string_tab[408]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[409]
#define __pyx_n_u_close __pyx_string_tab[410]
#define __pyx_n_u_cmd_fd __pyx_string_tab[411]
#define __pyx_n_u_cmid __pyx_string_tab[412]
#define __pyx_n_u_comp_mask __pyx_string_tab[413]
#define __pyx_n_u_context __pyx_string_tab[414]
#define __pyx_n_u_copy_from_dm __pyx_string_tab[415]
#define __pyx_n_u_copy_to_dm __pyx_string_tab[416]
#define __pyx_n_u_count __pyx_string_tab[417]
#define __pyx_n_u_ctx_list __pyx_string_tab[418]
#define __pyx_n_u_data __pyx_string_tab[419]
#define __pyx_n_u_debug __pyx_string_tab[420]
#define __pyx_n_u_decode __pyx_string_tab[421]
#define __pyx_n_u_dev __pyx_string_tab[422]
#define __pyx_n_u_dev_attr __pyx_string_tab[423]
#define __pyx_n_u_dev_attr_ex __pyx_string_tab[424]
#define __pyx_n_u_dev_list __pyx_string_tab[425]
#define __pyx_n_u_device_cap_flags __pyx_string_tab[426]
#define __pyx_n_u_devices __pyx_string_tab[427]
#define __pyx_n_u_dictionary __pyx_string_tab[428]
#define __pyx_n_u_dm_attr __pyx_string_tab[429]
#define __pyx_n_u_dm_offset __pyx_string_tab[430]
#define __pyx_n_u_doc __pyx_string_tab[431]
#define __pyx_n_u_entries __pyx_string_tab[432]
#define __pyx_n_u_entry __pyx_string_tab[433]
#define __pyx_n_u_event __pyx_string_tab[434]
#define __pyx_n_u_event_type __pyx_string_tab[435]
#define __pyx_n_u_ex_input __pyx_string_tab[436]
#define __pyx_n_u_flags __pyx_string_tab[437]
#define __pyx_n_u_format __pyx_string_tab[438]
#define __pyx_n_u_func __pyx_string_tab[439]
#define __pyx_n_u_fw_version __pyx_string_tab[440]
#define __pyx_n_u_g __pyx_string_tab[441]
#define __pyx_n_u_general_caps __pyx_string_tab[442]
#define __pyx_n_u_get __pyx_string_tab[443]
#define __pyx_n_u_get_async_event __pyx_string_tab[444]
#define __pyx_n_u_get_device_list __pyx_string_tab[445]
#define __pyx_n_u_get_pkey_index __pyx_string_tab[446]
#define __pyx_n_u_getstate __pyx_string_tab[447]
#define __pyx_n_u_gid __pyx_string_tab[448]
#define __pyx_n_u_gid_entries __pyx_string_tab[449]
#define __pyx_n_u_gid_index __pyx_string_tab[450]
#define __pyx_n_u_gid_interface_id __pyx_string_tab[451]
#define __pyx_n_u_gid_str __pyx_string_tab[452]
#define __pyx_n_u_gid_subnet_prefix __pyx_string_tab[453]
#define __pyx_n_u_gid_type __pyx_string_tab[454]
#define __pyx_n_u_guid __pyx_string_tab[455]
#define __pyx_n_u_guid_2 __pyx_string_tab[456]
#define __pyx_n_u_guid_format __pyx_string_tab[457]
#define __pyx_n_u_guid_to_hex __pyx_string_tab[458]
#define __pyx_n_u_handle __pyx_string_tab[459]
#define __pyx_n_u_hex_array __pyx_string_tab[460]
#define __pyx_n_u_hex_str __pyx_string_tab[461]
#define __pyx_n_u_hw_ver __pyx_string_tab[462]
#define __pyx_n_u_i __pyx_string_tab[463]
#define __pyx_n_u_ibv_atomic_cap __pyx_string_tab[464]
#define __pyx_n_u_ibv_device_cap_flags __pyx_string_tab[465]
#define __pyx_n_u_ibv_event_type __pyx_string_tab[466]
#define __pyx_n_u_ibv_gid_type __pyx_string_tab[467]
#define __pyx_n_u_ibv_gid_type_sysfs __pyx_string_tab[468]
#define __pyx_n_u_ibv_mtu __pyx_string_tab[469]
#define __pyx_n_u_ibv_odp_general_caps __pyx_string_tab[470]
#define __pyx_n_u_ibv_odp_transport_cap_bits __pyx_string_tab[471]
#define __pyx_n_u_ibv_port_cap_flags __pyx_string_tab[472]
#define __pyx_n_u_ibv_port_cap_flags2 __pyx_string_tab[473]
#define __pyx_n_u_ibv_port_state __pyx_string_tab[474]
#define __pyx_n_u_ibv_values_mask __pyx_string_tab[475]
#define __pyx_n_u_idx __pyx_string_tab[476]
#define __pyx_n_u_index __pyx_string_tab[477]
#define __pyx_n_u_index_2 __pyx_string_tab[478]
#define __pyx_n_u_init __pyx_string_tab[479]
#define __pyx_n_u_interface_id __pyx_string_tab[480]
#define __pyx_n_u_is_coroutine __pyx_string_tab[481]
#define __pyx_n_u_items __pyx_string_tab[482]
#define __pyx_n_u_l __pyx_string_tab[483]
#define __pyx_n_u_length __pyx_string_tab[484]
#define __pyx_n_u_ll __pyx_string_tab[485]
#define __pyx_n_u_lmc __pyx_string_tab[486]
#define __pyx_n_u_local_ca_ack_delay __pyx_string_tab[487]
#define __pyx_n_u_log_align_req __pyx_string_tab[488]
#define __pyx_n_u_m __pyx_string_tab[489]
#define __pyx_n_u_main __pyx_string_tab[490]
#define __pyx_n_u_max __pyx_string_tab[491]
#define __pyx_n_u_max_ah __pyx_string_tab[492]
#define __pyx_n_u_max_cq __pyx_string_tab[493]
#define __pyx_n_u_max_cqe __pyx_string_tab[494]
#define __pyx_n_u_max_dm_size __pyx_string_tab[495]
#define __pyx_n_u_max_ee __pyx_string_tab[496]
#define __pyx_n_u_max_ee_init_rd_atom __pyx_string_tab[497]
#define __pyx_n_u_max_ee_rd_atom __pyx_string_tab[498]
#define __pyx_n_u_max_entries __pyx_string_tab[499]
#define __pyx_n_u_max_fmr __pyx_string_tab[500]
#define __pyx_n_u_max_map_per_fmr __pyx_string_tab[501]
#define __pyx_n_u_max_mcast_grp __pyx_string_tab[502]
#define __pyx_n_u_max_mcast_qp_attach __pyx_string_tab[503]
#define __pyx_n_u_max_mr __pyx_string_tab[504]
#define __pyx_n_u_max_mr_size __pyx_string_tab[505]
#define __pyx_n_u_max_mw __pyx_string_tab[506]
#define __pyx_n_u_max_pd __pyx_string_tab[507]
#define __pyx_n_u_max_pkeys __pyx_string_tab[508]
#define __pyx_n_u_max_qp __pyx_string_tab[509]
#define __pyx_n_u_max_qp_init_rd_atom __pyx_string_tab[510]
#define __pyx_n_u_max_qp_rd_atom __pyx_string_tab[511]
#define __pyx_n_u_max_qp_wr __pyx_string_tab[512]
#define __pyx_n_u_max_raw_ethy_qp __pyx_string_tab[513]
#define __pyx_n_u_max_raw_ipv6_qps __pyx_string_tab[514]
#define __pyx_n_u_max_rdd __pyx_string_tab[515]
#define __pyx_n_u_max_res_rd_atom __pyx_string_tab[516]
#define __pyx_n_u_max_sge __pyx_string_tab[517]
#define __pyx_n_u_max_sge_rd __pyx_string_tab[518]
#define __pyx_n_u_max_srq __pyx_string_tab[519]
#define __pyx_n_u_max_srq_sge __pyx_string_tab[520]
#define __pyx_n_u_max_srq_wr __pyx_string_tab[521]
#define __pyx_n_u_metaclass __pyx_string_tab[522]
#define __pyx_n_u_module __pyx_string_tab[523]
#define __pyx_n_u_mro_entries __pyx_string_tab[524]
#define __pyx_n_u_mtu __pyx_string_tab[525]
#define __pyx_n_u_n __pyx_string_tab[526]
#define __pyx_n_u_name __pyx_string_tab[527]
#define __pyx_n_u_name_2 __pyx_string_tab[528]
#define __pyx_n_u_name_3 __pyx_string_tab[529]
#define __pyx_n_u_ndev_ifindex __pyx_string_tab[530]
#define __pyx_n_u_node __pyx_string_tab[531]
#define __pyx_n_u_node_guid __pyx_string_tab[532]
#define __pyx_n_u_node_type __pyx_string_tab[533]
#define __pyx_n_u_node_type_2 __pyx_string_tab[534]
#define __pyx_n_u_nsec __pyx_string_tab[535]
#define __pyx_n_u_ntype __pyx_string_tab[536]
#define __pyx_n_u_num __pyx_string_tab[537]
#define __pyx_n_u_p __pyx_string_tab[538]
#define __pyx_n_u_page_size_cap __pyx_string_tab[539]
#define __pyx_n_u_phys __pyx_string_tab[540]
#define __pyx_n_u_phys_port_cnt __pyx_string_tab[541]
#define __pyx_n_u_phys_state_to_str __pyx_string_tab[542]
#define __pyx_n_u_pkey __pyx_string_tab[543]
#define __pyx_n_u_pop __pyx_string_tab[544]
#define __pyx_n_u_port __pyx_string_tab[545]
#define __pyx_n_u_port_attrs __pyx_string_tab[546]
#define __pyx_n_u_port_num __pyx_string_tab[547]
#define __pyx_n_u_port_state __pyx_string_tab[548]
#define __pyx_n_u_port_state_to_str __pyx_string_tab[549]
#define __pyx_n_u_prepare __pyx_string_tab[550]
#define __pyx_n_u_property __pyx_string_tab[551]
#define __pyx_n_u_pyverbs_base __pyx_string_tab[552]
#define __pyx_n_u_pyverbs_device __pyx_string_tab[553]
#define __pyx_n_u_pyverbs_error __pyx_string_tab[554]
#define __pyx_n_u_pyverbs_libibverbs_enums __pyx_string_tab[555]
#define __pyx_n_u_pyverbs_mr __pyx_string_tab[556]
#define __pyx_n_u_pyverbs_utils __pyx_string_tab[557]
#define __pyx_n_u_pyx_state __pyx_string_tab[558]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[559]
#define __pyx_n_u_qualname __pyx_string_tab[560]
#define __pyx_n_u_query_device __pyx_string_tab[561]
#define __pyx_n_u_query_device_ex __pyx_string_tab[562]
#define __pyx_n_u_query_gid __pyx_string_tab[563]
#define __pyx_n_u_query_gid_ex __pyx_string_tab[564]
#define __pyx_n_u_query_gid_table __pyx_string_tab[565]
#define __pyx_n_u_query_gid_type __pyx_string_tab[566]
#define __pyx_n_u_query_pkey __pyx_string_tab[567]
#define __pyx_n_u_query_port __pyx_string_tab[568]
#define __pyx_n_u_query_rt_values_ex __pyx_string_tab[569]
#define __pyx_n_u_rc __pyx_string_tab[570]
#define __pyx_n_u_rc_odp_caps __pyx_string_tab[571]
#define __pyx_n_u_rdma_get_devices __pyx_string_tab[572]
#define __pyx_n_u_real_speed __pyx_string_tab[573]
#define __pyx_n_u_reduce __pyx_string_tab[574]
#define __pyx_n_u_reduce_cython __pyx_string_tab[575]
#define __pyx_n_u_reduce_ex __pyx_string_tab[576]
#define __pyx_n_u_res __pyx_string_tab[577]
#define __pyx_n_u_s __pyx_string_tab[578]
#define __pyx_n_u_sec __pyx_string_tab[579]
#define __pyx_n_u_self __pyx_string_tab[580]
#define __pyx_n_u_set_name __pyx_string_tab[581]
#define __pyx_n_u_setdefault __pyx_string_tab[582]
#define __pyx_n_u_setstate __pyx_string_tab[583]
#define __pyx_n_u_setstate_cython __pyx_string_tab[584]
#define __pyx_n_u_size __pyx_string_tab[585]
#define __pyx_n_u_speed_to_str __pyx_string_tab[586]
#define __pyx_n_u_str __pyx_string_tab[587]
#define __pyx_n_u_str_flags __pyx_string_tab[588]
#define __pyx_n_u_str_from_flags __pyx_string_tab[589]
#define __pyx_n_u_subnet_prefix __pyx_string_tab[590]
#define __pyx_n_u_super __pyx_string_tab[591]
#define __pyx_n_u_sys_image_guid __pyx_string_tab[592]
#define __pyx_n_u_test __pyx_string_tab[593]
#define __pyx_n_u_translate_device_caps __pyx_string_tab[594]
#define __pyx_n_u_translate_event_type __pyx_string_tab[595]
#define __pyx_n_u_translate_gid_type __pyx_string_tab[596]
#define __pyx_n_u_translate_link_layer __pyx_string_tab[597]
#define __pyx_n_u_translate_mtu __pyx_string_tab[598]
#define __pyx_n_u_translate_node_type __pyx_string_tab[599]
#define __pyx_n_u_translate_port_cap_flags __pyx_string_tab[600]
#define __pyx_n_u_translate_port_cap_flags2 __pyx_string_tab[601]
#define __pyx_n_u_translate_transport_type __pyx_string_tab[602]
#define __pyx_n_u_transport __pyx_string_tab[603]
#define __pyx_n_u_transport_type __pyx_string_tab[604]
#define __pyx_n_u_transport_type_2 __pyx_string_tab[605]
#define __pyx_n_u_ttype __pyx_string_tab[606]
#define __pyx_n_u_types __pyx_string_tab[607]
#define __pyx_n_u_uc_odp_caps __pyx_string_tab[608]
#define __pyx_n_u_ud_odp_caps __pyx_string_tab[609]
#define __pyx_n_u_unimport __pyx_string_tab[610]
#define __pyx_n_u_val __pyx_string_tab[611]
#define __pyx_n_u_values __pyx_string_tab[612]
#define __pyx_n_u_vendor_id __pyx_string_tab[613]
#define __pyx_n_u_vendor_part_id __pyx_string_tab[614]
#define __pyx_n_u_warn __pyx_string_tab[615]
#define __pyx_n_u_warnings __pyx_string_tab[616]
#define __pyx_n_u_weakref __pyx_string_tab[617]
#define __pyx_n_u_width __pyx_string_tab[618]
#define __pyx_n_u_width_to_str __pyx_string_tab[619]
#define __pyx_n_u_x __pyx_string_tab[620]
#define __pyx_n_u_zip __pyx_string_tab[621]
#define __pyx_kp_b_PyObject_PyObject_close_weakrefs __pyx_string_tab[622]
#define __pyx_kp_b_iso88591_1A_y_1_aq_a_U_1_xq_xq_HARwa_wb __pyx_string_tab[623]
#define __pyx_kp_b_iso88591_3az_s_6 __pyx_string_tab[624]
#define __pyx_kp_b_iso88591_A_4t3a_t1_G6_1D_t4q_l_4q_3c_a_1 __pyx_string_tab[625]
#define __pyx_kp_b_iso88591_A_4y_1_t1_G6_1D_d_oTQWW_aaeef_d __pyx_string_tab[626]
#define __pyx_kp_b_iso88591_A_4z_1_4t1_H_WXXY_q __pyx_string_tab[627]
#define __pyx_kp_b_iso88591_A_4z_q_3c_A_q __pyx_string_tab[628]
#define __pyx_kp_b_iso88591_A_AT_a __pyx_string_tab[629]
#define __pyx_kp_b_iso88591_A_N_q_IQ_IQ_Ja __pyx_string_tab[630]
#define __pyx_kp_b_iso88591_A_Q_q_Jaxq_3c_B_t81_q __pyx_string_tab[631]
#define __pyx_kp_b_iso88591_A_Qat1 __pyx_string_tab[632]
#define __pyx_kp_b_iso88591_A_V1L_4z_q_3b_1_a_E_aq_G1A_waxq __pyx_string_tab[633]
#define __pyx_kp_b_iso88591_A_XQ_oQd_Jaz_3c_Q_Kq_q __pyx_string_tab[634]
#define __pyx_kp_b_iso88591_A_a_1_a_a_a_q_Q_q_q_a_uAQ_Qa __pyx_string_tab[635]
#define __pyx_kp_b_iso88591_A_a_F __pyx_string_tab[636]
#define __pyx_kp_b_iso88591_A_aq_avS_D_Kxq_3c_Q_d_A_AQ_q __pyx_string_tab[637]
#define __pyx_kp_b_iso88591_A_c_nAT_WAS_3c_MQIJ_gUZZ_q __pyx_string_tab[638]
#define __pyx_kp_b_iso88591_A_j_3c_1_2Zr_q __pyx_string_tab[639]
#define __pyx_kp_b_iso88591_A_l_4q_HJiwjPQ_Kq_3c_EQ_t81_q __pyx_string_tab[640]
#define __pyx_kp_b_iso88591_A_oQd_JgQa_3c_1_q __pyx_string_tab[641]
#define __pyx_kp_b_iso88591_A_q_31D_E_a_at1_XV4q __pyx_string_tab[642]
#define __pyx_kp_b_iso88591_A_q_D_Zq_ha_3c_1 __pyx_string_tab[643]
#define __pyx_kp_b_iso88591_A_q_Jj_ha_3c_1_Q_9_q_q __pyx_string_tab[644]
#define __pyx_kp_b_iso88591_A_q_Qd_A_3c_H_3k_A_1_4z_j_AQ_uA __pyx_string_tab[645]
#define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[646]
#define __pyx_kp_b_iso88591_A_wat_t1 __pyx_string_tab[647]
#define __pyx_kp_b_iso88591_E_E_F_V3a_AQfBa_A __pyx_string_tab[648]
#define __pyx_kp_b_iso88591_F_V3fCwd_AQhb_q __pyx_string_tab[649]
#define __pyx_kp_b_iso88591_F_Yc_Q_q_q __pyx_string_tab[650]
#define __pyx_kp_b_iso88591_F_Zs_Cxs_A_q_q __pyx_string_tab[651]
#define __pyx_kp_b_iso88591_G3hc_IS_Q_AQm2Q_G1Ba __pyx_string_tab[652]
#define __pyx_kp_b_iso88591_L_s_c_M_m4q_nE_AQm2Q_q __pyx_string_tab[653]
#define __pyx_kp_b_iso88591_O2_2Q_q_Q __pyx_string_tab[654]
#define __pyx_kp_b_iso88591_Q __pyx_string_tab[655]
#define __pyx_kp_b_iso88591_Q_AQa_y_1_1_a_E_aq_81Ba_81Ba_1 __pyx_string_tab[656]
#define __pyx_kp_b_iso88591_Q_Q_Q_Q_q_Q_a_a_1_1_1_Q __pyx_string_tab[657]
#define __pyx_kp_b_iso88591_Yc_Cq_Cq_Cq_AQgRq_q __pyx_string_tab[658]
#define __pyx_kp_b_iso88591_a_1_q_1_A_Q_Q_a_1_1_a_A_1 __pyx_string_tab[659]
#define __pyx_kp_b_iso88591_a_Q_uAQ_1A __pyx_string_tab[660]
#define __pyx_kp_b_iso88591_hc_1AS_E_as_Qj_5_D_S_3d_1Cq_3e1 __pyx_string_tab[661]
#define __pyx_kp_b_iso88591_q_6_1_1A_1 __pyx_string_tab[662]
#define __pyx_kp_b_iso88591_q_a_1_q __pyx_string_tab[663]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_1 __pyx_number_tab[1]
#define __pyx_int_2 __pyx_number_tab[2]
#define __pyx_int_3 __pyx_number_tab[3]
#define __pyx_int_4 __pyx_number_tab[4]
#define __pyx_int_5 __pyx_number_tab[5]
#define __pyx_int_6 __pyx_number_tab[6]
#define __pyx_int_7 __pyx_number_tab[7]
#define __pyx_int_8 __pyx_number_tab[8]
#define __pyx_int_16 __pyx_number_tab[9]
#define __pyx_int_32 __pyx_number_tab[10]
#define __pyx_int_64 __pyx_number_tab[11]
#define __pyx_int_128 __pyx_number_tab[12]
#define __pyx_int_256 __pyx_number_tab[13]
#define __pyx_int_512 __pyx_number_tab[14]
#define __pyx_int_1024 __pyx_number_tab[15]
#define __pyx_int_2048 __pyx_number_tab[16]
#define __pyx_int_4096 __pyx_number_tab[17]
/* #### 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_7pyverbs_4base_PyverbsObject);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4base_PyverbsCM);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_CompChannel);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_CQ);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_CqInitAttrEx);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_CQEX);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_WC);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_PollCqAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2cq_WcTmInfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2pd_PD);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2pd_ParentDomainInitAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2pd_ParentDomain);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2pd_ParentDomainContext);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2wq_WQInitAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2wq_WQAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2wq_WQ);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2wq_RwqIndTableInitAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2wq_RwqIndTable);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2wq_RxHashConf);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_CMID);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_CMEventChannel);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_CMEvent);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_AddrInfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_ConnParam);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_UDParam);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4cmid_JoinMCAttrEx);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4xrcd_XRCDInitAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4xrcd_XRCD);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4addr_GID);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4addr_GRH);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4addr_GlobalRoute);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4addr_AHAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_4addr_AH);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_QPCap);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_QPInitAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_QPInitAttrEx);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_QPAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_QP);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_DataBuffer);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_QPEx);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_2qp_ECE);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_Context);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_Context);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_DeviceAttr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_DeviceAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_QueryDeviceExInput);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_ODPCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_ODPCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_RSSCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_RSSCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_PacketPacingCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_PacketPacingCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_PCIAtomicCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_TMCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_TMCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_CQModerationCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_CQModerationCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_TSOCaps);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_TSOCaps);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_DeviceAttrEx);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_DeviceAttrEx);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_AllocDmAttr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_AllocDmAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_DM);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_DM);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_PortAttr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_PortAttr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_GIDEntry);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_GIDEntry);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_AsyncEvent);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_AsyncEvent);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyverbs_6device_FdArr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyverbs_6device_FdArr);
  Py_CLEAR(clear_module_state->__pyx_k__2);
  Py_CLEAR(clear_module_state->__pyx_k__8);
  for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); }
  for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<78; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<664; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<18; ++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_7pyverbs_4base_PyverbsObject);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4base_PyverbsCM);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_CompChannel);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_CQ);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_CqInitAttrEx);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_CQEX);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_WC);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_PollCqAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2cq_WcTmInfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2pd_PD);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2pd_ParentDomainInitAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2pd_ParentDomain);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2pd_ParentDomainContext);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2wq_WQInitAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2wq_WQAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2wq_WQ);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2wq_RwqIndTableInitAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2wq_RwqIndTable);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2wq_RxHashConf);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_CMID);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_CMEventChannel);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_CMEvent);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_AddrInfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_ConnParam);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_UDParam);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4cmid_JoinMCAttrEx);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4xrcd_XRCDInitAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4xrcd_XRCD);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4addr_GID);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4addr_GRH);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4addr_GlobalRoute);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4addr_AHAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_4addr_AH);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_QPCap);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_QPInitAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_QPInitAttrEx);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_QPAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_QP);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_DataBuffer);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_QPEx);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_2qp_ECE);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_Context);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_Context);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_DeviceAttr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_DeviceAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_QueryDeviceExInput);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_ODPCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_ODPCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_RSSCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_RSSCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_PacketPacingCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_PacketPacingCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_PCIAtomicCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_TMCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_TMCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_CQModerationCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_CQModerationCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_TSOCaps);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_TSOCaps);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_DeviceAttrEx);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_DeviceAttrEx);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_AllocDmAttr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_AllocDmAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_DM);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_DM);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_PortAttr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_PortAttr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_GIDEntry);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_GIDEntry);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_AsyncEvent);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_AsyncEvent);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyverbs_6device_FdArr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyverbs_6device_FdArr);
  Py_VISIT(traverse_module_state->__pyx_k__2);
  Py_VISIT(traverse_module_state->__pyx_k__8);
  for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); }
  for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<78; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<664; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<18; ++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 ### */

/* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(ibv_values_mask c_val):
 *     cdef object __pyx_enum
*/

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(enum ibv_values_mask __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_values_mask};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_values_mask};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_values_mask not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_values_mask not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_values_mask_not_i};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_values_mask as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_values_mask.IBV_VALUES_MASK_RAW_CLOCK:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_VALUES_MASK_RAW_CLOCK
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_VALUES_MASK_RAW_CLOCK);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_values_mask.IBV_VALUES_MASK_RAW_CLOCK:
 *         return __pyx_enum.IBV_VALUES_MASK_RAW_CLOCK             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_VALUES_MASK_RAW_CLOCK); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_values_mask.IBV_VALUES_MASK_RAW_CLOCK:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_VALUES_MASK_RAW_CLOCK
 *     else:
*/
  }

  /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_VALUES_MASK_RAW_CLOCK
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":33
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(ibv_values_mask c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py(enum ibv_gid_type_sysfs __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_gid_type_sysfs};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_gid_type_sysfs};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_gid_type_sysfs not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_gid_type_sysfs not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_gid_type_sysfs_no};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type_sysfs as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_IB_ROCE_V1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_IB_ROCE_V1
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_ROCE_V2:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_GID_TYPE_SYSFS_IB_ROCE_V1);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_IB_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_IB_ROCE_V1             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_ROCE_V2:
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_ROCE_V2
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_GID_TYPE_SYSFS_IB_ROCE_V1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_IB_ROCE_V1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_IB_ROCE_V1
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_ROCE_V2:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_IB_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_IB_ROCE_V1
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_ROCE_V2:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_ROCE_V2
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_GID_TYPE_SYSFS_ROCE_V2);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_IB_ROCE_V1
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_ROCE_V2:
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_ROCE_V2             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_GID_TYPE_SYSFS_ROCE_V2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_IB_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_IB_ROCE_V1
 *     elif c_val == ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_ROCE_V2:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_ROCE_V2
 *     else:
*/
  }

  /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_GID_TYPE_SYSFS_ROCE_V2
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":35
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py(ibv_gid_type_sysfs c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py(enum ibv_atomic_cap __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_atomic_cap};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_atomic_cap};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_atomic_cap not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_atomic_cap not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_atomic_cap_not_im};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_atomic_cap as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_NONE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ATOMIC_NONE
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ATOMIC_NONE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_NONE:
 *         return __pyx_enum.IBV_ATOMIC_NONE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:
 *         return __pyx_enum.IBV_ATOMIC_HCA
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ATOMIC_NONE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_NONE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ATOMIC_NONE
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_NONE:
 *         return __pyx_enum.IBV_ATOMIC_NONE
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ATOMIC_HCA
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_GLOB:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ATOMIC_HCA);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_ATOMIC_NONE
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:
 *         return __pyx_enum.IBV_ATOMIC_HCA             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_GLOB:
 *         return __pyx_enum.IBV_ATOMIC_GLOB
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ATOMIC_HCA); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_NONE:
 *         return __pyx_enum.IBV_ATOMIC_NONE
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ATOMIC_HCA
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_GLOB:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:
 *         return __pyx_enum.IBV_ATOMIC_HCA
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_GLOB:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ATOMIC_GLOB
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ATOMIC_GLOB);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_ATOMIC_HCA
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_GLOB:
 *         return __pyx_enum.IBV_ATOMIC_GLOB             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ATOMIC_GLOB); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_HCA:
 *         return __pyx_enum.IBV_ATOMIC_HCA
 *     elif c_val == ibv_atomic_cap.IBV_ATOMIC_GLOB:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ATOMIC_GLOB
 *     else:
*/
  }

  /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_ATOMIC_GLOB
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":37
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py(ibv_atomic_cap c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py(enum ibv_odp_general_caps __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_odp_general_caps};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_odp_general_caps};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_odp_general_caps not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_odp_general_caps not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_odp_general_caps};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_general_caps as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT_IMPLICIT:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT:
 *         return __pyx_enum.IBV_ODP_SUPPORT             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT_IMPLICIT:
 *         return __pyx_enum.IBV_ODP_SUPPORT_IMPLICIT
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT_IMPLICIT:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT:
 *         return __pyx_enum.IBV_ODP_SUPPORT
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT_IMPLICIT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_IMPLICIT
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_IMPLICIT);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_ODP_SUPPORT
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT_IMPLICIT:
 *         return __pyx_enum.IBV_ODP_SUPPORT_IMPLICIT             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_IMPLICIT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT:
 *         return __pyx_enum.IBV_ODP_SUPPORT
 *     elif c_val == ibv_odp_general_caps.IBV_ODP_SUPPORT_IMPLICIT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_IMPLICIT
 *     else:
*/
  }

  /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_ODP_SUPPORT_IMPLICIT
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":35
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py(ibv_odp_general_caps c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(enum ibv_odp_transport_cap_bits __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_odp_transport_cap_bits};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_odp_transport_cap_bits};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_odp_transport_cap_bits not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_odp_transport_cap_bits not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_odp_transport_cap};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_odp_transport_cap_bits as __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_SEND
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_SEND);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SEND             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_SEND); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_SEND
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SEND
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_RECV);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_ODP_SUPPORT_SEND
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_RECV); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SEND
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_WRITE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_WRITE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_READ);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_READ); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_WRITE:
 *         return __pyx_enum.IBV_ODP_SUPPORT_WRITE
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_ATOMIC);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_ATOMIC); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_READ:
 *         return __pyx_enum.IBV_ODP_SUPPORT_READ
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:
*/
  }

  /* "EnumTypeToPy":39
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_SRQ_RECV);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_SRQ_RECV); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":39
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC:
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:
*/
  }

  /* "EnumTypeToPy":41
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC_WRITE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_FLUSH);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":42
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC_WRITE:
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC_WRITE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_FLUSH); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":41
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SRQ_RECV:
 *         return __pyx_enum.IBV_ODP_SUPPORT_SRQ_RECV
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC_WRITE:
*/
  }

  /* "EnumTypeToPy":43
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC_WRITE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC_WRITE
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_ODP_SUPPORT_ATOMIC_WRITE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":44
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC_WRITE:
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC_WRITE             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_ATOMIC_WRITE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":43
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_FLUSH:
 *         return __pyx_enum.IBV_ODP_SUPPORT_FLUSH
 *     elif c_val == ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_ATOMIC_WRITE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC_WRITE
 *     else:
*/
  }

  /* "EnumTypeToPy":46
 *         return __pyx_enum.IBV_ODP_SUPPORT_ATOMIC_WRITE
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":47
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 47, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = None
 * 
 * @cname("__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(ibv_odp_transport_cap_bits c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py(enum ibv_port_state __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_port_state};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_port_state};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_port_state not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_port_state not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_port_state_not_im};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_state as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_port_state.IBV_PORT_NOP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_NOP
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_NOP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_port_state.IBV_PORT_NOP:
 *         return __pyx_enum.IBV_PORT_NOP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:
 *         return __pyx_enum.IBV_PORT_DOWN
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_NOP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_port_state.IBV_PORT_NOP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_NOP
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_port_state.IBV_PORT_NOP:
 *         return __pyx_enum.IBV_PORT_NOP
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_DOWN
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_DOWN);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_PORT_NOP
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:
 *         return __pyx_enum.IBV_PORT_DOWN             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:
 *         return __pyx_enum.IBV_PORT_INIT
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_DOWN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_port_state.IBV_PORT_NOP:
 *         return __pyx_enum.IBV_PORT_NOP
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_DOWN
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:
 *         return __pyx_enum.IBV_PORT_DOWN
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_INIT
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_INIT);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_PORT_DOWN
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:
 *         return __pyx_enum.IBV_PORT_INIT             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:
 *         return __pyx_enum.IBV_PORT_ARMED
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_INIT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_port_state.IBV_PORT_DOWN:
 *         return __pyx_enum.IBV_PORT_DOWN
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_INIT
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:
 *         return __pyx_enum.IBV_PORT_INIT
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_ARMED
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_ARMED);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_PORT_INIT
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:
 *         return __pyx_enum.IBV_PORT_ARMED             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:
 *         return __pyx_enum.IBV_PORT_ACTIVE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_ARMED); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_port_state.IBV_PORT_INIT:
 *         return __pyx_enum.IBV_PORT_INIT
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_ARMED
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:
 *         return __pyx_enum.IBV_PORT_ARMED
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_ACTIVE
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE_DEFER:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_ACTIVE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_PORT_ARMED
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:
 *         return __pyx_enum.IBV_PORT_ACTIVE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE_DEFER:
 *         return __pyx_enum.IBV_PORT_ACTIVE_DEFER
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_ACTIVE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_port_state.IBV_PORT_ARMED:
 *         return __pyx_enum.IBV_PORT_ARMED
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_ACTIVE
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE_DEFER:
*/
  }

  /* "EnumTypeToPy":39
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:
 *         return __pyx_enum.IBV_PORT_ACTIVE
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE_DEFER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_ACTIVE_DEFER
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_ACTIVE_DEFER);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_PORT_ACTIVE
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE_DEFER:
 *         return __pyx_enum.IBV_PORT_ACTIVE_DEFER             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_ACTIVE_DEFER); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":39
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE:
 *         return __pyx_enum.IBV_PORT_ACTIVE
 *     elif c_val == ibv_port_state.IBV_PORT_ACTIVE_DEFER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_ACTIVE_DEFER
 *     else:
*/
  }

  /* "EnumTypeToPy":42
 *         return __pyx_enum.IBV_PORT_ACTIVE_DEFER
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":43
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py(ibv_port_state c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(enum ibv_mtu __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_mtu};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_mtu};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_mtu not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_mtu not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_mtu_not_importabl};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_mtu as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_mtu.IBV_MTU_256:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_256
 *     elif c_val == ibv_mtu.IBV_MTU_512:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_MTU_256);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_mtu.IBV_MTU_256:
 *         return __pyx_enum.IBV_MTU_256             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_mtu.IBV_MTU_512:
 *         return __pyx_enum.IBV_MTU_512
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_MTU_256); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_mtu.IBV_MTU_256:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_256
 *     elif c_val == ibv_mtu.IBV_MTU_512:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_mtu.IBV_MTU_256:
 *         return __pyx_enum.IBV_MTU_256
 *     elif c_val == ibv_mtu.IBV_MTU_512:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_512
 *     elif c_val == ibv_mtu.IBV_MTU_1024:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_MTU_512);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_MTU_256
 *     elif c_val == ibv_mtu.IBV_MTU_512:
 *         return __pyx_enum.IBV_MTU_512             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_mtu.IBV_MTU_1024:
 *         return __pyx_enum.IBV_MTU_1024
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_MTU_512); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_mtu.IBV_MTU_256:
 *         return __pyx_enum.IBV_MTU_256
 *     elif c_val == ibv_mtu.IBV_MTU_512:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_512
 *     elif c_val == ibv_mtu.IBV_MTU_1024:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_mtu.IBV_MTU_512:
 *         return __pyx_enum.IBV_MTU_512
 *     elif c_val == ibv_mtu.IBV_MTU_1024:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_1024
 *     elif c_val == ibv_mtu.IBV_MTU_2048:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_MTU_1024);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_MTU_512
 *     elif c_val == ibv_mtu.IBV_MTU_1024:
 *         return __pyx_enum.IBV_MTU_1024             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_mtu.IBV_MTU_2048:
 *         return __pyx_enum.IBV_MTU_2048
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_MTU_1024); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_mtu.IBV_MTU_512:
 *         return __pyx_enum.IBV_MTU_512
 *     elif c_val == ibv_mtu.IBV_MTU_1024:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_1024
 *     elif c_val == ibv_mtu.IBV_MTU_2048:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_mtu.IBV_MTU_1024:
 *         return __pyx_enum.IBV_MTU_1024
 *     elif c_val == ibv_mtu.IBV_MTU_2048:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_2048
 *     elif c_val == ibv_mtu.IBV_MTU_4096:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_MTU_2048);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_MTU_1024
 *     elif c_val == ibv_mtu.IBV_MTU_2048:
 *         return __pyx_enum.IBV_MTU_2048             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_mtu.IBV_MTU_4096:
 *         return __pyx_enum.IBV_MTU_4096
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_MTU_2048); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_mtu.IBV_MTU_1024:
 *         return __pyx_enum.IBV_MTU_1024
 *     elif c_val == ibv_mtu.IBV_MTU_2048:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_2048
 *     elif c_val == ibv_mtu.IBV_MTU_4096:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_mtu.IBV_MTU_2048:
 *         return __pyx_enum.IBV_MTU_2048
 *     elif c_val == ibv_mtu.IBV_MTU_4096:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_4096
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_MTU_4096);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_MTU_2048
 *     elif c_val == ibv_mtu.IBV_MTU_4096:
 *         return __pyx_enum.IBV_MTU_4096             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_MTU_4096); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_mtu.IBV_MTU_2048:
 *         return __pyx_enum.IBV_MTU_2048
 *     elif c_val == ibv_mtu.IBV_MTU_4096:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_MTU_4096
 *     else:
*/
  }

  /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_MTU_4096
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":41
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 41, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(ibv_mtu c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(enum ibv_event_type __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_event_type};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_event_type};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_event_type not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_event_type not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_event_type_not_im};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_event_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_event_type.IBV_EVENT_CQ_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_CQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_CQ_ERR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_event_type.IBV_EVENT_CQ_ERR:
 *         return __pyx_enum.IBV_EVENT_CQ_ERR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:
 *         return __pyx_enum.IBV_EVENT_QP_FATAL
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_CQ_ERR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_event_type.IBV_EVENT_CQ_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_CQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_event_type.IBV_EVENT_CQ_ERR:
 *         return __pyx_enum.IBV_EVENT_CQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_QP_FATAL);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_EVENT_CQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:
 *         return __pyx_enum.IBV_EVENT_QP_FATAL             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_FATAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_event_type.IBV_EVENT_CQ_ERR:
 *         return __pyx_enum.IBV_EVENT_CQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:
 *         return __pyx_enum.IBV_EVENT_QP_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_QP_REQ_ERR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_EVENT_QP_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_REQ_ERR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_FATAL:
 *         return __pyx_enum.IBV_EVENT_QP_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_QP_ACCESS_ERR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:
 *         return __pyx_enum.IBV_EVENT_COMM_EST
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_ACCESS_ERR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_REQ_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_REQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_COMM_EST
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_COMM_EST);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:
 *         return __pyx_enum.IBV_EVENT_COMM_EST             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_COMM_EST); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_ACCESS_ERR:
 *         return __pyx_enum.IBV_EVENT_QP_ACCESS_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_COMM_EST
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:
*/
  }

  /* "EnumTypeToPy":39
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:
 *         return __pyx_enum.IBV_EVENT_COMM_EST
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_SQ_DRAINED);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_EVENT_COMM_EST
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SQ_DRAINED); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":39
 *     elif c_val == ibv_event_type.IBV_EVENT_COMM_EST:
 *         return __pyx_enum.IBV_EVENT_COMM_EST
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:
*/
  }

  /* "EnumTypeToPy":41
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PATH_MIG
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_PATH_MIG);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":42
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PATH_MIG); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":41
 *     elif c_val == ibv_event_type.IBV_EVENT_SQ_DRAINED:
 *         return __pyx_enum.IBV_EVENT_SQ_DRAINED
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PATH_MIG
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:
*/
  }

  /* "EnumTypeToPy":43
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_PATH_MIG_ERR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":44
 *         return __pyx_enum.IBV_EVENT_PATH_MIG
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PATH_MIG_ERR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":43
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:
*/
  }

  /* "EnumTypeToPy":45
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_DEVICE_FATAL);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":46
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_DEVICE_FATAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":45
 *     elif c_val == ibv_event_type.IBV_EVENT_PATH_MIG_ERR:
 *         return __pyx_enum.IBV_EVENT_PATH_MIG_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:
*/
  }

  /* "EnumTypeToPy":47
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_PORT_ACTIVE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":48
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:
 *         return __pyx_enum.IBV_EVENT_PORT_ERR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PORT_ACTIVE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":47
 *     elif c_val == ibv_event_type.IBV_EVENT_DEVICE_FATAL:
 *         return __pyx_enum.IBV_EVENT_DEVICE_FATAL
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:
*/
  }

  /* "EnumTypeToPy":49
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PORT_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_PORT_ERR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":50
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:
 *         return __pyx_enum.IBV_EVENT_PORT_ERR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PORT_ERR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":49
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ACTIVE:
 *         return __pyx_enum.IBV_EVENT_PORT_ACTIVE
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PORT_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:
*/
  }

  /* "EnumTypeToPy":51
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:
 *         return __pyx_enum.IBV_EVENT_PORT_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_LID_CHANGE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":52
 *         return __pyx_enum.IBV_EVENT_PORT_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_LID_CHANGE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":51
 *     elif c_val == ibv_event_type.IBV_EVENT_PORT_ERR:
 *         return __pyx_enum.IBV_EVENT_PORT_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:
*/
  }

  /* "EnumTypeToPy":53
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_PKEY_CHANGE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":54
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PKEY_CHANGE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":53
 *     elif c_val == ibv_event_type.IBV_EVENT_LID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_LID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:
*/
  }

  /* "EnumTypeToPy":55
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_SM_CHANGE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":56
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SM_CHANGE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":55
 *     elif c_val == ibv_event_type.IBV_EVENT_PKEY_CHANGE:
 *         return __pyx_enum.IBV_EVENT_PKEY_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:
*/
  }

  /* "EnumTypeToPy":57
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_SRQ_ERR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":58
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SRQ_ERR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":57
 *     elif c_val == ibv_event_type.IBV_EVENT_SM_CHANGE:
 *         return __pyx_enum.IBV_EVENT_SM_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:
*/
  }

  /* "EnumTypeToPy":59
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_SRQ_LIMIT_REACHED);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":60
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SRQ_LIMIT_REACHED); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":59
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_ERR:
 *         return __pyx_enum.IBV_EVENT_SRQ_ERR
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:
*/
  }

  /* "EnumTypeToPy":61
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_QP_LAST_WQE_REACHED);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":62
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_LAST_WQE_REACHED); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":61
 *     elif c_val == ibv_event_type.IBV_EVENT_SRQ_LIMIT_REACHED:
 *         return __pyx_enum.IBV_EVENT_SRQ_LIMIT_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:
*/
  }

  /* "EnumTypeToPy":63
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_CLIENT_REREGISTER);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":64
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_CLIENT_REREGISTER); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":63
 *     elif c_val == ibv_event_type.IBV_EVENT_QP_LAST_WQE_REACHED:
 *         return __pyx_enum.IBV_EVENT_QP_LAST_WQE_REACHED
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:
*/
  }

  /* "EnumTypeToPy":65
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_WQ_FATAL:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_GID_CHANGE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":66
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_event_type.IBV_EVENT_WQ_FATAL:
 *         return __pyx_enum.IBV_EVENT_WQ_FATAL
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_GID_CHANGE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":65
 *     elif c_val == ibv_event_type.IBV_EVENT_CLIENT_REREGISTER:
 *         return __pyx_enum.IBV_EVENT_CLIENT_REREGISTER
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_WQ_FATAL:
*/
  }

  /* "EnumTypeToPy":67
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_WQ_FATAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_WQ_FATAL
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_EVENT_WQ_FATAL);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":68
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_WQ_FATAL:
 *         return __pyx_enum.IBV_EVENT_WQ_FATAL             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_WQ_FATAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":67
 *     elif c_val == ibv_event_type.IBV_EVENT_GID_CHANGE:
 *         return __pyx_enum.IBV_EVENT_GID_CHANGE
 *     elif c_val == ibv_event_type.IBV_EVENT_WQ_FATAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_EVENT_WQ_FATAL
 *     else:
*/
  }

  /* "EnumTypeToPy":70
 *         return __pyx_enum.IBV_EVENT_WQ_FATAL
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":71
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(ibv_event_type c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(enum ibv_gid_type __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_gid_type};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_gid_type};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_gid_type not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_gid_type not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_gid_type_not_impo};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_gid_type as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_IB:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_IB
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_GID_TYPE_IB);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_IB:
 *         return __pyx_enum.IBV_GID_TYPE_IB             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_GID_TYPE_IB); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_IB:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_IB
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_IB:
 *         return __pyx_enum.IBV_GID_TYPE_IB
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V2:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_GID_TYPE_ROCE_V1);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_GID_TYPE_IB
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V2:
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V2
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_GID_TYPE_ROCE_V1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_IB:
 *         return __pyx_enum.IBV_GID_TYPE_IB
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V2:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V2:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V2
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_GID_TYPE_ROCE_V2);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V2:
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V2             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_GID_TYPE_ROCE_V2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V1:
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V1
 *     elif c_val == ibv_gid_type.IBV_GID_TYPE_ROCE_V2:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V2
 *     else:
*/
  }

  /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_GID_TYPE_ROCE_V2
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":37
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(ibv_gid_type c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(enum ibv_port_cap_flags __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_port_cap_flags};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_port_cap_flags};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_port_cap_flags not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_port_cap_flags not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_port_cap_flags_no};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_SM);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SM:
 *         return __pyx_enum.IBV_PORT_SM             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SM); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SM:
 *         return __pyx_enum.IBV_PORT_SM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_NOTICE_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_PORT_SM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_TRAP_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_NOTICE_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SM:
 *         return __pyx_enum.IBV_PORT_SM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_TRAP_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_TRAP_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_TRAP_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_OPT_IPD_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_OPT_IPD_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_AUTO_MIGR_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_AUTO_MIGR_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_OPT_IPD_SUP:
 *         return __pyx_enum.IBV_PORT_OPT_IPD_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:
*/
  }

  /* "EnumTypeToPy":39
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_SL_MAP_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SL_MAP_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":39
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_AUTO_MIGR_SUP:
 *         return __pyx_enum.IBV_PORT_AUTO_MIGR_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:
*/
  }

  /* "EnumTypeToPy":41
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_MKEY_NVRAM);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":42
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_MKEY_NVRAM); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":41
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SL_MAP_SUP:
 *         return __pyx_enum.IBV_PORT_SL_MAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:
*/
  }

  /* "EnumTypeToPy":43
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_PKEY_NVRAM);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":44
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_PKEY_NVRAM); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":43
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_MKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_MKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:
*/
  }

  /* "EnumTypeToPy":45
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_LED_INFO_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":46
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LED_INFO_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":45
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_NVRAM:
 *         return __pyx_enum.IBV_PORT_PKEY_NVRAM
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:
*/
  }

  /* "EnumTypeToPy":47
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_SYS_IMAGE_GUID_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":48
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SYS_IMAGE_GUID_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":47
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LED_INFO_SUP:
 *         return __pyx_enum.IBV_PORT_LED_INFO_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:
*/
  }

  /* "EnumTypeToPy":49
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":50
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_PKEY_SW_EXT_PORT_TRAP_S); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":49
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SYS_IMAGE_GUID_SUP:
 *         return __pyx_enum.IBV_PORT_SYS_IMAGE_GUID_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:
*/
  }

  /* "EnumTypeToPy":51
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_EXTENDED_SPEEDS_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":52
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_EXTENDED_SPEEDS_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":51
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP:
 *         return __pyx_enum.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:
*/
  }

  /* "EnumTypeToPy":53
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_CAP_MASK2_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":54
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:
 *         return __pyx_enum.IBV_PORT_CM_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CAP_MASK2_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":53
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_EXTENDED_SPEEDS_SUP:
 *         return __pyx_enum.IBV_PORT_EXTENDED_SPEEDS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:
*/
  }

  /* "EnumTypeToPy":55
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CM_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_CM_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":56
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:
 *         return __pyx_enum.IBV_PORT_CM_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CM_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":55
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK2_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK2_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CM_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:
*/
  }

  /* "EnumTypeToPy":57
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:
 *         return __pyx_enum.IBV_PORT_CM_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_SNMP_TUNNEL_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":58
 *         return __pyx_enum.IBV_PORT_CM_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:
 *         return __pyx_enum.IBV_PORT_REINIT_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SNMP_TUNNEL_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":57
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CM_SUP:
 *         return __pyx_enum.IBV_PORT_CM_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:
*/
  }

  /* "EnumTypeToPy":59
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_REINIT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_REINIT_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":60
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:
 *         return __pyx_enum.IBV_PORT_REINIT_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_REINIT_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":59
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_SNMP_TUNNEL_SUP:
 *         return __pyx_enum.IBV_PORT_SNMP_TUNNEL_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_REINIT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:
*/
  }

  /* "EnumTypeToPy":61
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:
 *         return __pyx_enum.IBV_PORT_REINIT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_DEVICE_MGMT_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":62
 *         return __pyx_enum.IBV_PORT_REINIT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_DEVICE_MGMT_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":61
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_REINIT_SUP:
 *         return __pyx_enum.IBV_PORT_REINIT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:
*/
  }

  /* "EnumTypeToPy":63
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_VENDOR_CLASS_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":64
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_VENDOR_CLASS_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":63
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DEVICE_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_DEVICE_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:
*/
  }

  /* "EnumTypeToPy":65
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_DR_NOTICE_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":66
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_DR_NOTICE_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":65
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_VENDOR_CLASS_SUP:
 *         return __pyx_enum.IBV_PORT_VENDOR_CLASS_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:
*/
  }

  /* "EnumTypeToPy":67
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_CAP_MASK_NOTICE_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":68
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CAP_MASK_NOTICE_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":67
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_DR_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_DR_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:
*/
  }

  /* "EnumTypeToPy":69
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_BOOT_MGMT_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":70
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_BOOT_MGMT_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":69
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CAP_MASK_NOTICE_SUP:
 *         return __pyx_enum.IBV_PORT_CAP_MASK_NOTICE_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:
*/
  }

  /* "EnumTypeToPy":71
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_LINK_LATENCY_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":72
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_LATENCY_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":71
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_BOOT_MGMT_SUP:
 *         return __pyx_enum.IBV_PORT_BOOT_MGMT_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:
*/
  }

  /* "EnumTypeToPy":73
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_IP_BASED_GIDS:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_CLIENT_REG_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":74
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_IP_BASED_GIDS:
 *         return __pyx_enum.IBV_PORT_IP_BASED_GIDS
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CLIENT_REG_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":73
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_LINK_LATENCY_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_LATENCY_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_IP_BASED_GIDS:
*/
  }

  /* "EnumTypeToPy":75
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_IP_BASED_GIDS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_IP_BASED_GIDS
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_IP_BASED_GIDS);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":76
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_IP_BASED_GIDS:
 *         return __pyx_enum.IBV_PORT_IP_BASED_GIDS             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_IP_BASED_GIDS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":75
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_CLIENT_REG_SUP:
 *         return __pyx_enum.IBV_PORT_CLIENT_REG_SUP
 *     elif c_val == ibv_port_cap_flags.IBV_PORT_IP_BASED_GIDS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_IP_BASED_GIDS
 *     else:
*/
  }

  /* "EnumTypeToPy":78
 *         return __pyx_enum.IBV_PORT_IP_BASED_GIDS
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":79
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 79, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(ibv_port_cap_flags c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(enum ibv_port_cap_flags2 __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_port_cap_flags2};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_port_cap_flags2};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_port_cap_flags2 not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_port_cap_flags2 not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_port_cap_flags2_n};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_port_cap_flags2 as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SET_NODE_DESC_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SET_NODE_DESC_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_SET_NODE_DESC_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SET_NODE_DESC_SUP:
 *         return __pyx_enum.IBV_PORT_SET_NODE_DESC_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SET_NODE_DESC_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SET_NODE_DESC_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SET_NODE_DESC_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SET_NODE_DESC_SUP:
 *         return __pyx_enum.IBV_PORT_SET_NODE_DESC_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_INFO_EXT_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_PORT_SET_NODE_DESC_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:
 *         return __pyx_enum.IBV_PORT_VIRT_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_INFO_EXT_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SET_NODE_DESC_SUP:
 *         return __pyx_enum.IBV_PORT_SET_NODE_DESC_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_VIRT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_VIRT_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:
 *         return __pyx_enum.IBV_PORT_VIRT_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_VIRT_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_INFO_EXT_SUP:
 *         return __pyx_enum.IBV_PORT_INFO_EXT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_VIRT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:
 *         return __pyx_enum.IBV_PORT_VIRT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_PORT_VIRT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SWITCH_PORT_STATE_TABLE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_VIRT_SUP:
 *         return __pyx_enum.IBV_PORT_VIRT_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_LINK_WIDTH_2X_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_WIDTH_2X_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP:
 *         return __pyx_enum.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:
*/
  }

  /* "EnumTypeToPy":39
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_NDR_SUP:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_LINK_SPEED_HDR_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_NDR_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_NDR_SUP
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_SPEED_HDR_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":39
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_WIDTH_2X_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_WIDTH_2X_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_NDR_SUP:
*/
  }

  /* "EnumTypeToPy":41
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_NDR_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_NDR_SUP
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_PORT_LINK_SPEED_NDR_SUP);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":42
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_NDR_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_NDR_SUP             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_SPEED_NDR_SUP); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":41
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_HDR_SUP:
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_HDR_SUP
 *     elif c_val == ibv_port_cap_flags2.IBV_PORT_LINK_SPEED_NDR_SUP:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_NDR_SUP
 *     else:
*/
  }

  /* "EnumTypeToPy":44
 *         return __pyx_enum.IBV_PORT_LINK_SPEED_NDR_SUP
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":45
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(ibv_port_cap_flags2 c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(enum ibv_device_cap_flags __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_v_underlying_c_val;
  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;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py", 0);

  /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py == Py_None);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
 *         except ImportError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "EnumTypeToPy":13
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is None:
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = False  # False indicates "don't try again"
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_device_cap_flags};
          __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_libibverbs_enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L4_error)
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_5);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ibv_device_cap_flags};
          __pyx_t_7 = 0; {
            __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            switch (__pyx_t_7) {
              case 0:
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py);
              __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_8);
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
 *         except ImportError:
*/
      }
      __Pyx_XDECREF(__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;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "EnumTypeToPy":14
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = False  # False indicates "don't try again"
 *             import warnings
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(1, 14, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);

        /* "EnumTypeToPy":15
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = False  # False indicates "don't try again"             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn(
*/
        __Pyx_INCREF(Py_False);
        __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py);
        __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py, Py_False);
        __Pyx_GIVEREF(Py_False);

        /* "EnumTypeToPy":16
 *         except ImportError:
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = False  # False indicates "don't try again"
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn(
 *                 f"enum class ibv_device_cap_flags not importable from pyverbs.libibverbs_enums. "
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 16, __pyx_L6_except_error)
        __pyx_t_11 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_v_warnings = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "EnumTypeToPy":17
 *             __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = False  # False indicates "don't try again"
 *             import warnings
 *             warnings.warn(             # <<<<<<<<<<<<<<
 *                 f"enum class ibv_device_cap_flags not importable from pyverbs.libibverbs_enums. "
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
*/
        __pyx_t_12 = __pyx_v_warnings;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_13 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_enum_class_ibv_device_cap_flags};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 17, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "EnumTypeToPy":12
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
 *         except ImportError:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "EnumTypeToPy":11
 * 
 * 
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from pyverbs.libibverbs_enums import ibv_device_cap_flags as __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
*/
  }

  /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = (__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py == Py_False);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":24
 * 
 * 
 *         return <int>c_val             # <<<<<<<<<<<<<<
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyLong_From_int(((int)__pyx_v_c_val)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *                 "You are probably using a cpdef enum declared in a .pxd file that "
 *                 "does not have a .py  or .pyx file.")
 *     if __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py is False:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumTypeToPy":25
 * 
 *         return <int>c_val
 *     __pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_INCREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py);
  __pyx_v___pyx_enum = __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py;

  /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RESIZE_MAX_WR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RESIZE_MAX_WR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_RESIZE_MAX_WR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":30
 *         pass
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RESIZE_MAX_WR:
 *         return __pyx_enum.IBV_DEVICE_RESIZE_MAX_WR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RESIZE_MAX_WR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     if 0:
 *         pass
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RESIZE_MAX_WR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RESIZE_MAX_WR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RESIZE_MAX_WR:
 *         return __pyx_enum.IBV_DEVICE_RESIZE_MAX_WR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_BAD_PKEY_CNTR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.IBV_DEVICE_RESIZE_MAX_WR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_BAD_PKEY_CNTR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RESIZE_MAX_WR:
 *         return __pyx_enum.IBV_DEVICE_RESIZE_MAX_WR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_BAD_QKEY_CNTR);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_BAD_QKEY_CNTR); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_PKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_PKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_RAW_MULTI);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RAW_MULTI); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_BAD_QKEY_CNTR:
 *         return __pyx_enum.IBV_DEVICE_BAD_QKEY_CNTR
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:
*/
  }

  /* "EnumTypeToPy":37
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_AUTO_PATH_MIG);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":38
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_AUTO_PATH_MIG); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":37
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_MULTI:
 *         return __pyx_enum.IBV_DEVICE_RAW_MULTI
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:
*/
  }

  /* "EnumTypeToPy":39
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_CHANGE_PHY_PORT);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":40
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_CHANGE_PHY_PORT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":39
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_AUTO_PATH_MIG:
 *         return __pyx_enum.IBV_DEVICE_AUTO_PATH_MIG
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:
*/
  }

  /* "EnumTypeToPy":41
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_UD_AV_PORT_ENFORCE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":42
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_UD_AV_PORT_ENFORCE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":41
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CHANGE_PHY_PORT:
 *         return __pyx_enum.IBV_DEVICE_CHANGE_PHY_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:
*/
  }

  /* "EnumTypeToPy":43
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_CURR_QP_STATE_MOD);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":44
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_CURR_QP_STATE_MOD); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":43
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_AV_PORT_ENFORCE:
 *         return __pyx_enum.IBV_DEVICE_UD_AV_PORT_ENFORCE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:
*/
  }

  /* "EnumTypeToPy":45
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_SHUTDOWN_PORT);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":46
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_SHUTDOWN_PORT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":45
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_CURR_QP_STATE_MOD:
 *         return __pyx_enum.IBV_DEVICE_CURR_QP_STATE_MOD
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:
*/
  }

  /* "EnumTypeToPy":47
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_INIT_TYPE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":48
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_INIT_TYPE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":47
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SHUTDOWN_PORT:
 *         return __pyx_enum.IBV_DEVICE_SHUTDOWN_PORT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:
*/
  }

  /* "EnumTypeToPy":49
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_PORT_ACTIVE_EVENT);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":50
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_PORT_ACTIVE_EVENT); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":49
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_INIT_TYPE:
 *         return __pyx_enum.IBV_DEVICE_INIT_TYPE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:
*/
  }

  /* "EnumTypeToPy":51
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_SYS_IMAGE_GUID);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":52
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_SYS_IMAGE_GUID); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":51
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_PORT_ACTIVE_EVENT:
 *         return __pyx_enum.IBV_DEVICE_PORT_ACTIVE_EVENT
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:
*/
  }

  /* "EnumTypeToPy":53
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_RC_RNR_NAK_GEN);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":54
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RC_RNR_NAK_GEN); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":53
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SYS_IMAGE_GUID:
 *         return __pyx_enum.IBV_DEVICE_SYS_IMAGE_GUID
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:
*/
  }

  /* "EnumTypeToPy":55
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_SRQ_RESIZE);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":56
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_SRQ_RESIZE); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":55
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_RNR_NAK_GEN:
 *         return __pyx_enum.IBV_DEVICE_RC_RNR_NAK_GEN
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:
*/
  }

  /* "EnumTypeToPy":57
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_N_NOTIFY_CQ);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":58
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_N_NOTIFY_CQ); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":57
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_SRQ_RESIZE:
 *         return __pyx_enum.IBV_DEVICE_SRQ_RESIZE
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:
*/
  }

  /* "EnumTypeToPy":59
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_MEM_WINDOW);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":60
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_WINDOW); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":59
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_N_NOTIFY_CQ:
 *         return __pyx_enum.IBV_DEVICE_N_NOTIFY_CQ
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:
*/
  }

  /* "EnumTypeToPy":61
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_UD_IP_CSUM);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":62
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:
 *         return __pyx_enum.IBV_DEVICE_XRC
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_UD_IP_CSUM); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":61
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:
*/
  }

  /* "EnumTypeToPy":63
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_XRC
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_XRC);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":64
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:
 *         return __pyx_enum.IBV_DEVICE_XRC             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_XRC); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":63
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_UD_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_UD_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_XRC
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:
*/
  }

  /* "EnumTypeToPy":65
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:
 *         return __pyx_enum.IBV_DEVICE_XRC
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_MEM_MGT_EXTENSIONS);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":66
 *         return __pyx_enum.IBV_DEVICE_XRC
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_MGT_EXTENSIONS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":65
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_XRC:
 *         return __pyx_enum.IBV_DEVICE_XRC
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:
*/
  }

  /* "EnumTypeToPy":67
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_MEM_WINDOW_TYPE_2A);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":68
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_WINDOW_TYPE_2A); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":67
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_MGT_EXTENSIONS:
 *         return __pyx_enum.IBV_DEVICE_MEM_MGT_EXTENSIONS
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:
*/
  }

  /* "EnumTypeToPy":69
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_MEM_WINDOW_TYPE_2B);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":70
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_WINDOW_TYPE_2B); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":69
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2A:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2A
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:
*/
  }

  /* "EnumTypeToPy":71
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_RC_IP_CSUM);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":72
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RC_IP_CSUM); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":71
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MEM_WINDOW_TYPE_2B:
 *         return __pyx_enum.IBV_DEVICE_MEM_WINDOW_TYPE_2B
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:
*/
  }

  /* "EnumTypeToPy":73
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MANAGED_FLOW_STEERING:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_RAW_IP_CSUM);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":74
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM             # <<<<<<<<<<<<<<
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MANAGED_FLOW_STEERING:
 *         return __pyx_enum.IBV_DEVICE_MANAGED_FLOW_STEERING
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RAW_IP_CSUM); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":73
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RC_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RC_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MANAGED_FLOW_STEERING:
*/
  }

  /* "EnumTypeToPy":75
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MANAGED_FLOW_STEERING:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MANAGED_FLOW_STEERING
 *     else:
*/
  __pyx_t_1 = (__pyx_v_c_val == IBV_DEVICE_MANAGED_FLOW_STEERING);
  if (__pyx_t_1) {

    /* "EnumTypeToPy":76
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MANAGED_FLOW_STEERING:
 *         return __pyx_enum.IBV_DEVICE_MANAGED_FLOW_STEERING             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MANAGED_FLOW_STEERING); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":75
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_RAW_IP_CSUM:
 *         return __pyx_enum.IBV_DEVICE_RAW_IP_CSUM
 *     elif c_val == ibv_device_cap_flags.IBV_DEVICE_MANAGED_FLOW_STEERING:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.IBV_DEVICE_MANAGED_FLOW_STEERING
 *     else:
*/
  }

  /* "EnumTypeToPy":78
 *         return __pyx_enum.IBV_DEVICE_MANAGED_FLOW_STEERING
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":79
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_5 = __pyx_v___pyx_enum; 
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_13 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 79, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(ibv_device_cap_flags c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":44
 *     to create it for such purposes.
 *     """
 *     def __init__(self, name, guid, node_type, transport_type, index):             # <<<<<<<<<<<<<<
 *         self._node_type = node_type
 *         self._transport_type = transport_type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_1__init__(PyObject *__pyx_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_7pyverbs_6device_6Device_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_1__init__(PyObject *__pyx_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_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_guid = 0;
  PyObject *__pyx_v_node_type = 0;
  PyObject *__pyx_v_transport_type = 0;
  PyObject *__pyx_v_index = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,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("__init__ (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_self,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_guid,&__pyx_mstate_global->__pyx_n_u_node_type,&__pyx_mstate_global->__pyx_n_u_transport_type,&__pyx_mstate_global->__pyx_n_u_index,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, 44, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 44, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 44, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 44, __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, 44, __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, 44, __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, 44, __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, 44, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, i); __PYX_ERR(0, 44, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      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, 44, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 44, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 44, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 44, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 44, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 44, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
    __pyx_v_guid = values[2];
    __pyx_v_node_type = values[3];
    __pyx_v_transport_type = values[4];
    __pyx_v_index = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 44, __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("pyverbs.device.Device.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device___init__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_guid, __pyx_v_node_type, __pyx_v_transport_type, __pyx_v_index);

  /* 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_7pyverbs_6device_6Device___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_guid, PyObject *__pyx_v_node_type, PyObject *__pyx_v_transport_type, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":45
 *     """
 *     def __init__(self, name, guid, node_type, transport_type, index):
 *         self._node_type = node_type             # <<<<<<<<<<<<<<
 *         self._transport_type = transport_type
 *         self._name = name
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_node_type_2, __pyx_v_node_type) < (0)) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "pyverbs/device.pyx":46
 *     def __init__(self, name, guid, node_type, transport_type, index):
 *         self._node_type = node_type
 *         self._transport_type = transport_type             # <<<<<<<<<<<<<<
 *         self._name = name
 *         self._guid = guid
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_transport_type_2, __pyx_v_transport_type) < (0)) __PYX_ERR(0, 46, __pyx_L1_error)

  /* "pyverbs/device.pyx":47
 *         self._node_type = node_type
 *         self._transport_type = transport_type
 *         self._name = name             # <<<<<<<<<<<<<<
 *         self._guid = guid
 *         self._index = index
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_v_name) < (0)) __PYX_ERR(0, 47, __pyx_L1_error)

  /* "pyverbs/device.pyx":48
 *         self._transport_type = transport_type
 *         self._name = name
 *         self._guid = guid             # <<<<<<<<<<<<<<
 *         self._index = index
 * 
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_guid_2, __pyx_v_guid) < (0)) __PYX_ERR(0, 48, __pyx_L1_error)

  /* "pyverbs/device.pyx":49
 *         self._name = name
 *         self._guid = guid
 *         self._index = index             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_index_2, __pyx_v_index) < (0)) __PYX_ERR(0, 49, __pyx_L1_error)

  /* "pyverbs/device.pyx":44
 *     to create it for such purposes.
 *     """
 *     def __init__(self, name, guid, node_type, transport_type, index):             # <<<<<<<<<<<<<<
 *         self._node_type = node_type
 *         self._transport_type = transport_type
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.Device.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":51
 *         self._index = index
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self._name
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_3name(PyObject *__pyx_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_7pyverbs_6device_6Device_3name = {"name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_3name, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_3name(PyObject *__pyx_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_self = 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("name (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_self,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, 51, __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, 51, __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, "name", 0) < (0)) __PYX_ERR(0, 51, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("name", 1, 1, 1, i); __PYX_ERR(0, 51, __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, 51, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 51, __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("pyverbs.device.Device.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device_2name(__pyx_self, __pyx_v_self);

  /* 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_7pyverbs_6device_6Device_2name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("name", 0);

  /* "pyverbs/device.pyx":53
 *     @property
 *     def name(self):
 *         return self._name             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":51
 *         self._index = index
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self._name
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Device.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":55
 *         return self._name
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def node_type(self):
 *         return self._node_type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_5node_type(PyObject *__pyx_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_7pyverbs_6device_6Device_5node_type = {"node_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_5node_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_5node_type(PyObject *__pyx_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_self = 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("node_type (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_self,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, 55, __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, 55, __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, "node_type", 0) < (0)) __PYX_ERR(0, 55, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("node_type", 1, 1, 1, i); __PYX_ERR(0, 55, __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, 55, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("node_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 55, __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("pyverbs.device.Device.node_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device_4node_type(__pyx_self, __pyx_v_self);

  /* 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_7pyverbs_6device_6Device_4node_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("node_type", 0);

  /* "pyverbs/device.pyx":57
 *     @property
 *     def node_type(self):
 *         return self._node_type             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_node_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":55
 *         return self._name
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def node_type(self):
 *         return self._node_type
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Device.node_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":59
 *         return self._node_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def transport_type(self):
 *         return self._transport_type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_7transport_type(PyObject *__pyx_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_7pyverbs_6device_6Device_7transport_type = {"transport_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_7transport_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_7transport_type(PyObject *__pyx_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_self = 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("transport_type (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_self,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, 59, __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, 59, __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, "transport_type", 0) < (0)) __PYX_ERR(0, 59, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("transport_type", 1, 1, 1, i); __PYX_ERR(0, 59, __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, 59, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transport_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 59, __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("pyverbs.device.Device.transport_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device_6transport_type(__pyx_self, __pyx_v_self);

  /* 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_7pyverbs_6device_6Device_6transport_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("transport_type", 0);

  /* "pyverbs/device.pyx":61
 *     @property
 *     def transport_type(self):
 *         return self._transport_type             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_transport_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":59
 *         return self._node_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def transport_type(self):
 *         return self._transport_type
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Device.transport_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":63
 *         return self._transport_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def guid(self):
 *         return self._guid
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_9guid(PyObject *__pyx_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_7pyverbs_6device_6Device_9guid = {"guid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_9guid, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_9guid(PyObject *__pyx_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_self = 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("guid (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_self,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, 63, __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, 63, __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, "guid", 0) < (0)) __PYX_ERR(0, 63, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("guid", 1, 1, 1, i); __PYX_ERR(0, 63, __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, 63, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("guid", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 63, __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("pyverbs.device.Device.guid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device_8guid(__pyx_self, __pyx_v_self);

  /* 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_7pyverbs_6device_6Device_8guid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("guid", 0);

  /* "pyverbs/device.pyx":65
 *     @property
 *     def guid(self):
 *         return self._guid             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_guid_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":63
 *         return self._transport_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def guid(self):
 *         return self._guid
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Device.guid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":67
 *         return self._guid
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index(self):
 *         return self._index
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_11index(PyObject *__pyx_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_7pyverbs_6device_6Device_11index = {"index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_11index, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_11index(PyObject *__pyx_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_self = 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("index (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_self,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, 67, __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, 67, __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, "index", 0) < (0)) __PYX_ERR(0, 67, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("index", 1, 1, 1, i); __PYX_ERR(0, 67, __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, 67, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("index", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 67, __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("pyverbs.device.Device.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device_10index(__pyx_self, __pyx_v_self);

  /* 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_7pyverbs_6device_6Device_10index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("index", 0);

  /* "pyverbs/device.pyx":69
 *     @property
 *     def index(self):
 *         return self._index             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":67
 *         return self._guid
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index(self):
 *         return self._index
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Device.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":71
 *         return self._index
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'Device {dev}, node type {ntype}, transport type {ttype},' \
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6Device_13__str__(PyObject *__pyx_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_7pyverbs_6device_6Device_13__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6Device_13__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6Device_13__str__(PyObject *__pyx_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_self = 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("__str__ (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_self,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, 71, __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, 71, __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, "__str__", 0) < (0)) __PYX_ERR(0, 71, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 71, __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, 71, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 71, __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("pyverbs.device.Device.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6Device_12__str__(__pyx_self, __pyx_v_self);

  /* 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_7pyverbs_6device_6Device_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":72
 * 
 *     def __str__(self):
 *         return 'Device {dev}, node type {ntype}, transport type {ttype},' \             # <<<<<<<<<<<<<<
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),
 *                 ntype=translate_node_type(self.node_type),
*/
  __Pyx_XDECREF(__pyx_r);

  /* "pyverbs/device.pyx":73
 *     def __str__(self):
 *         return 'Device {dev}, node type {ntype}, transport type {ttype},' \
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),             # <<<<<<<<<<<<<<
 *                 ntype=translate_node_type(self.node_type),
 *                 ttype=translate_transport_type(self.transport_type),
*/
  __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_Device_dev_node_type_ntype_trans;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }

  /* "pyverbs/device.pyx":74
 *         return 'Device {dev}, node type {ntype}, transport type {ttype},' \
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),
 *                 ntype=translate_node_type(self.node_type),             # <<<<<<<<<<<<<<
 *                 ttype=translate_transport_type(self.transport_type),
 *                 guid=guid_to_hex(self.guid), index=self._index)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_translate_node_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_node_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }

  /* "pyverbs/device.pyx":75
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),
 *                 ntype=translate_node_type(self.node_type),
 *                 ttype=translate_transport_type(self.transport_type),             # <<<<<<<<<<<<<<
 *                 guid=guid_to_hex(self.guid), index=self._index)
 * 
*/
  __pyx_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_translate_transport_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_transport_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }

  /* "pyverbs/device.pyx":76
 *                 ntype=translate_node_type(self.node_type),
 *                 ttype=translate_transport_type(self.transport_type),
 *                 guid=guid_to_hex(self.guid), index=self._index)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_guid_to_hex); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_guid); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_index_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL};
    __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dev, __pyx_t_3, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 73, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ntype, __pyx_t_5, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 73, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ttype, __pyx_t_7, __pyx_t_10, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 73, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_guid, __pyx_t_4, __pyx_t_10, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 73, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_index, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 73, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":71
 *         return self._index
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'Device {dev}, node type {ntype}, transport type {ttype},' \
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyverbs.device.Device.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":83
 *     Context class represents the C ibv_context.
 *     """
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Initializes a Context object. The function searches the IB devices list
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_7Context_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context___init__, "\n        Initializes a Context object. The function searches the IB devices list\n        for a device with the name provided by the user. If such a device is\n        found, it is opened (unless provider attributes were given).\n        In case of cmid argument, CMID object already holds an ibv_context\n        initiated pointer, hence all we have to do is assign this pointer to\n        Context's object pointer.\n        :param kwargs: Arguments:\n            * *name*\n              The device's name\n            * *attr*\n              Provider-specific attributes. If not None, it means that the\n              device will be opened by the provider and __init__ will return\n              after locating the requested device.\n            * *cmid*\n              A CMID object. If not None, it means that the device was already\n              opened by a CMID class, and only a pointer assignment is missing.\n            * *cmd_fd*\n              A command FD. If passed, the device will be imported from the\n              given cmd_fd using ibv_import_device.\n        :return: None\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyverbs_6device_7Context___init__;
#endif
static int __pyx_pw_7pyverbs_6device_7Context_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  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 = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("__init__", __pyx_kwds) == -1)) return -1;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return -1;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return -1;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context___init__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_7pyverbs_6device_7Context___init__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  int __pyx_v_count;
  struct ibv_device **__pyx_v_dev_list;
  struct __pyx_obj_7pyverbs_4cmid_CMID *__pyx_v_cmid = 0;
  PyObject *__pyx_v_provider_attr = NULL;
  PyObject *__pyx_v_cmd_fd = NULL;
  int __pyx_v_i;
  int __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;
  int __pyx_t_6;
  struct ibv_context *__pyx_t_7;
  char const *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  char *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":110
 *         cdef CMID cmid
 * 
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         self.pds = weakref.WeakSet()
 *         self.dms = weakref.WeakSet()
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":111
 * 
 *         super().__init__()
 *         self.pds = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.dms = weakref.WeakSet()
 *         self.ccs = weakref.WeakSet()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pds);
  __Pyx_DECREF(__pyx_v_self->pds);
  __pyx_v_self->pds = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":112
 *         super().__init__()
 *         self.pds = weakref.WeakSet()
 *         self.dms = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.ccs = weakref.WeakSet()
 *         self.cqs = weakref.WeakSet()
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dms);
  __Pyx_DECREF(__pyx_v_self->dms);
  __pyx_v_self->dms = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":113
 *         self.pds = weakref.WeakSet()
 *         self.dms = weakref.WeakSet()
 *         self.ccs = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.cqs = weakref.WeakSet()
 *         self.qps = weakref.WeakSet()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __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[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__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, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->ccs);
  __Pyx_DECREF(__pyx_v_self->ccs);
  __pyx_v_self->ccs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":114
 *         self.dms = weakref.WeakSet()
 *         self.ccs = weakref.WeakSet()
 *         self.cqs = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.qps = weakref.WeakSet()
 *         self.xrcds = weakref.WeakSet()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cqs);
  __Pyx_DECREF(__pyx_v_self->cqs);
  __pyx_v_self->cqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":115
 *         self.ccs = weakref.WeakSet()
 *         self.cqs = weakref.WeakSet()
 *         self.qps = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.xrcds = weakref.WeakSet()
 *         self.vars = weakref.WeakSet()
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->qps);
  __Pyx_DECREF(__pyx_v_self->qps);
  __pyx_v_self->qps = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":116
 *         self.cqs = weakref.WeakSet()
 *         self.qps = weakref.WeakSet()
 *         self.xrcds = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.vars = weakref.WeakSet()
 *         self.uars = weakref.WeakSet()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __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[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__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, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->xrcds);
  __Pyx_DECREF(__pyx_v_self->xrcds);
  __pyx_v_self->xrcds = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":117
 *         self.qps = weakref.WeakSet()
 *         self.xrcds = weakref.WeakSet()
 *         self.vars = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.uars = weakref.WeakSet()
 *         self.pps = weakref.WeakSet()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->vars);
  __Pyx_DECREF(__pyx_v_self->vars);
  __pyx_v_self->vars = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":118
 *         self.xrcds = weakref.WeakSet()
 *         self.vars = weakref.WeakSet()
 *         self.uars = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.pps = weakref.WeakSet()
 *         self.sched_nodes = weakref.WeakSet()
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->uars);
  __Pyx_DECREF(__pyx_v_self->uars);
  __pyx_v_self->uars = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":119
 *         self.vars = weakref.WeakSet()
 *         self.uars = weakref.WeakSet()
 *         self.pps = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.sched_nodes = weakref.WeakSet()
 *         self.sched_leafs = weakref.WeakSet()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __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[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__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, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pps);
  __Pyx_DECREF(__pyx_v_self->pps);
  __pyx_v_self->pps = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":120
 *         self.uars = weakref.WeakSet()
 *         self.pps = weakref.WeakSet()
 *         self.sched_nodes = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.sched_leafs = weakref.WeakSet()
 *         self.dr_domains = weakref.WeakSet()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->sched_nodes);
  __Pyx_DECREF(__pyx_v_self->sched_nodes);
  __pyx_v_self->sched_nodes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":121
 *         self.pps = weakref.WeakSet()
 *         self.sched_nodes = weakref.WeakSet()
 *         self.sched_leafs = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.dr_domains = weakref.WeakSet()
 *         self.wqs = weakref.WeakSet()
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->sched_leafs);
  __Pyx_DECREF(__pyx_v_self->sched_leafs);
  __pyx_v_self->sched_leafs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":122
 *         self.sched_nodes = weakref.WeakSet()
 *         self.sched_leafs = weakref.WeakSet()
 *         self.dr_domains = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.wqs = weakref.WeakSet()
 *         self.rwq_ind_tbls = weakref.WeakSet()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __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[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__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, 122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dr_domains);
  __Pyx_DECREF(__pyx_v_self->dr_domains);
  __pyx_v_self->dr_domains = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":123
 *         self.sched_leafs = weakref.WeakSet()
 *         self.dr_domains = weakref.WeakSet()
 *         self.wqs = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.rwq_ind_tbls = weakref.WeakSet()
 *         self.crypto_logins = weakref.WeakSet()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->wqs);
  __Pyx_DECREF(__pyx_v_self->wqs);
  __pyx_v_self->wqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":124
 *         self.dr_domains = weakref.WeakSet()
 *         self.wqs = weakref.WeakSet()
 *         self.rwq_ind_tbls = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.crypto_logins = weakref.WeakSet()
 *         self.event_channels = weakref.WeakSet()
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->rwq_ind_tbls);
  __Pyx_DECREF(__pyx_v_self->rwq_ind_tbls);
  __pyx_v_self->rwq_ind_tbls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":125
 *         self.wqs = weakref.WeakSet()
 *         self.rwq_ind_tbls = weakref.WeakSet()
 *         self.crypto_logins = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.event_channels = weakref.WeakSet()
 *         self.dmahs = weakref.WeakSet()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __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[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__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, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->crypto_logins);
  __Pyx_DECREF(__pyx_v_self->crypto_logins);
  __pyx_v_self->crypto_logins = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":126
 *         self.rwq_ind_tbls = weakref.WeakSet()
 *         self.crypto_logins = weakref.WeakSet()
 *         self.event_channels = weakref.WeakSet()             # <<<<<<<<<<<<<<
 *         self.dmahs = weakref.WeakSet()
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->event_channels);
  __Pyx_DECREF(__pyx_v_self->event_channels);
  __pyx_v_self->event_channels = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":127
 *         self.crypto_logins = weakref.WeakSet()
 *         self.event_channels = weakref.WeakSet()
 *         self.dmahs = weakref.WeakSet()             # <<<<<<<<<<<<<<
 * 
 *         self.name = kwargs.get('name')
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dmahs);
  __Pyx_DECREF(__pyx_v_self->dmahs);
  __pyx_v_self->dmahs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":129
 *         self.dmahs = weakref.WeakSet()
 * 
 *         self.name = kwargs.get('name')             # <<<<<<<<<<<<<<
 *         provider_attr = kwargs.get('attr')
 *         cmid = kwargs.get('cmid')
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":130
 * 
 *         self.name = kwargs.get('name')
 *         provider_attr = kwargs.get('attr')             # <<<<<<<<<<<<<<
 *         cmid = kwargs.get('cmid')
 *         cmd_fd = kwargs.get('cmd_fd')
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_attr, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_provider_attr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":131
 *         self.name = kwargs.get('name')
 *         provider_attr = kwargs.get('attr')
 *         cmid = kwargs.get('cmid')             # <<<<<<<<<<<<<<
 *         cmd_fd = kwargs.get('cmd_fd')
 *         if cmid is not None:
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_cmid, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyverbs_4cmid_CMID))))) __PYX_ERR(0, 131, __pyx_L1_error)
  __pyx_v_cmid = ((struct __pyx_obj_7pyverbs_4cmid_CMID *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":132
 *         provider_attr = kwargs.get('attr')
 *         cmid = kwargs.get('cmid')
 *         cmd_fd = kwargs.get('cmd_fd')             # <<<<<<<<<<<<<<
 *         if cmid is not None:
 *             self.context = cmid.id.verbs
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_cmd_fd, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cmd_fd = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":133
 *         cmid = kwargs.get('cmid')
 *         cmd_fd = kwargs.get('cmd_fd')
 *         if cmid is not None:             # <<<<<<<<<<<<<<
 *             self.context = cmid.id.verbs
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
*/
  __pyx_t_6 = (((PyObject *)__pyx_v_cmid) != Py_None);
  if (__pyx_t_6) {

    /* "pyverbs/device.pyx":134
 *         cmd_fd = kwargs.get('cmd_fd')
 *         if cmid is not None:
 *             self.context = cmid.id.verbs             # <<<<<<<<<<<<<<
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
 *             cmid.ctx = self
*/
    __pyx_t_7 = __pyx_v_cmid->id->verbs;
    __pyx_v_self->context = __pyx_t_7;

    /* "pyverbs/device.pyx":135
 *         if cmid is not None:
 *             self.context = cmid.id.verbs
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))             # <<<<<<<<<<<<<<
 *             cmid.ctx = self
 *             return
*/
    __pyx_t_8 = ibv_get_device_name(__pyx_v_self->context->device);
    __pyx_t_9 = __Pyx_ssize_strlen(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 135, __pyx_L1_error)
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_8, 0, __pyx_t_9, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->name);
    __Pyx_DECREF(__pyx_v_self->name);
    __pyx_v_self->name = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":136
 *             self.context = cmid.id.verbs
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
 *             cmid.ctx = self             # <<<<<<<<<<<<<<
 *             return
 *         if cmd_fd is not None:
*/
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    __Pyx_GOTREF(__pyx_v_cmid->ctx);
    __Pyx_DECREF(__pyx_v_cmid->ctx);
    __pyx_v_cmid->ctx = ((PyObject *)__pyx_v_self);

    /* "pyverbs/device.pyx":137
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
 *             cmid.ctx = self
 *             return             # <<<<<<<<<<<<<<
 *         if cmd_fd is not None:
 *             self.context = v.ibv_import_device(cmd_fd)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyverbs/device.pyx":133
 *         cmid = kwargs.get('cmid')
 *         cmd_fd = kwargs.get('cmd_fd')
 *         if cmid is not None:             # <<<<<<<<<<<<<<
 *             self.context = cmid.id.verbs
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
*/
  }

  /* "pyverbs/device.pyx":138
 *             cmid.ctx = self
 *             return
 *         if cmd_fd is not None:             # <<<<<<<<<<<<<<
 *             self.context = v.ibv_import_device(cmd_fd)
 *             if self.context == NULL:
*/
  __pyx_t_6 = (__pyx_v_cmd_fd != Py_None);
  if (__pyx_t_6) {

    /* "pyverbs/device.pyx":139
 *             return
 *         if cmd_fd is not None:
 *             self.context = v.ibv_import_device(cmd_fd)             # <<<<<<<<<<<<<<
 *             if self.context == NULL:
 *                 raise PyverbsRDMAErrno('Failed to import device')
*/
    __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_v_cmd_fd); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
    __pyx_v_self->context = ibv_import_device(__pyx_t_10);

    /* "pyverbs/device.pyx":140
 *         if cmd_fd is not None:
 *             self.context = v.ibv_import_device(cmd_fd)
 *             if self.context == NULL:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno('Failed to import device')
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
*/
    __pyx_t_6 = (__pyx_v_self->context == NULL);
    if (unlikely(__pyx_t_6)) {

      /* "pyverbs/device.pyx":141
 *             self.context = v.ibv_import_device(cmd_fd)
 *             if self.context == NULL:
 *                 raise PyverbsRDMAErrno('Failed to import device')             # <<<<<<<<<<<<<<
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
 *             return
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __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[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Failed_to_import_device};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__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, 141, __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, 141, __pyx_L1_error)

      /* "pyverbs/device.pyx":140
 *         if cmd_fd is not None:
 *             self.context = v.ibv_import_device(cmd_fd)
 *             if self.context == NULL:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno('Failed to import device')
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
*/
    }

    /* "pyverbs/device.pyx":142
 *             if self.context == NULL:
 *                 raise PyverbsRDMAErrno('Failed to import device')
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))             # <<<<<<<<<<<<<<
 *             return
 * 
*/
    __pyx_t_8 = ibv_get_device_name(__pyx_v_self->context->device);
    __pyx_t_9 = __Pyx_ssize_strlen(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 142, __pyx_L1_error)
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_8, 0, __pyx_t_9, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->name);
    __Pyx_DECREF(__pyx_v_self->name);
    __pyx_v_self->name = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":143
 *                 raise PyverbsRDMAErrno('Failed to import device')
 *             self.name = str(v.ibv_get_device_name(self.context.device).decode('utf-8'))
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if self.name is None:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyverbs/device.pyx":138
 *             cmid.ctx = self
 *             return
 *         if cmd_fd is not None:             # <<<<<<<<<<<<<<
 *             self.context = v.ibv_import_device(cmd_fd)
 *             if self.context == NULL:
*/
  }

  /* "pyverbs/device.pyx":145
 *             return
 * 
 *         if self.name is None:             # <<<<<<<<<<<<<<
 *             raise PyverbsUserError('Device name must be provided')
 *         dev_list = v.ibv_get_device_list(&count)
*/
  __pyx_t_6 = (__pyx_v_self->name == Py_None);
  if (unlikely(__pyx_t_6)) {

    /* "pyverbs/device.pyx":146
 * 
 *         if self.name is None:
 *             raise PyverbsUserError('Device name must be provided')             # <<<<<<<<<<<<<<
 *         dev_list = v.ibv_get_device_list(&count)
 *         if dev_list == NULL:
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyverbsUserError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Device_name_must_be_provided};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __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, 146, __pyx_L1_error)

    /* "pyverbs/device.pyx":145
 *             return
 * 
 *         if self.name is None:             # <<<<<<<<<<<<<<
 *             raise PyverbsUserError('Device name must be provided')
 *         dev_list = v.ibv_get_device_list(&count)
*/
  }

  /* "pyverbs/device.pyx":147
 *         if self.name is None:
 *             raise PyverbsUserError('Device name must be provided')
 *         dev_list = v.ibv_get_device_list(&count)             # <<<<<<<<<<<<<<
 *         if dev_list == NULL:
 *             raise PyverbsRDMAError('Failed to get devices list')
*/
  __pyx_v_dev_list = ibv_get_device_list((&__pyx_v_count));

  /* "pyverbs/device.pyx":148
 *             raise PyverbsUserError('Device name must be provided')
 *         dev_list = v.ibv_get_device_list(&count)
 *         if dev_list == NULL:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to get devices list')
 *         try:
*/
  __pyx_t_6 = (__pyx_v_dev_list == NULL);
  if (unlikely(__pyx_t_6)) {

    /* "pyverbs/device.pyx":149
 *         dev_list = v.ibv_get_device_list(&count)
 *         if dev_list == NULL:
 *             raise PyverbsRDMAError('Failed to get devices list')             # <<<<<<<<<<<<<<
 *         try:
 *             for i in range(count):
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Failed_to_get_devices_list};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__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, 149, __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, 149, __pyx_L1_error)

    /* "pyverbs/device.pyx":148
 *             raise PyverbsUserError('Device name must be provided')
 *         dev_list = v.ibv_get_device_list(&count)
 *         if dev_list == NULL:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to get devices list')
 *         try:
*/
  }

  /* "pyverbs/device.pyx":150
 *         if dev_list == NULL:
 *             raise PyverbsRDMAError('Failed to get devices list')
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dev_list[i].name.decode() == self.name:
*/
  /*try:*/ {

    /* "pyverbs/device.pyx":151
 *             raise PyverbsRDMAError('Failed to get devices list')
 *         try:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dev_list[i].name.decode() == self.name:
 *                     if provider_attr is not None:
*/
    __pyx_t_10 = __pyx_v_count;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "pyverbs/device.pyx":152
 *         try:
 *             for i in range(count):
 *                 if dev_list[i].name.decode() == self.name:             # <<<<<<<<<<<<<<
 *                     if provider_attr is not None:
 *                         # A provider opens its own context, we're just
*/
      __pyx_t_13 = (__pyx_v_dev_list[__pyx_v_i])->name;
      __pyx_t_9 = __Pyx_ssize_strlen(__pyx_t_13); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 152, __pyx_L9_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, __pyx_t_9, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_v_self->name, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 152, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "pyverbs/device.pyx":153
 *             for i in range(count):
 *                 if dev_list[i].name.decode() == self.name:
 *                     if provider_attr is not None:             # <<<<<<<<<<<<<<
 *                         # A provider opens its own context, we're just
 *                         # setting its IB device
*/
        __pyx_t_6 = (__pyx_v_provider_attr != Py_None);
        if (__pyx_t_6) {

          /* "pyverbs/device.pyx":156
 *                         # A provider opens its own context, we're just
 *                         # setting its IB device
 *                         self.device = dev_list[i]             # <<<<<<<<<<<<<<
 *                         return
 *                     self.context = v.ibv_open_device(dev_list[i])
*/
          __pyx_v_self->device = (__pyx_v_dev_list[__pyx_v_i]);

          /* "pyverbs/device.pyx":157
 *                         # setting its IB device
 *                         self.device = dev_list[i]
 *                         return             # <<<<<<<<<<<<<<
 *                     self.context = v.ibv_open_device(dev_list[i])
 *                     if self.context == NULL:
*/
          __pyx_r = 0;
          goto __pyx_L8_return;

          /* "pyverbs/device.pyx":153
 *             for i in range(count):
 *                 if dev_list[i].name.decode() == self.name:
 *                     if provider_attr is not None:             # <<<<<<<<<<<<<<
 *                         # A provider opens its own context, we're just
 *                         # setting its IB device
*/
        }

        /* "pyverbs/device.pyx":158
 *                         self.device = dev_list[i]
 *                         return
 *                     self.context = v.ibv_open_device(dev_list[i])             # <<<<<<<<<<<<<<
 *                     if self.context == NULL:
 *                         raise PyverbsRDMAErrno('Failed to open device {dev}'.
*/
        __pyx_v_self->context = ibv_open_device((__pyx_v_dev_list[__pyx_v_i]));

        /* "pyverbs/device.pyx":159
 *                         return
 *                     self.context = v.ibv_open_device(dev_list[i])
 *                     if self.context == NULL:             # <<<<<<<<<<<<<<
 *                         raise PyverbsRDMAErrno('Failed to open device {dev}'.
 *                                                format(dev=self.name))
*/
        __pyx_t_6 = (__pyx_v_self->context == NULL);
        if (unlikely(__pyx_t_6)) {

          /* "pyverbs/device.pyx":160
 *                     self.context = v.ibv_open_device(dev_list[i])
 *                     if self.context == NULL:
 *                         raise PyverbsRDMAErrno('Failed to open device {dev}'.             # <<<<<<<<<<<<<<
 *                                                format(dev=self.name))
 *                     self.logger.debug('Context: opened device {dev}'.
*/
          __pyx_t_4 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "pyverbs/device.pyx":161
 *                     if self.context == NULL:
 *                         raise PyverbsRDMAErrno('Failed to open device {dev}'.
 *                                                format(dev=self.name))             # <<<<<<<<<<<<<<
 *                     self.logger.debug('Context: opened device {dev}'.
 *                                       format(dev=self.name))
*/
          __pyx_t_14 = __pyx_mstate_global->__pyx_kp_u_Failed_to_open_device_dev;
          __Pyx_INCREF(__pyx_t_14);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, NULL};
            __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 161, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dev, __pyx_v_self->name, __pyx_t_15, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 161, __pyx_L9_error)
            __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
            assert(__pyx_t_4);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L9_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, 160, __pyx_L9_error)

          /* "pyverbs/device.pyx":159
 *                         return
 *                     self.context = v.ibv_open_device(dev_list[i])
 *                     if self.context == NULL:             # <<<<<<<<<<<<<<
 *                         raise PyverbsRDMAErrno('Failed to open device {dev}'.
 *                                                format(dev=self.name))
*/
        }

        /* "pyverbs/device.pyx":162
 *                         raise PyverbsRDMAErrno('Failed to open device {dev}'.
 *                                                format(dev=self.name))
 *                     self.logger.debug('Context: opened device {dev}'.             # <<<<<<<<<<<<<<
 *                                       format(dev=self.name))
 *                     break
*/
        __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.logger;
        __Pyx_INCREF(__pyx_t_2);

        /* "pyverbs/device.pyx":163
 *                                                format(dev=self.name))
 *                     self.logger.debug('Context: opened device {dev}'.
 *                                       format(dev=self.name))             # <<<<<<<<<<<<<<
 *                     break
 *             else:
*/
        __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_Context_opened_device_dev;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 163, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dev, __pyx_v_self->name, __pyx_t_15, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 163, __pyx_L9_error)
          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_debug, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__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, 162, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyverbs/device.pyx":164
 *                     self.logger.debug('Context: opened device {dev}'.
 *                                       format(dev=self.name))
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 raise PyverbsRDMAError('Failed to find device {dev}'.
*/
        goto __pyx_L12_break;

        /* "pyverbs/device.pyx":152
 *         try:
 *             for i in range(count):
 *                 if dev_list[i].name.decode() == self.name:             # <<<<<<<<<<<<<<
 *                     if provider_attr is not None:
 *                         # A provider opens its own context, we're just
*/
      }
    }
    /*else*/ {

      /* "pyverbs/device.pyx":166
 *                     break
 *             else:
 *                 raise PyverbsRDMAError('Failed to find device {dev}'.             # <<<<<<<<<<<<<<
 *                                        format(dev=self.name))
 *         finally:
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "pyverbs/device.pyx":167
 *             else:
 *                 raise PyverbsRDMAError('Failed to find device {dev}'.
 *                                        format(dev=self.name))             # <<<<<<<<<<<<<<
 *         finally:
 *             v.ibv_free_device_list(dev_list)
*/
      __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_Failed_to_find_device_dev;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
        __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 167, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dev, __pyx_v_self->name, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 167, __pyx_L9_error)
        __pyx_t_15 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 167, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_15);
      }
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_15};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L9_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, 166, __pyx_L9_error)
    }
    __pyx_L12_break:;
  }

  /* "pyverbs/device.pyx":169
 *                                        format(dev=self.name))
 *         finally:
 *             v.ibv_free_device_list(dev_list)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  /*finally:*/ {
    /*normal exit:*/{
      ibv_free_device_list(__pyx_v_dev_list);
      goto __pyx_L10;
    }
    __pyx_L9_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__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_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        ibv_free_device_list(__pyx_v_dev_list);
      }
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L8_return: {
      __pyx_t_23 = __pyx_r;
      ibv_free_device_list(__pyx_v_dev_list);
      __pyx_r = __pyx_t_23;
      goto __pyx_L0;
    }
    __pyx_L10:;
  }

  /* "pyverbs/device.pyx":83
 *     Context class represents the C ibv_context.
 *     """
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Initializes a Context object. The function searches the IB devices list
*/

  /* function exit code */
  __pyx_r = 0;
  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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyverbs.device.Context.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cmid);
  __Pyx_XDECREF(__pyx_v_provider_attr);
  __Pyx_XDECREF(__pyx_v_cmd_fd);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":171
 *             v.ibv_free_device_list(dev_list)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Closes the inner IB device.
*/

/* Python wrapper */
static void __pyx_pw_7pyverbs_6device_7Context_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7pyverbs_6device_7Context_3__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_7pyverbs_6device_7Context_2__dealloc__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static void __pyx_pf_7pyverbs_6device_7Context_2__dealloc__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyverbs/device.pyx":176
 *         :return: None
 *         """
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     cpdef close(self):
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7pyverbs_6device_Context *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.close(((struct __pyx_obj_7pyverbs_4base_PyverbsCM *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":171
 *             v.ibv_free_device_list(dev_list)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Closes the inner IB device.
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("pyverbs.device.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyverbs/device.pyx":178
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         if self.context != NULL:
 *             if self.logger:
*/

static PyObject *__pyx_pw_7pyverbs_6device_7Context_5close(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_7pyverbs_6device_7Context_close(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_rc;
  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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 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_7pyverbs_6device_Context &&
  __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_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyverbs_6device_7Context_5close)) {
        __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[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, 178, __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
  }

  /* "pyverbs/device.pyx":179
 * 
 *     cpdef close(self):
 *         if self.context != NULL:             # <<<<<<<<<<<<<<
 *             if self.logger:
 *                 self.logger.debug('Closing Context')
*/
  __pyx_t_6 = (__pyx_v_self->context != NULL);
  if (__pyx_t_6) {

    /* "pyverbs/device.pyx":180
 *     cpdef close(self):
 *         if self.context != NULL:
 *             if self.logger:             # <<<<<<<<<<<<<<
 *                 self.logger.debug('Closing Context')
 *             close_weakrefs([self.qps, self.crypto_logins, self.rwq_ind_tbls, self.wqs, self.ccs, self.cqs,
*/
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx_base.__pyx_base.logger); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 180, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "pyverbs/device.pyx":181
 *         if self.context != NULL:
 *             if self.logger:
 *                 self.logger.debug('Closing Context')             # <<<<<<<<<<<<<<
 *             close_weakrefs([self.qps, self.crypto_logins, self.rwq_ind_tbls, self.wqs, self.ccs, self.cqs,
 *                             self.dms, self.pds, self.xrcds, self.vars, self.sched_leafs,
*/
      __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.logger;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Closing_Context};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_debug, __pyx_callargs+__pyx_t_5, (2-__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, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyverbs/device.pyx":180
 *     cpdef close(self):
 *         if self.context != NULL:
 *             if self.logger:             # <<<<<<<<<<<<<<
 *                 self.logger.debug('Closing Context')
 *             close_weakrefs([self.qps, self.crypto_logins, self.rwq_ind_tbls, self.wqs, self.ccs, self.cqs,
*/
    }

    /* "pyverbs/device.pyx":182
 *             if self.logger:
 *                 self.logger.debug('Closing Context')
 *             close_weakrefs([self.qps, self.crypto_logins, self.rwq_ind_tbls, self.wqs, self.ccs, self.cqs,             # <<<<<<<<<<<<<<
 *                             self.dms, self.pds, self.xrcds, self.vars, self.sched_leafs,
 *                             self.sched_nodes, self.dr_domains, self.event_channels, self.dmahs])
*/
    __pyx_t_1 = PyList_New(15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->qps);
    __Pyx_GIVEREF(__pyx_v_self->qps);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->qps) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->crypto_logins);
    __Pyx_GIVEREF(__pyx_v_self->crypto_logins);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->crypto_logins) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->rwq_ind_tbls);
    __Pyx_GIVEREF(__pyx_v_self->rwq_ind_tbls);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->rwq_ind_tbls) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->wqs);
    __Pyx_GIVEREF(__pyx_v_self->wqs);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->wqs) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->ccs);
    __Pyx_GIVEREF(__pyx_v_self->ccs);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->ccs) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->cqs);
    __Pyx_GIVEREF(__pyx_v_self->cqs);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->cqs) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->dms);
    __Pyx_GIVEREF(__pyx_v_self->dms);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->dms) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->pds);
    __Pyx_GIVEREF(__pyx_v_self->pds);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->pds) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->xrcds);
    __Pyx_GIVEREF(__pyx_v_self->xrcds);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_v_self->xrcds) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->vars);
    __Pyx_GIVEREF(__pyx_v_self->vars);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_v_self->vars) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->sched_leafs);
    __Pyx_GIVEREF(__pyx_v_self->sched_leafs);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_v_self->sched_leafs) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->sched_nodes);
    __Pyx_GIVEREF(__pyx_v_self->sched_nodes);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_v_self->sched_nodes) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->dr_domains);
    __Pyx_GIVEREF(__pyx_v_self->dr_domains);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_v_self->dr_domains) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->event_channels);
    __Pyx_GIVEREF(__pyx_v_self->event_channels);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_v_self->event_channels) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->dmahs);
    __Pyx_GIVEREF(__pyx_v_self->dmahs);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_v_self->dmahs) != (0)) __PYX_ERR(0, 182, __pyx_L1_error);
    __pyx_t_2 = __pyx_f_7pyverbs_4base_close_weakrefs(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":185
 *                             self.dms, self.pds, self.xrcds, self.vars, self.sched_leafs,
 *                             self.sched_nodes, self.dr_domains, self.event_channels, self.dmahs])
 *             rc = v.ibv_close_device(self.context)             # <<<<<<<<<<<<<<
 *             if rc != 0:
 *                 raise PyverbsRDMAErrno(f'Failed to close device {self.name}')
*/
    __pyx_v_rc = ibv_close_device(__pyx_v_self->context);

    /* "pyverbs/device.pyx":186
 *                             self.sched_nodes, self.dr_domains, self.event_channels, self.dmahs])
 *             rc = v.ibv_close_device(self.context)
 *             if rc != 0:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno(f'Failed to close device {self.name}')
 *             self.context = NULL
*/
    __pyx_t_6 = (__pyx_v_rc != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyverbs/device.pyx":187
 *             rc = v.ibv_close_device(self.context)
 *             if rc != 0:
 *                 raise PyverbsRDMAErrno(f'Failed to close device {self.name}')             # <<<<<<<<<<<<<<
 *             self.context = NULL
 * 
*/
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_self->name, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_close_device, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __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, 187, __pyx_L1_error)

      /* "pyverbs/device.pyx":186
 *                             self.sched_nodes, self.dr_domains, self.event_channels, self.dmahs])
 *             rc = v.ibv_close_device(self.context)
 *             if rc != 0:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno(f'Failed to close device {self.name}')
 *             self.context = NULL
*/
    }

    /* "pyverbs/device.pyx":188
 *             if rc != 0:
 *                 raise PyverbsRDMAErrno(f'Failed to close device {self.name}')
 *             self.context = NULL             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
    __pyx_v_self->context = NULL;

    /* "pyverbs/device.pyx":179
 * 
 *     cpdef close(self):
 *         if self.context != NULL:             # <<<<<<<<<<<<<<
 *             if self.logger:
 *                 self.logger.debug('Closing Context')
*/
  }

  /* "pyverbs/device.pyx":178
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         if self.context != NULL:
 *             if self.logger:
*/

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyverbs.device.Context.close", __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_7pyverbs_6device_7Context_5close(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_7pyverbs_6device_7Context_5close = {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_5close, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_5close(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("close", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_4close(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_4close(struct __pyx_obj_7pyverbs_6device_Context *__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("close", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyverbs_6device_7Context_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __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("pyverbs.device.Context.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":190
 *             self.context = NULL
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def context(self):
 *         return <uintptr_t>self.context
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_7context_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7Context_7context_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_7pyverbs_6device_7Context_7context___get__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_7context___get__(struct __pyx_obj_7pyverbs_6device_Context *__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);

  /* "pyverbs/device.pyx":192
 *     @property
 *     def context(self):
 *         return <uintptr_t>self.context             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_FromSize_t(((uintptr_t)__pyx_v_self->context)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":190
 *             self.context = NULL
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def context(self):
 *         return <uintptr_t>self.context
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Context.context.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":194
 *         return <uintptr_t>self.context
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_comp_vectors(self):
 *         return self.context.num_comp_vectors
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_16num_comp_vectors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7Context_16num_comp_vectors_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_7pyverbs_6device_7Context_16num_comp_vectors___get__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_16num_comp_vectors___get__(struct __pyx_obj_7pyverbs_6device_Context *__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);

  /* "pyverbs/device.pyx":196
 *     @property
 *     def num_comp_vectors(self):
 *         return self.context.num_comp_vectors             # <<<<<<<<<<<<<<
 * 
 *     def query_device(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->context->num_comp_vectors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":194
 *         return <uintptr_t>self.context
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_comp_vectors(self):
 *         return self.context.num_comp_vectors
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Context.num_comp_vectors.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":198
 *         return self.context.num_comp_vectors
 * 
 *     def query_device(self):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's attributes.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_7query_device(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context_6query_device, "\n        Queries the device's attributes.\n        :return: A DeviceAttr object which holds the device's attributes as\n                 reported by the hardware.\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_7Context_7query_device = {"query_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_7query_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_6query_device};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_7query_device(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("query_device (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("query_device", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("query_device", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_6query_device(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_6query_device(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_dev_attr = NULL;
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_device", 0);

  /* "pyverbs/device.pyx":204
 *                  reported by the hardware.
 *         """
 *         dev_attr = DeviceAttr()             # <<<<<<<<<<<<<<
 *         rc = v.ibv_query_device(self.context, &dev_attr.dev_attr)
 *         if rc != 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_7pyverbs_6device_DeviceAttr, __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, 204, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_dev_attr = ((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":205
 *         """
 *         dev_attr = DeviceAttr()
 *         rc = v.ibv_query_device(self.context, &dev_attr.dev_attr)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query device {name}'.
*/
  __pyx_v_rc = ibv_query_device(__pyx_v_self->context, (&__pyx_v_dev_attr->dev_attr));

  /* "pyverbs/device.pyx":206
 *         dev_attr = DeviceAttr()
 *         rc = v.ibv_query_device(self.context, &dev_attr.dev_attr)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query device {name}'.
 *                                    format(name=self.name), rc)
*/
  __pyx_t_4 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_4)) {

    /* "pyverbs/device.pyx":207
 *         rc = v.ibv_query_device(self.context, &dev_attr.dev_attr)
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query device {name}'.             # <<<<<<<<<<<<<<
 *                                    format(name=self.name), rc)
 *         return dev_attr
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "pyverbs/device.pyx":208
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query device {name}'.
 *                                    format(name=self.name), rc)             # <<<<<<<<<<<<<<
 *         return dev_attr
 * 
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_device_name;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_3 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, NULL};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_self->name, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)
      __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_6, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __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, 207, __pyx_L1_error)

    /* "pyverbs/device.pyx":206
 *         dev_attr = DeviceAttr()
 *         rc = v.ibv_query_device(self.context, &dev_attr.dev_attr)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query device {name}'.
 *                                    format(name=self.name), rc)
*/
  }

  /* "pyverbs/device.pyx":209
 *             raise PyverbsRDMAError('Failed to query device {name}'.
 *                                    format(name=self.name), rc)
 *         return dev_attr             # <<<<<<<<<<<<<<
 * 
 *     def query_device_ex(self, QueryDeviceExInput ex_input = None):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_dev_attr);
  __pyx_r = ((PyObject *)__pyx_v_dev_attr);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":198
 *         return self.context.num_comp_vectors
 * 
 *     def query_device(self):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's attributes.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyverbs.device.Context.query_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dev_attr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":211
 *         return dev_attr
 * 
 *     def query_device_ex(self, QueryDeviceExInput ex_input = None):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's extended attributes.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_9query_device_ex(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context_8query_device_ex, "\n        Queries the device's extended attributes.\n        :param ex_input: An extensible input struct for possible future\n                         extensions\n        :return: DeviceAttrEx object\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_7Context_9query_device_ex = {"query_device_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_9query_device_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_8query_device_ex};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_9query_device_ex(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
) {
  struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_ex_input = 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("query_device_ex (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_ex_input,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, 211, __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, 211, __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, "query_device_ex", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *)Py_None));
    } 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, 211, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *)Py_None));
    }
    __pyx_v_ex_input = ((struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_device_ex", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 211, __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("pyverbs.device.Context.query_device_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ex_input), __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput, 1, "ex_input", 0))) __PYX_ERR(0, 211, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_8query_device_ex(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_ex_input);

  /* 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_7pyverbs_6device_7Context_8query_device_ex(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_ex_input) {
  struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_dev_attr_ex = NULL;
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_query_device_ex_input *__pyx_t_4;
  int __pyx_t_5;
  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("query_device_ex", 0);

  /* "pyverbs/device.pyx":218
 *         :return: DeviceAttrEx object
 *         """
 *         dev_attr_ex = DeviceAttrEx()             # <<<<<<<<<<<<<<
 *         rc = v.ibv_query_device_ex(self.context,
 *                                    &ex_input.input if ex_input is not None else NULL,
*/
  __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_7pyverbs_6device_DeviceAttrEx, __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, 218, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_dev_attr_ex = ((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":220
 *         dev_attr_ex = DeviceAttrEx()
 *         rc = v.ibv_query_device_ex(self.context,
 *                                    &ex_input.input if ex_input is not None else NULL,             # <<<<<<<<<<<<<<
 *                                    &dev_attr_ex.dev_attr)
 *         if rc != 0:
*/
  __pyx_t_5 = (((PyObject *)__pyx_v_ex_input) != Py_None);
  if (__pyx_t_5) {
    __pyx_t_4 = (&__pyx_v_ex_input->input);
  } else {
    __pyx_t_4 = NULL;
  }

  /* "pyverbs/device.pyx":219
 *         """
 *         dev_attr_ex = DeviceAttrEx()
 *         rc = v.ibv_query_device_ex(self.context,             # <<<<<<<<<<<<<<
 *                                    &ex_input.input if ex_input is not None else NULL,
 *                                    &dev_attr_ex.dev_attr)
*/
  __pyx_v_rc = ibv_query_device_ex(__pyx_v_self->context, __pyx_t_4, (&__pyx_v_dev_attr_ex->dev_attr));

  /* "pyverbs/device.pyx":222
 *                                    &ex_input.input if ex_input is not None else NULL,
 *                                    &dev_attr_ex.dev_attr)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query EX device {name}'.
 *                                    format(name=self.name), rc)
*/
  __pyx_t_5 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_5)) {

    /* "pyverbs/device.pyx":223
 *                                    &dev_attr_ex.dev_attr)
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query EX device {name}'.             # <<<<<<<<<<<<<<
 *                                    format(name=self.name), rc)
 *         return dev_attr_ex
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "pyverbs/device.pyx":224
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query EX device {name}'.
 *                                    format(name=self.name), rc)             # <<<<<<<<<<<<<<
 *         return dev_attr_ex
 * 
*/
    __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_EX_device_name;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_3 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, NULL};
      __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_self->name, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 224, __pyx_L1_error)
      __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_7, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __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, 223, __pyx_L1_error)

    /* "pyverbs/device.pyx":222
 *                                    &ex_input.input if ex_input is not None else NULL,
 *                                    &dev_attr_ex.dev_attr)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query EX device {name}'.
 *                                    format(name=self.name), rc)
*/
  }

  /* "pyverbs/device.pyx":225
 *             raise PyverbsRDMAError('Failed to query EX device {name}'.
 *                                    format(name=self.name), rc)
 *         return dev_attr_ex             # <<<<<<<<<<<<<<
 * 
 *     def query_pkey(self, unsigned int port_num, int index):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_dev_attr_ex);
  __pyx_r = ((PyObject *)__pyx_v_dev_attr_ex);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":211
 *         return dev_attr
 * 
 *     def query_device_ex(self, QueryDeviceExInput ex_input = None):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's extended attributes.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __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_AddTraceback("pyverbs.device.Context.query_device_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dev_attr_ex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":227
 *         return dev_attr_ex
 * 
 *     def query_pkey(self, unsigned int port_num, int index):             # <<<<<<<<<<<<<<
 *         cdef uint16_t pkey
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_11query_pkey(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_7pyverbs_6device_7Context_11query_pkey = {"query_pkey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_11query_pkey, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_11query_pkey(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
) {
  unsigned int __pyx_v_port_num;
  int __pyx_v_index;
  #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("query_pkey (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_port_num,&__pyx_mstate_global->__pyx_n_u_index,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, 227, __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, 227, __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, 227, __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, "query_pkey", 0) < (0)) __PYX_ERR(0, 227, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("query_pkey", 1, 2, 2, i); __PYX_ERR(0, 227, __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, 227, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 227, __pyx_L3_error)
    }
    __pyx_v_port_num = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_port_num == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_pkey", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 227, __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("pyverbs.device.Context.query_pkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_10query_pkey(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_port_num, __pyx_v_index);

  /* 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_7pyverbs_6device_7Context_10query_pkey(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, int __pyx_v_index) {
  uint16_t __pyx_v_pkey;
  int __pyx_v_rc;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[4];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_pkey", 0);

  /* "pyverbs/device.pyx":229
 *     def query_pkey(self, unsigned int port_num, int index):
 *         cdef uint16_t pkey
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query pkey {index} of port {port_num}')
*/
  __pyx_v_rc = ibv_query_pkey(__pyx_v_self->context, __pyx_v_port_num, __pyx_v_index, (&__pyx_v_pkey));

  /* "pyverbs/device.pyx":230
 *         cdef uint16_t pkey
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query pkey {index} of port {port_num}')
 *         return pkey
*/
  __pyx_t_1 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":231
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query pkey {index} of port {port_num}')             # <<<<<<<<<<<<<<
 *         return pkey
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_unsigned_int(__pyx_v_port_num, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_pkey;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_of_port;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 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_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __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, 231, __pyx_L1_error)

    /* "pyverbs/device.pyx":230
 *         cdef uint16_t pkey
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query pkey {index} of port {port_num}')
 *         return pkey
*/
  }

  /* "pyverbs/device.pyx":232
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query pkey {index} of port {port_num}')
 *         return pkey             # <<<<<<<<<<<<<<
 * 
 *     def get_pkey_index(self, unsigned int port_num, int pkey):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_uint16_t(__pyx_v_pkey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":227
 *         return dev_attr_ex
 * 
 *     def query_pkey(self, unsigned int port_num, int index):             # <<<<<<<<<<<<<<
 *         cdef uint16_t pkey
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)
*/

  /* function exit code */
  __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_8);
  __Pyx_AddTraceback("pyverbs.device.Context.query_pkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":234
 *         return pkey
 * 
 *     def get_pkey_index(self, unsigned int port_num, int pkey):             # <<<<<<<<<<<<<<
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)
 *         if idx == -1:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_13get_pkey_index(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_7pyverbs_6device_7Context_13get_pkey_index = {"get_pkey_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_13get_pkey_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_13get_pkey_index(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
) {
  unsigned int __pyx_v_port_num;
  int __pyx_v_pkey;
  #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("get_pkey_index (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_port_num,&__pyx_mstate_global->__pyx_n_u_pkey,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, 234, __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, 234, __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, 234, __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, "get_pkey_index", 0) < (0)) __PYX_ERR(0, 234, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_pkey_index", 1, 2, 2, i); __PYX_ERR(0, 234, __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, 234, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 234, __pyx_L3_error)
    }
    __pyx_v_port_num = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_port_num == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error)
    __pyx_v_pkey = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_pkey == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_pkey_index", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 234, __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("pyverbs.device.Context.get_pkey_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_12get_pkey_index(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_port_num, __pyx_v_pkey);

  /* 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_7pyverbs_6device_7Context_12get_pkey_index(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, int __pyx_v_pkey) {
  int __pyx_v_idx;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[4];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_pkey_index", 0);

  /* "pyverbs/device.pyx":235
 * 
 *     def get_pkey_index(self, unsigned int port_num, int pkey):
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)             # <<<<<<<<<<<<<<
 *         if idx == -1:
 *             raise PyverbsRDMAError(f'Failed to get pkey index of pkey = {pkey} of port {port_num}')
*/
  __pyx_v_idx = ibv_get_pkey_index(__pyx_v_self->context, __pyx_v_port_num, __pyx_v_pkey);

  /* "pyverbs/device.pyx":236
 *     def get_pkey_index(self, unsigned int port_num, int pkey):
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)
 *         if idx == -1:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to get pkey index of pkey = {pkey} of port {port_num}')
 *         return idx
*/
  __pyx_t_1 = (__pyx_v_idx == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":237
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)
 *         if idx == -1:
 *             raise PyverbsRDMAError(f'Failed to get pkey index of pkey = {pkey} of port {port_num}')             # <<<<<<<<<<<<<<
 *         return idx
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_pkey, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_unsigned_int(__pyx_v_port_num, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Failed_to_get_pkey_index_of_pkey;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_of_port;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 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_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __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, 237, __pyx_L1_error)

    /* "pyverbs/device.pyx":236
 *     def get_pkey_index(self, unsigned int port_num, int pkey):
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)
 *         if idx == -1:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to get pkey index of pkey = {pkey} of port {port_num}')
 *         return idx
*/
  }

  /* "pyverbs/device.pyx":238
 *         if idx == -1:
 *             raise PyverbsRDMAError(f'Failed to get pkey index of pkey = {pkey} of port {port_num}')
 *         return idx             # <<<<<<<<<<<<<<
 * 
 *     def query_gid(self, unsigned int port_num, int index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":234
 *         return pkey
 * 
 *     def get_pkey_index(self, unsigned int port_num, int pkey):             # <<<<<<<<<<<<<<
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)
 *         if idx == -1:
*/

  /* function exit code */
  __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_8);
  __Pyx_AddTraceback("pyverbs.device.Context.get_pkey_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":240
 *         return idx
 * 
 *     def query_gid(self, unsigned int port_num, int index):             # <<<<<<<<<<<<<<
 *         gid = GID()
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_15query_gid(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_7pyverbs_6device_7Context_15query_gid = {"query_gid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_15query_gid, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_15query_gid(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
) {
  unsigned int __pyx_v_port_num;
  int __pyx_v_index;
  #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("query_gid (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_port_num,&__pyx_mstate_global->__pyx_n_u_index,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, 240, __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, 240, __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, 240, __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, "query_gid", 0) < (0)) __PYX_ERR(0, 240, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("query_gid", 1, 2, 2, i); __PYX_ERR(0, 240, __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, 240, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 240, __pyx_L3_error)
    }
    __pyx_v_port_num = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_port_num == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_gid", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 240, __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("pyverbs.device.Context.query_gid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_14query_gid(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_port_num, __pyx_v_index);

  /* 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_7pyverbs_6device_7Context_14query_gid(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, int __pyx_v_index) {
  struct __pyx_obj_7pyverbs_4addr_GID *__pyx_v_gid = NULL;
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_gid", 0);

  /* "pyverbs/device.pyx":241
 * 
 *     def query_gid(self, unsigned int port_num, int index):
 *         gid = GID()             # <<<<<<<<<<<<<<
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
 *         if rc != 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_7pyverbs_4addr_GID, __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, 241, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_gid = ((struct __pyx_obj_7pyverbs_4addr_GID *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":242
 *     def query_gid(self, unsigned int port_num, int index):
 *         gid = GID()
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query gid {idx} of port {port}'.
*/
  __pyx_v_rc = ibv_query_gid(__pyx_v_self->context, __pyx_v_port_num, __pyx_v_index, (&__pyx_v_gid->gid));

  /* "pyverbs/device.pyx":243
 *         gid = GID()
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query gid {idx} of port {port}'.
 *                                                                    format(idx=index, port=port_num))
*/
  __pyx_t_4 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_4)) {

    /* "pyverbs/device.pyx":244
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query gid {idx} of port {port}'.             # <<<<<<<<<<<<<<
 *                                                                    format(idx=index, port=port_num))
 *         return gid
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "pyverbs/device.pyx":245
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query gid {idx} of port {port}'.
 *                                                                    format(idx=index, port=port_num))             # <<<<<<<<<<<<<<
 *         return gid
 * 
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_gid_idx_of_port;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyLong_From_unsigned_int(__pyx_v_port_num); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, NULL};
      __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_idx, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 245, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_port, __pyx_t_9, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 245, __pyx_L1_error)
      __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
      __Pyx_XDECREF(__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;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __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, 244, __pyx_L1_error)

    /* "pyverbs/device.pyx":243
 *         gid = GID()
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query gid {idx} of port {port}'.
 *                                                                    format(idx=index, port=port_num))
*/
  }

  /* "pyverbs/device.pyx":246
 *             raise PyverbsRDMAError('Failed to query gid {idx} of port {port}'.
 *                                                                    format(idx=index, port=port_num))
 *         return gid             # <<<<<<<<<<<<<<
 * 
 *     def query_gid_type(self, unsigned int port_num, unsigned int index):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_gid);
  __pyx_r = ((PyObject *)__pyx_v_gid);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":240
 *         return idx
 * 
 *     def query_gid(self, unsigned int port_num, int index):             # <<<<<<<<<<<<<<
 *         gid = GID()
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyverbs.device.Context.query_gid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_gid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":248
 *         return gid
 * 
 *     def query_gid_type(self, unsigned int port_num, unsigned int index):             # <<<<<<<<<<<<<<
 *         cdef v.ibv_gid_type_sysfs gid_type
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_17query_gid_type(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_7pyverbs_6device_7Context_17query_gid_type = {"query_gid_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_17query_gid_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_17query_gid_type(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
) {
  unsigned int __pyx_v_port_num;
  unsigned int __pyx_v_index;
  #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("query_gid_type (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_port_num,&__pyx_mstate_global->__pyx_n_u_index,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, 248, __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, 248, __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, 248, __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, "query_gid_type", 0) < (0)) __PYX_ERR(0, 248, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("query_gid_type", 1, 2, 2, i); __PYX_ERR(0, 248, __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, 248, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 248, __pyx_L3_error)
    }
    __pyx_v_port_num = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_port_num == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_index == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_gid_type", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 248, __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("pyverbs.device.Context.query_gid_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_16query_gid_type(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_port_num, __pyx_v_index);

  /* 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_7pyverbs_6device_7Context_16query_gid_type(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num, unsigned int __pyx_v_index) {
  enum ibv_gid_type_sysfs __pyx_v_gid_type;
  int __pyx_v_rc;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_gid_type", 0);

  /* "pyverbs/device.pyx":250
 *     def query_gid_type(self, unsigned int port_num, unsigned int index):
 *         cdef v.ibv_gid_type_sysfs gid_type
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAErrno('Failed to query gid type of port {p} and gid index {g}'
*/
  __pyx_v_rc = ibv_query_gid_type(__pyx_v_self->context, __pyx_v_port_num, __pyx_v_index, (&__pyx_v_gid_type));

  /* "pyverbs/device.pyx":251
 *         cdef v.ibv_gid_type_sysfs gid_type
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAErrno('Failed to query gid type of port {p} and gid index {g}'
 *                                    .format(p=port_num, g=index))
*/
  __pyx_t_1 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":252
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)
 *         if rc != 0:
 *             raise PyverbsRDMAErrno('Failed to query gid type of port {p} and gid index {g}'             # <<<<<<<<<<<<<<
 *                                    .format(p=port_num, g=index))
 *         return gid_type
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "pyverbs/device.pyx":253
 *         if rc != 0:
 *             raise PyverbsRDMAErrno('Failed to query gid type of port {p} and gid index {g}'
 *                                    .format(p=port_num, g=index))             # <<<<<<<<<<<<<<
 *         return gid_type
 * 
*/
    __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_gid_type_of_port;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyLong_From_unsigned_int(__pyx_v_port_num); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_unsigned_int(__pyx_v_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
      __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_p, __pyx_t_7, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 253, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_g, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 253, __pyx_L1_error)
      __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
      __Pyx_XDECREF(__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_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_9 = 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_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __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, 252, __pyx_L1_error)

    /* "pyverbs/device.pyx":251
 *         cdef v.ibv_gid_type_sysfs gid_type
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAErrno('Failed to query gid type of port {p} and gid index {g}'
 *                                    .format(p=port_num, g=index))
*/
  }

  /* "pyverbs/device.pyx":254
 *             raise PyverbsRDMAErrno('Failed to query gid type of port {p} and gid index {g}'
 *                                    .format(p=port_num, g=index))
 *         return gid_type             # <<<<<<<<<<<<<<
 * 
 *     def query_port(self, unsigned int port_num):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py(__pyx_v_gid_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":248
 *         return gid
 * 
 *     def query_gid_type(self, unsigned int port_num, unsigned int index):             # <<<<<<<<<<<<<<
 *         cdef v.ibv_gid_type_sysfs gid_type
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)
*/

  /* function exit code */
  __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_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyverbs.device.Context.query_gid_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":256
 *         return gid_type
 * 
 *     def query_port(self, unsigned int port_num):             # <<<<<<<<<<<<<<
 *         """
 *         Query port <port_num> of the device and returns its attributes.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_19query_port(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context_18query_port, "\n        Query port <port_num> of the device and returns its attributes.\n        :param port_num: Port number to query\n        :return: PortAttr object on success\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_7Context_19query_port = {"query_port", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_19query_port, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_18query_port};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_19query_port(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
) {
  unsigned int __pyx_v_port_num;
  #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("query_port (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_port_num,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, 256, __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, 256, __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, "query_port", 0) < (0)) __PYX_ERR(0, 256, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("query_port", 1, 1, 1, i); __PYX_ERR(0, 256, __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, 256, __pyx_L3_error)
    }
    __pyx_v_port_num = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_port_num == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_port", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 256, __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("pyverbs.device.Context.query_port", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_18query_port(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_port_num);

  /* 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_7pyverbs_6device_7Context_18query_port(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, unsigned int __pyx_v_port_num) {
  struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_port_attrs = NULL;
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_port", 0);

  /* "pyverbs/device.pyx":262
 *         :return: PortAttr object on success
 *         """
 *         port_attrs = PortAttr()             # <<<<<<<<<<<<<<
 *         rc = v.ibv_query_port(self.context, port_num, &port_attrs.attr)
 *         if rc != 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_7pyverbs_6device_PortAttr, __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, 262, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_port_attrs = ((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":263
 *         """
 *         port_attrs = PortAttr()
 *         rc = v.ibv_query_port(self.context, port_num, &port_attrs.attr)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query port {p}'.
*/
  __pyx_v_rc = ibv_query_port(__pyx_v_self->context, __pyx_v_port_num, (&__pyx_v_port_attrs->attr));

  /* "pyverbs/device.pyx":264
 *         port_attrs = PortAttr()
 *         rc = v.ibv_query_port(self.context, port_num, &port_attrs.attr)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query port {p}'.
 *                                    format(p=port_num), rc)
*/
  __pyx_t_4 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_4)) {

    /* "pyverbs/device.pyx":265
 *         rc = v.ibv_query_port(self.context, port_num, &port_attrs.attr)
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query port {p}'.             # <<<<<<<<<<<<<<
 *                                    format(p=port_num), rc)
 *         return port_attrs
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "pyverbs/device.pyx":266
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to query port {p}'.
 *                                    format(p=port_num), rc)             # <<<<<<<<<<<<<<
 *         return port_attrs
 * 
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_port_p;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_unsigned_int(__pyx_v_port_num); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, NULL};
      __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_p, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 266, __pyx_L1_error)
      __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
      __Pyx_XDECREF(__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;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_6, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __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, 265, __pyx_L1_error)

    /* "pyverbs/device.pyx":264
 *         port_attrs = PortAttr()
 *         rc = v.ibv_query_port(self.context, port_num, &port_attrs.attr)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query port {p}'.
 *                                    format(p=port_num), rc)
*/
  }

  /* "pyverbs/device.pyx":267
 *             raise PyverbsRDMAError('Failed to query port {p}'.
 *                                    format(p=port_num), rc)
 *         return port_attrs             # <<<<<<<<<<<<<<
 * 
 *     def query_gid_table(self, size_t max_entries, uint32_t flags=0):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_port_attrs);
  __pyx_r = ((PyObject *)__pyx_v_port_attrs);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":256
 *         return gid_type
 * 
 *     def query_port(self, unsigned int port_num):             # <<<<<<<<<<<<<<
 *         """
 *         Query port <port_num> of the device and returns its attributes.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyverbs.device.Context.query_port", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_port_attrs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":269
 *         return port_attrs
 * 
 *     def query_gid_table(self, size_t max_entries, uint32_t flags=0):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the GID tables of the device for at most <max_entries> entries
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_21query_gid_table(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context_20query_gid_table, "\n        Queries the GID tables of the device for at most <max_entries> entries\n        and returns them.\n        :param max_entries: Maximum number of GID entries to retrieve\n        :param flags: Specifies new extra members of struct ibv_gid_entry to\n                      query\n        :return: List of GIDEntry objects on success\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_7Context_21query_gid_table = {"query_gid_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_21query_gid_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_20query_gid_table};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_21query_gid_table(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
) {
  size_t __pyx_v_max_entries;
  uint32_t __pyx_v_flags;
  #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("query_gid_table (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_max_entries,&__pyx_mstate_global->__pyx_n_u_flags,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, 269, __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, 269, __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, 269, __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, "query_gid_table", 0) < (0)) __PYX_ERR(0, 269, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("query_gid_table", 0, 1, 2, i); __PYX_ERR(0, 269, __pyx_L3_error) }
      }
    } 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, 269, __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, 269, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_max_entries = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_max_entries == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_flags = __Pyx_PyLong_As_uint32_t(values[1]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
    } else {
      __pyx_v_flags = ((uint32_t)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_gid_table", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 269, __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("pyverbs.device.Context.query_gid_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_20query_gid_table(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_max_entries, __pyx_v_flags);

  /* 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_7pyverbs_6device_7Context_20query_gid_table(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, size_t __pyx_v_max_entries, uint32_t __pyx_v_flags) {
  struct ibv_gid_entry *__pyx_v_entries;
  struct ibv_gid_entry __pyx_v_entry;
  Py_ssize_t __pyx_v_rc;
  PyObject *__pyx_v_gid_entries = NULL;
  Py_ssize_t __pyx_v_i;
  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;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_gid_table", 0);

  /* "pyverbs/device.pyx":281
 *         cdef v.ibv_gid_entry entry
 * 
 *         entries = <v.ibv_gid_entry *>malloc(max_entries *             # <<<<<<<<<<<<<<
 *                                             sizeof(v.ibv_gid_entry))
 *         rc = v.ibv_query_gid_table(self.context, entries, max_entries, flags)
*/
  __pyx_v_entries = ((struct ibv_gid_entry *)malloc((__pyx_v_max_entries * (sizeof(struct ibv_gid_entry)))));

  /* "pyverbs/device.pyx":283
 *         entries = <v.ibv_gid_entry *>malloc(max_entries *
 *                                             sizeof(v.ibv_gid_entry))
 *         rc = v.ibv_query_gid_table(self.context, entries, max_entries, flags)             # <<<<<<<<<<<<<<
 *         if rc < 0:
 *             raise PyverbsRDMAError('Failed to query gid tables of the device',
*/
  __pyx_v_rc = ibv_query_gid_table(__pyx_v_self->context, __pyx_v_entries, __pyx_v_max_entries, __pyx_v_flags);

  /* "pyverbs/device.pyx":284
 *                                             sizeof(v.ibv_gid_entry))
 *         rc = v.ibv_query_gid_table(self.context, entries, max_entries, flags)
 *         if rc < 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query gid tables of the device',
 *                                    rc)
*/
  __pyx_t_1 = (__pyx_v_rc < 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":285
 *         rc = v.ibv_query_gid_table(self.context, entries, max_entries, flags)
 *         if rc < 0:
 *             raise PyverbsRDMAError('Failed to query gid tables of the device',             # <<<<<<<<<<<<<<
 *                                    rc)
 *         gid_entries = []
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "pyverbs/device.pyx":286
 *         if rc < 0:
 *             raise PyverbsRDMAError('Failed to query gid tables of the device',
 *                                    rc)             # <<<<<<<<<<<<<<
 *         gid_entries = []
 *         for i in range(rc):
*/
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 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_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_query_gid_tables_of_th, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__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;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __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, 285, __pyx_L1_error)

    /* "pyverbs/device.pyx":284
 *                                             sizeof(v.ibv_gid_entry))
 *         rc = v.ibv_query_gid_table(self.context, entries, max_entries, flags)
 *         if rc < 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to query gid tables of the device',
 *                                    rc)
*/
  }

  /* "pyverbs/device.pyx":287
 *             raise PyverbsRDMAError('Failed to query gid tables of the device',
 *                                    rc)
 *         gid_entries = []             # <<<<<<<<<<<<<<
 *         for i in range(rc):
 *             entry = entries[i]
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_gid_entries = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":288
 *                                    rc)
 *         gid_entries = []
 *         for i in range(rc):             # <<<<<<<<<<<<<<
 *             entry = entries[i]
 *             gid_entries.append(GIDEntry(entry.gid._global.subnet_prefix,
*/
  __pyx_t_7 = __pyx_v_rc;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "pyverbs/device.pyx":289
 *         gid_entries = []
 *         for i in range(rc):
 *             entry = entries[i]             # <<<<<<<<<<<<<<
 *             gid_entries.append(GIDEntry(entry.gid._global.subnet_prefix,
 *                                entry.gid._global.interface_id, entry.gid_index,
*/
    __pyx_v_entry = (__pyx_v_entries[__pyx_v_i]);

    /* "pyverbs/device.pyx":290
 *         for i in range(rc):
 *             entry = entries[i]
 *             gid_entries.append(GIDEntry(entry.gid._global.subnet_prefix,             # <<<<<<<<<<<<<<
 *                                entry.gid._global.interface_id, entry.gid_index,
 *                                entry.port_num, entry.gid_type,
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyLong_From_unsigned_long(__pyx_v_entry.gid.global.subnet_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "pyverbs/device.pyx":291
 *             entry = entries[i]
 *             gid_entries.append(GIDEntry(entry.gid._global.subnet_prefix,
 *                                entry.gid._global.interface_id, entry.gid_index,             # <<<<<<<<<<<<<<
 *                                entry.port_num, entry.gid_type,
 *                                entry.ndev_ifindex))
*/
    __pyx_t_3 = __Pyx_PyLong_From_unsigned_long(__pyx_v_entry.gid.global.interface_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyLong_From_uint32_t(__pyx_v_entry.gid_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "pyverbs/device.pyx":292
 *             gid_entries.append(GIDEntry(entry.gid._global.subnet_prefix,
 *                                entry.gid._global.interface_id, entry.gid_index,
 *                                entry.port_num, entry.gid_type,             # <<<<<<<<<<<<<<
 *                                entry.ndev_ifindex))
 *         free(entries)
*/
    __pyx_t_11 = __Pyx_PyLong_From_uint32_t(__pyx_v_entry.port_num); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyLong_From_uint32_t(__pyx_v_entry.gid_type); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "pyverbs/device.pyx":293
 *                                entry.gid._global.interface_id, entry.gid_index,
 *                                entry.port_num, entry.gid_type,
 *                                entry.ndev_ifindex))             # <<<<<<<<<<<<<<
 *         free(entries)
 *         return gid_entries
*/
    __pyx_t_13 = __Pyx_PyLong_From_uint32_t(__pyx_v_entry.ndev_ifindex); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_t_5, __pyx_t_3, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_GIDEntry, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }

    /* "pyverbs/device.pyx":290
 *         for i in range(rc):
 *             entry = entries[i]
 *             gid_entries.append(GIDEntry(entry.gid._global.subnet_prefix,             # <<<<<<<<<<<<<<
 *                                entry.gid._global.interface_id, entry.gid_index,
 *                                entry.port_num, entry.gid_type,
*/
    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_gid_entries, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 290, __pyx_L1_error)
    __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "pyverbs/device.pyx":294
 *                                entry.port_num, entry.gid_type,
 *                                entry.ndev_ifindex))
 *         free(entries)             # <<<<<<<<<<<<<<
 *         return gid_entries
 * 
*/
  free(__pyx_v_entries);

  /* "pyverbs/device.pyx":295
 *                                entry.ndev_ifindex))
 *         free(entries)
 *         return gid_entries             # <<<<<<<<<<<<<<
 * 
 *     def query_gid_ex(self, uint32_t port_num, uint32_t gid_index,
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_gid_entries);
  __pyx_r = __pyx_v_gid_entries;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":269
 *         return port_attrs
 * 
 *     def query_gid_table(self, size_t max_entries, uint32_t flags=0):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the GID tables of the device for at most <max_entries> entries
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pyverbs.device.Context.query_gid_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_gid_entries);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":297
 *         return gid_entries
 * 
 *     def query_gid_ex(self, uint32_t port_num, uint32_t gid_index,             # <<<<<<<<<<<<<<
 *                      uint32_t flags=0):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_23query_gid_ex(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context_22query_gid_ex, "\n        Queries the GID table of port <port_num> in index <gid_index>, and\n        returns the GID entry.\n        :param port_num: The port number to query\n        :param gid_index: The index in the GID table to query\n        :param flags: Specifies new extra members of struct ibv_gid_entry to\n                      query\n        :return: GIDEntry object on success\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_7Context_23query_gid_ex = {"query_gid_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_23query_gid_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_22query_gid_ex};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_23query_gid_ex(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
) {
  uint32_t __pyx_v_port_num;
  uint32_t __pyx_v_gid_index;
  uint32_t __pyx_v_flags;
  #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("query_gid_ex (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_port_num,&__pyx_mstate_global->__pyx_n_u_gid_index,&__pyx_mstate_global->__pyx_n_u_flags,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, 297, __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, 297, __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, 297, __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, 297, __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, "query_gid_ex", 0) < (0)) __PYX_ERR(0, 297, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("query_gid_ex", 0, 2, 3, i); __PYX_ERR(0, 297, __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, 297, __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, 297, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 297, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_port_num = __Pyx_PyLong_As_uint32_t(values[0]); if (unlikely((__pyx_v_port_num == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L3_error)
    __pyx_v_gid_index = __Pyx_PyLong_As_uint32_t(values[1]); if (unlikely((__pyx_v_gid_index == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_flags = __Pyx_PyLong_As_uint32_t(values[2]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
    } else {
      __pyx_v_flags = ((uint32_t)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_gid_ex", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 297, __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("pyverbs.device.Context.query_gid_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_22query_gid_ex(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_port_num, __pyx_v_gid_index, __pyx_v_flags);

  /* 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_7pyverbs_6device_7Context_22query_gid_ex(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, uint32_t __pyx_v_port_num, uint32_t __pyx_v_gid_index, uint32_t __pyx_v_flags) {
  struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_entry = NULL;
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[4];
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_gid_ex", 0);

  /* "pyverbs/device.pyx":308
 *         :return: GIDEntry object on success
 *         """
 *         entry = GIDEntry()             # <<<<<<<<<<<<<<
 *         rc = v.ibv_query_gid_ex(self.context, port_num, gid_index,
 *                                 &entry.entry, flags)
*/
  __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_7pyverbs_6device_GIDEntry, __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, 308, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_entry = ((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":309
 *         """
 *         entry = GIDEntry()
 *         rc = v.ibv_query_gid_ex(self.context, port_num, gid_index,             # <<<<<<<<<<<<<<
 *                                 &entry.entry, flags)
 *         if rc != 0:
*/
  __pyx_v_rc = ibv_query_gid_ex(__pyx_v_self->context, __pyx_v_port_num, __pyx_v_gid_index, (&__pyx_v_entry->entry), __pyx_v_flags);

  /* "pyverbs/device.pyx":311
 *         rc = v.ibv_query_gid_ex(self.context, port_num, gid_index,
 *                                 &entry.entry, flags)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\
 *                                    f'{port_num} in index {gid_index}', rc)
*/
  __pyx_t_4 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_4)) {

    /* "pyverbs/device.pyx":312
 *                                 &entry.entry, flags)
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\             # <<<<<<<<<<<<<<
 *                                    f'{port_num} in index {gid_index}', rc)
 *         return entry
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "pyverbs/device.pyx":313
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\
 *                                    f'{port_num} in index {gid_index}', rc)             # <<<<<<<<<<<<<<
 *         return entry
 * 
*/
    __pyx_t_6 = __Pyx_PyUnicode_From_uint32_t(__pyx_v_port_num, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_uint32_t(__pyx_v_gid_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Failed_to_query_gid_table_of_por;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_in_index;
    __pyx_t_8[3] = __pyx_t_7;

    /* "pyverbs/device.pyx":312
 *                                 &entry.entry, flags)
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\             # <<<<<<<<<<<<<<
 *                                    f'{port_num} in index {gid_index}', rc)
 *         return entry
*/
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 34 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyverbs/device.pyx":313
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\
 *                                    f'{port_num} in index {gid_index}', rc)             # <<<<<<<<<<<<<<
 *         return entry
 * 
*/
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __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, 312, __pyx_L1_error)

    /* "pyverbs/device.pyx":311
 *         rc = v.ibv_query_gid_ex(self.context, port_num, gid_index,
 *                                 &entry.entry, flags)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\
 *                                    f'{port_num} in index {gid_index}', rc)
*/
  }

  /* "pyverbs/device.pyx":314
 *             raise PyverbsRDMAError(f'Failed to query gid table of port '\
 *                                    f'{port_num} in index {gid_index}', rc)
 *         return entry             # <<<<<<<<<<<<<<
 * 
 *     def query_rt_values_ex(self, comp_mask=v.IBV_VALUES_MASK_RAW_CLOCK):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_entry);
  __pyx_r = ((PyObject *)__pyx_v_entry);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":297
 *         return gid_entries
 * 
 *     def query_gid_ex(self, uint32_t port_num, uint32_t gid_index,             # <<<<<<<<<<<<<<
 *                      uint32_t flags=0):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyverbs.device.Context.query_gid_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_entry);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":316
 *         return entry
 * 
 *     def query_rt_values_ex(self, comp_mask=v.IBV_VALUES_MASK_RAW_CLOCK):             # <<<<<<<<<<<<<<
 *         """
 *         Query an RDMA device for some real time values.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_25query_rt_values_ex(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_7Context_24query_rt_values_ex, "\n        Query an RDMA device for some real time values.\n        :return: A tuple of the real time values according to comp_mask (sec, nsec)\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_7Context_25query_rt_values_ex = {"query_rt_values_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_25query_rt_values_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_24query_rt_values_ex};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_25query_rt_values_ex(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_comp_mask = 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("query_rt_values_ex (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_comp_mask,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, 316, __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, 316, __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, "query_rt_values_ex", 0) < (0)) __PYX_ERR(0, 316, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__2);
    } 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, 316, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__2);
    }
    __pyx_v_comp_mask = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("query_rt_values_ex", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 316, __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("pyverbs.device.Context.query_rt_values_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_24query_rt_values_ex(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v_comp_mask);

  /* 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_7pyverbs_6device_7Context_24query_rt_values_ex(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, PyObject *__pyx_v_comp_mask) {
  struct ibv_values_ex *__pyx_v_val;
  int __pyx_v_rc;
  long __pyx_v_nsec;
  time_t __pyx_v_sec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  long __pyx_t_8;
  time_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("query_rt_values_ex", 0);

  /* "pyverbs/device.pyx":322
 *         """
 *         cdef v.ibv_values_ex *val
 *         val = <v.ibv_values_ex *>malloc(sizeof(v.ibv_values_ex))             # <<<<<<<<<<<<<<
 *         val.comp_mask = comp_mask
 *         rc = v.ibv_query_rt_values_ex(self.context, val)
*/
  __pyx_v_val = ((struct ibv_values_ex *)malloc((sizeof(struct ibv_values_ex))));

  /* "pyverbs/device.pyx":323
 *         cdef v.ibv_values_ex *val
 *         val = <v.ibv_values_ex *>malloc(sizeof(v.ibv_values_ex))
 *         val.comp_mask = comp_mask             # <<<<<<<<<<<<<<
 *         rc = v.ibv_query_rt_values_ex(self.context, val)
 *         if rc != 0:
*/
  __pyx_t_1 = __Pyx_PyLong_As_uint32_t(__pyx_v_comp_mask); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_v_val->comp_mask = __pyx_t_1;

  /* "pyverbs/device.pyx":324
 *         val = <v.ibv_values_ex *>malloc(sizeof(v.ibv_values_ex))
 *         val.comp_mask = comp_mask
 *         rc = v.ibv_query_rt_values_ex(self.context, val)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)
*/
  __pyx_v_rc = ibv_query_rt_values_ex(__pyx_v_self->context, __pyx_v_val);

  /* "pyverbs/device.pyx":325
 *         val.comp_mask = comp_mask
 *         rc = v.ibv_query_rt_values_ex(self.context, val)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)
 *         if val.comp_mask != comp_mask:
*/
  __pyx_t_2 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyverbs/device.pyx":326
 *         rc = v.ibv_query_rt_values_ex(self.context, val)
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)             # <<<<<<<<<<<<<<
 *         if val.comp_mask != comp_mask:
 *             raise PyverbsRDMAError(f'Failed to query real time values with requested comp_mask')
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_query_real_time_values, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __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, 326, __pyx_L1_error)

    /* "pyverbs/device.pyx":325
 *         val.comp_mask = comp_mask
 *         rc = v.ibv_query_rt_values_ex(self.context, val)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)
 *         if val.comp_mask != comp_mask:
*/
  }

  /* "pyverbs/device.pyx":327
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)
 *         if val.comp_mask != comp_mask:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query real time values with requested comp_mask')
 *         nsec = (<v.ibv_values_ex *>val).raw_clock.tv_nsec
*/
  __pyx_t_3 = __Pyx_PyLong_From_uint32_t(__pyx_v_val->comp_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_v_comp_mask, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "pyverbs/device.pyx":328
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)
 *         if val.comp_mask != comp_mask:
 *             raise PyverbsRDMAError(f'Failed to query real time values with requested comp_mask')             # <<<<<<<<<<<<<<
 *         nsec = (<v.ibv_values_ex *>val).raw_clock.tv_nsec
 *         sec = (<v.ibv_values_ex *>val).raw_clock.tv_sec
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_query_real_time_values_2};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_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, 328, __pyx_L1_error)

    /* "pyverbs/device.pyx":327
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to query real time values', rc)
 *         if val.comp_mask != comp_mask:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to query real time values with requested comp_mask')
 *         nsec = (<v.ibv_values_ex *>val).raw_clock.tv_nsec
*/
  }

  /* "pyverbs/device.pyx":329
 *         if val.comp_mask != comp_mask:
 *             raise PyverbsRDMAError(f'Failed to query real time values with requested comp_mask')
 *         nsec = (<v.ibv_values_ex *>val).raw_clock.tv_nsec             # <<<<<<<<<<<<<<
 *         sec = (<v.ibv_values_ex *>val).raw_clock.tv_sec
 *         free(val)
*/
  __pyx_t_8 = ((struct ibv_values_ex *)__pyx_v_val)->raw_clock.tv_nsec;
  __pyx_v_nsec = __pyx_t_8;

  /* "pyverbs/device.pyx":330
 *             raise PyverbsRDMAError(f'Failed to query real time values with requested comp_mask')
 *         nsec = (<v.ibv_values_ex *>val).raw_clock.tv_nsec
 *         sec = (<v.ibv_values_ex *>val).raw_clock.tv_sec             # <<<<<<<<<<<<<<
 *         free(val)
 *         return sec, nsec
*/
  __pyx_t_9 = ((struct ibv_values_ex *)__pyx_v_val)->raw_clock.tv_sec;
  __pyx_v_sec = __pyx_t_9;

  /* "pyverbs/device.pyx":331
 *         nsec = (<v.ibv_values_ex *>val).raw_clock.tv_nsec
 *         sec = (<v.ibv_values_ex *>val).raw_clock.tv_sec
 *         free(val)             # <<<<<<<<<<<<<<
 *         return sec, nsec
 * 
*/
  free(__pyx_v_val);

  /* "pyverbs/device.pyx":332
 *         sec = (<v.ibv_values_ex *>val).raw_clock.tv_sec
 *         free(val)
 *         return sec, nsec             # <<<<<<<<<<<<<<
 * 
 *     cdef add_ref(self, obj):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyLong_From_time_t(__pyx_v_sec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_v_nsec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 332, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 332, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":316
 *         return entry
 * 
 *     def query_rt_values_ex(self, comp_mask=v.IBV_VALUES_MASK_RAW_CLOCK):             # <<<<<<<<<<<<<<
 *         """
 *         Query an RDMA device for some real time values.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyverbs.device.Context.query_rt_values_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":334
 *         return sec, nsec
 * 
 *     cdef add_ref(self, obj):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, PD):
 *             self.pds.add(obj)
*/

static PyObject *__pyx_f_7pyverbs_6device_7Context_add_ref(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, PyObject *__pyx_v_obj) {
  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_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_ref", 0);

  /* "pyverbs/device.pyx":335
 * 
 *     cdef add_ref(self, obj):
 *         if isinstance(obj, PD):             # <<<<<<<<<<<<<<
 *             self.pds.add(obj)
 *         elif isinstance(obj, DM):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2pd_PD); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":336
 *     cdef add_ref(self, obj):
 *         if isinstance(obj, PD):
 *             self.pds.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, DM):
 *             self.dms.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->pds;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":335
 * 
 *     cdef add_ref(self, obj):
 *         if isinstance(obj, PD):             # <<<<<<<<<<<<<<
 *             self.pds.add(obj)
 *         elif isinstance(obj, DM):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":337
 *         if isinstance(obj, PD):
 *             self.pds.add(obj)
 *         elif isinstance(obj, DM):             # <<<<<<<<<<<<<<
 *             self.dms.add(obj)
 *         elif isinstance(obj, CompChannel):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":338
 *             self.pds.add(obj)
 *         elif isinstance(obj, DM):
 *             self.dms.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, CompChannel):
 *             self.ccs.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->dms;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 338, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":337
 *         if isinstance(obj, PD):
 *             self.pds.add(obj)
 *         elif isinstance(obj, DM):             # <<<<<<<<<<<<<<
 *             self.dms.add(obj)
 *         elif isinstance(obj, CompChannel):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":339
 *         elif isinstance(obj, DM):
 *             self.dms.add(obj)
 *         elif isinstance(obj, CompChannel):             # <<<<<<<<<<<<<<
 *             self.ccs.add(obj)
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2cq_CompChannel); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":340
 *             self.dms.add(obj)
 *         elif isinstance(obj, CompChannel):
 *             self.ccs.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):
 *             self.cqs.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->ccs;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":339
 *         elif isinstance(obj, DM):
 *             self.dms.add(obj)
 *         elif isinstance(obj, CompChannel):             # <<<<<<<<<<<<<<
 *             self.ccs.add(obj)
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":341
 *         elif isinstance(obj, CompChannel):
 *             self.ccs.add(obj)
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):             # <<<<<<<<<<<<<<
 *             self.cqs.add(obj)
 *         elif isinstance(obj, QP):
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2cq_CQ); 
  if (!__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2cq_CQEX); 
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":342
 *             self.ccs.add(obj)
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):
 *             self.cqs.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, QP):
 *             self.qps.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->cqs;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":341
 *         elif isinstance(obj, CompChannel):
 *             self.ccs.add(obj)
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):             # <<<<<<<<<<<<<<
 *             self.cqs.add(obj)
 *         elif isinstance(obj, QP):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":343
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):
 *             self.cqs.add(obj)
 *         elif isinstance(obj, QP):             # <<<<<<<<<<<<<<
 *             self.qps.add(obj)
 *         elif isinstance(obj, XRCD):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2qp_QP); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":344
 *             self.cqs.add(obj)
 *         elif isinstance(obj, QP):
 *             self.qps.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, XRCD):
 *             self.xrcds.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->qps;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":343
 *         elif isinstance(obj, CQ) or isinstance(obj, CQEX):
 *             self.cqs.add(obj)
 *         elif isinstance(obj, QP):             # <<<<<<<<<<<<<<
 *             self.qps.add(obj)
 *         elif isinstance(obj, XRCD):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":345
 *         elif isinstance(obj, QP):
 *             self.qps.add(obj)
 *         elif isinstance(obj, XRCD):             # <<<<<<<<<<<<<<
 *             self.xrcds.add(obj)
 *         elif isinstance(obj, WQ):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_4xrcd_XRCD); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":346
 *             self.qps.add(obj)
 *         elif isinstance(obj, XRCD):
 *             self.xrcds.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, WQ):
 *             self.wqs.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->xrcds;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":345
 *         elif isinstance(obj, QP):
 *             self.qps.add(obj)
 *         elif isinstance(obj, XRCD):             # <<<<<<<<<<<<<<
 *             self.xrcds.add(obj)
 *         elif isinstance(obj, WQ):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":347
 *         elif isinstance(obj, XRCD):
 *             self.xrcds.add(obj)
 *         elif isinstance(obj, WQ):             # <<<<<<<<<<<<<<
 *             self.wqs.add(obj)
 *         elif isinstance(obj, RwqIndTable):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2wq_WQ); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":348
 *             self.xrcds.add(obj)
 *         elif isinstance(obj, WQ):
 *             self.wqs.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, RwqIndTable):
 *             self.rwq_ind_tbls.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->wqs;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":347
 *         elif isinstance(obj, XRCD):
 *             self.xrcds.add(obj)
 *         elif isinstance(obj, WQ):             # <<<<<<<<<<<<<<
 *             self.wqs.add(obj)
 *         elif isinstance(obj, RwqIndTable):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":349
 *         elif isinstance(obj, WQ):
 *             self.wqs.add(obj)
 *         elif isinstance(obj, RwqIndTable):             # <<<<<<<<<<<<<<
 *             self.rwq_ind_tbls.add(obj)
 *         elif isinstance(obj, DMAHandle):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyverbs_2wq_RwqIndTable); 
  if (__pyx_t_1) {

    /* "pyverbs/device.pyx":350
 *             self.wqs.add(obj)
 *         elif isinstance(obj, RwqIndTable):
 *             self.rwq_ind_tbls.add(obj)             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, DMAHandle):
 *             self.dmahs.add(obj)
*/
    __pyx_t_3 = __pyx_v_self->rwq_ind_tbls;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":349
 *         elif isinstance(obj, WQ):
 *             self.wqs.add(obj)
 *         elif isinstance(obj, RwqIndTable):             # <<<<<<<<<<<<<<
 *             self.rwq_ind_tbls.add(obj)
 *         elif isinstance(obj, DMAHandle):
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":351
 *         elif isinstance(obj, RwqIndTable):
 *             self.rwq_ind_tbls.add(obj)
 *         elif isinstance(obj, DMAHandle):             # <<<<<<<<<<<<<<
 *             self.dmahs.add(obj)
 *         else:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DMAHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":352
 *             self.rwq_ind_tbls.add(obj)
 *         elif isinstance(obj, DMAHandle):
 *             self.dmahs.add(obj)             # <<<<<<<<<<<<<<
 *         else:
 *             raise PyverbsError('Unrecognized object type')
*/
    __pyx_t_3 = __pyx_v_self->dmahs;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__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, 352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":351
 *         elif isinstance(obj, RwqIndTable):
 *             self.rwq_ind_tbls.add(obj)
 *         elif isinstance(obj, DMAHandle):             # <<<<<<<<<<<<<<
 *             self.dmahs.add(obj)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":354
 *             self.dmahs.add(obj)
 *         else:
 *             raise PyverbsError('Unrecognized object type')             # <<<<<<<<<<<<<<
 * 
 *     def get_async_event(self):
*/
  /*else*/ {
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyverbsError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unrecognized_object_type};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __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, 354, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyverbs/device.pyx":334
 *         return sec, nsec
 * 
 *     cdef add_ref(self, obj):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, PD):
 *             self.pds.add(obj)
*/

  /* 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_6);
  __Pyx_AddTraceback("pyverbs.device.Context.add_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":356
 *             raise PyverbsError('Unrecognized object type')
 * 
 *     def get_async_event(self):             # <<<<<<<<<<<<<<
 *         event = AsyncEvent()
 *         rc = v.ibv_get_async_event(self.context, &event.event)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_27get_async_event(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_7pyverbs_6device_7Context_27get_async_event = {"get_async_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_27get_async_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_27get_async_event(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_async_event (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_async_event", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_async_event", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_26get_async_event(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_26get_async_event(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_event = NULL;
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __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("get_async_event", 0);

  /* "pyverbs/device.pyx":357
 * 
 *     def get_async_event(self):
 *         event = AsyncEvent()             # <<<<<<<<<<<<<<
 *         rc = v.ibv_get_async_event(self.context, &event.event)
 *         if rc != 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_7pyverbs_6device_AsyncEvent, __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, 357, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_event = ((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":358
 *     def get_async_event(self):
 *         event = AsyncEvent()
 *         rc = v.ibv_get_async_event(self.context, &event.event)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to get async event', rc)
*/
  __pyx_v_rc = ibv_get_async_event(__pyx_v_self->context, (&__pyx_v_event->event));

  /* "pyverbs/device.pyx":359
 *         event = AsyncEvent()
 *         rc = v.ibv_get_async_event(self.context, &event.event)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to get async event', rc)
 *         return event
*/
  __pyx_t_4 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_4)) {

    /* "pyverbs/device.pyx":360
 *         rc = v.ibv_get_async_event(self.context, &event.event)
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to get async event', rc)             # <<<<<<<<<<<<<<
 *         return event
 * 
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Failed_to_get_async_event, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __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, 360, __pyx_L1_error)

    /* "pyverbs/device.pyx":359
 *         event = AsyncEvent()
 *         rc = v.ibv_get_async_event(self.context, &event.event)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError(f'Failed to get async event', rc)
 *         return event
*/
  }

  /* "pyverbs/device.pyx":361
 *         if rc != 0:
 *             raise PyverbsRDMAError(f'Failed to get async event', rc)
 *         return event             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_event);
  __pyx_r = ((PyObject *)__pyx_v_event);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":356
 *             raise PyverbsError('Unrecognized object type')
 * 
 *     def get_async_event(self):             # <<<<<<<<<<<<<<
 *         event = AsyncEvent()
 *         rc = v.ibv_get_async_event(self.context, &event.event)
*/

  /* 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("pyverbs.device.Context.get_async_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_event);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":363
 *         return event
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def cmd_fd(self):
 *         return self.context.cmd_fd
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_6cmd_fd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7Context_6cmd_fd_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_7pyverbs_6device_7Context_6cmd_fd___get__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_6cmd_fd___get__(struct __pyx_obj_7pyverbs_6device_Context *__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);

  /* "pyverbs/device.pyx":365
 *     @property
 *     def cmd_fd(self):
 *         return self.context.cmd_fd             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->context->cmd_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":363
 *         return event
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def cmd_fd(self):
 *         return self.context.cmd_fd
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.Context.cmd_fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":367
 *         return self.context.cmd_fd
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self.name
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7Context_4name_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_7pyverbs_6device_7Context_4name___get__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_4name___get__(struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":369
 *     @property
 *     def name(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":367
 *         return self.context.cmd_fd
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self.name
*/

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_29__reduce_cython__(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_7pyverbs_6device_7Context_29__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_29__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_28__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7Context_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_context_self_device_cannot, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7Context_31__setstate_cython__(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_7pyverbs_6device_7Context_31__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7Context_31__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7Context_30__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_Context *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_7Context_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_context_self_device_cannot, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":378
 *     readability.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def fw_version(self):
 *         return self.dev_attr.fw_ver.decode()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_10fw_version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_10fw_version_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_7pyverbs_6device_10DeviceAttr_10fw_version___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_10fw_version___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __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);

  /* "pyverbs/device.pyx":380
 *     @property
 *     def fw_version(self):
 *         return self.dev_attr.fw_ver.decode()             # <<<<<<<<<<<<<<
 *     @property
 *     def node_guid(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->dev_attr.fw_ver;
  __pyx_t_2 = __Pyx_ssize_strlen(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 380, __pyx_L1_error)
  __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_1, 0, __pyx_t_2, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":378
 *     readability.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def fw_version(self):
 *         return self.dev_attr.fw_ver.decode()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.fw_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":381
 *     def fw_version(self):
 *         return self.dev_attr.fw_ver.decode()
 *     @property             # <<<<<<<<<<<<<<
 *     def node_guid(self):
 *         return self.dev_attr.node_guid
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9node_guid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9node_guid_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_7pyverbs_6device_10DeviceAttr_9node_guid___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9node_guid___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":383
 *     @property
 *     def node_guid(self):
 *         return self.dev_attr.node_guid             # <<<<<<<<<<<<<<
 *     @property
 *     def sys_image_guid(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.node_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":381
 *     def fw_version(self):
 *         return self.dev_attr.fw_ver.decode()
 *     @property             # <<<<<<<<<<<<<<
 *     def node_guid(self):
 *         return self.dev_attr.node_guid
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.node_guid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":384
 *     def node_guid(self):
 *         return self.dev_attr.node_guid
 *     @property             # <<<<<<<<<<<<<<
 *     def sys_image_guid(self):
 *         return self.dev_attr.sys_image_guid
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14sys_image_guid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14sys_image_guid_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_7pyverbs_6device_10DeviceAttr_14sys_image_guid___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14sys_image_guid___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":386
 *     @property
 *     def sys_image_guid(self):
 *         return self.dev_attr.sys_image_guid             # <<<<<<<<<<<<<<
 *     @property
 *     def max_mr_size(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.sys_image_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":384
 *     def node_guid(self):
 *         return self.dev_attr.node_guid
 *     @property             # <<<<<<<<<<<<<<
 *     def sys_image_guid(self):
 *         return self.dev_attr.sys_image_guid
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.sys_image_guid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":387
 *     def sys_image_guid(self):
 *         return self.dev_attr.sys_image_guid
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mr_size(self):
 *         return self.dev_attr.max_mr_size
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_11max_mr_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_11max_mr_size_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_7pyverbs_6device_10DeviceAttr_11max_mr_size___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_11max_mr_size___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":389
 *     @property
 *     def max_mr_size(self):
 *         return self.dev_attr.max_mr_size             # <<<<<<<<<<<<<<
 *     @property
 *     def page_size_cap(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.max_mr_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":387
 *     def sys_image_guid(self):
 *         return self.dev_attr.sys_image_guid
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mr_size(self):
 *         return self.dev_attr.max_mr_size
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_mr_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":390
 *     def max_mr_size(self):
 *         return self.dev_attr.max_mr_size
 *     @property             # <<<<<<<<<<<<<<
 *     def page_size_cap(self):
 *         return self.dev_attr.page_size_cap
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_13page_size_cap_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_13page_size_cap_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_7pyverbs_6device_10DeviceAttr_13page_size_cap___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_13page_size_cap___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":392
 *     @property
 *     def page_size_cap(self):
 *         return self.dev_attr.page_size_cap             # <<<<<<<<<<<<<<
 *     @property
 *     def vendor_id(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.page_size_cap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":390
 *     def max_mr_size(self):
 *         return self.dev_attr.max_mr_size
 *     @property             # <<<<<<<<<<<<<<
 *     def page_size_cap(self):
 *         return self.dev_attr.page_size_cap
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.page_size_cap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":393
 *     def page_size_cap(self):
 *         return self.dev_attr.page_size_cap
 *     @property             # <<<<<<<<<<<<<<
 *     def vendor_id(self):
 *         return self.dev_attr.vendor_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9vendor_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9vendor_id_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_7pyverbs_6device_10DeviceAttr_9vendor_id___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9vendor_id___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":395
 *     @property
 *     def vendor_id(self):
 *         return self.dev_attr.vendor_id             # <<<<<<<<<<<<<<
 *     @property
 *     def vendor_part_id(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.vendor_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":393
 *     def page_size_cap(self):
 *         return self.dev_attr.page_size_cap
 *     @property             # <<<<<<<<<<<<<<
 *     def vendor_id(self):
 *         return self.dev_attr.vendor_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.vendor_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":396
 *     def vendor_id(self):
 *         return self.dev_attr.vendor_id
 *     @property             # <<<<<<<<<<<<<<
 *     def vendor_part_id(self):
 *         return self.dev_attr.vendor_part_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14vendor_part_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14vendor_part_id_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_7pyverbs_6device_10DeviceAttr_14vendor_part_id___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14vendor_part_id___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":398
 *     @property
 *     def vendor_part_id(self):
 *         return self.dev_attr.vendor_part_id             # <<<<<<<<<<<<<<
 *     @property
 *     def hw_ver(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.vendor_part_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":396
 *     def vendor_id(self):
 *         return self.dev_attr.vendor_id
 *     @property             # <<<<<<<<<<<<<<
 *     def vendor_part_id(self):
 *         return self.dev_attr.vendor_part_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.vendor_part_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":399
 *     def vendor_part_id(self):
 *         return self.dev_attr.vendor_part_id
 *     @property             # <<<<<<<<<<<<<<
 *     def hw_ver(self):
 *         return self.dev_attr.hw_ver
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6hw_ver_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6hw_ver_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_7pyverbs_6device_10DeviceAttr_6hw_ver___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6hw_ver___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":401
 *     @property
 *     def hw_ver(self):
 *         return self.dev_attr.hw_ver             # <<<<<<<<<<<<<<
 *     @property
 *     def max_qp(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.hw_ver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":399
 *     def vendor_part_id(self):
 *         return self.dev_attr.vendor_part_id
 *     @property             # <<<<<<<<<<<<<<
 *     def hw_ver(self):
 *         return self.dev_attr.hw_ver
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.hw_ver.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":402
 *     def hw_ver(self):
 *         return self.dev_attr.hw_ver
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp(self):
 *         return self.dev_attr.max_qp
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_qp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_qp_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_7pyverbs_6device_10DeviceAttr_6max_qp___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_qp___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":404
 *     @property
 *     def max_qp(self):
 *         return self.dev_attr.max_qp             # <<<<<<<<<<<<<<
 *     @property
 *     def max_qp_wr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_qp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":402
 *     def hw_ver(self):
 *         return self.dev_attr.hw_ver
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp(self):
 *         return self.dev_attr.max_qp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_qp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":405
 *     def max_qp(self):
 *         return self.dev_attr.max_qp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp_wr(self):
 *         return self.dev_attr.max_qp_wr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9max_qp_wr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9max_qp_wr_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_7pyverbs_6device_10DeviceAttr_9max_qp_wr___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9max_qp_wr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":407
 *     @property
 *     def max_qp_wr(self):
 *         return self.dev_attr.max_qp_wr             # <<<<<<<<<<<<<<
 *     @property
 *     def device_cap_flags(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_qp_wr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":405
 *     def max_qp(self):
 *         return self.dev_attr.max_qp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp_wr(self):
 *         return self.dev_attr.max_qp_wr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_qp_wr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":408
 *     def max_qp_wr(self):
 *         return self.dev_attr.max_qp_wr
 *     @property             # <<<<<<<<<<<<<<
 *     def device_cap_flags(self):
 *         return self.dev_attr.device_cap_flags
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_16device_cap_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_16device_cap_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_7pyverbs_6device_10DeviceAttr_16device_cap_flags___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_16device_cap_flags___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":410
 *     @property
 *     def device_cap_flags(self):
 *         return self.dev_attr.device_cap_flags             # <<<<<<<<<<<<<<
 *     @property
 *     def max_sge(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.device_cap_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":408
 *     def max_qp_wr(self):
 *         return self.dev_attr.max_qp_wr
 *     @property             # <<<<<<<<<<<<<<
 *     def device_cap_flags(self):
 *         return self.dev_attr.device_cap_flags
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.device_cap_flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":411
 *     def device_cap_flags(self):
 *         return self.dev_attr.device_cap_flags
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sge(self):
 *         return self.dev_attr.max_sge
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_sge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_sge_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_7pyverbs_6device_10DeviceAttr_7max_sge___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_sge___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":413
 *     @property
 *     def max_sge(self):
 *         return self.dev_attr.max_sge             # <<<<<<<<<<<<<<
 *     @property
 *     def max_sge_rd(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_sge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":411
 *     def device_cap_flags(self):
 *         return self.dev_attr.device_cap_flags
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sge(self):
 *         return self.dev_attr.max_sge
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_sge.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":414
 *     def max_sge(self):
 *         return self.dev_attr.max_sge
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sge_rd(self):
 *         return self.dev_attr.max_sge_rd
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_10max_sge_rd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_10max_sge_rd_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_7pyverbs_6device_10DeviceAttr_10max_sge_rd___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_10max_sge_rd___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":416
 *     @property
 *     def max_sge_rd(self):
 *         return self.dev_attr.max_sge_rd             # <<<<<<<<<<<<<<
 *     @property
 *     def max_cq(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_sge_rd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":414
 *     def max_sge(self):
 *         return self.dev_attr.max_sge
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sge_rd(self):
 *         return self.dev_attr.max_sge_rd
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_sge_rd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":417
 *     def max_sge_rd(self):
 *         return self.dev_attr.max_sge_rd
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cq(self):
 *         return self.dev_attr.max_cq
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_cq_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_cq_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_7pyverbs_6device_10DeviceAttr_6max_cq___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_cq___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":419
 *     @property
 *     def max_cq(self):
 *         return self.dev_attr.max_cq             # <<<<<<<<<<<<<<
 *     @property
 *     def max_cqe(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_cq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":417
 *     def max_sge_rd(self):
 *         return self.dev_attr.max_sge_rd
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cq(self):
 *         return self.dev_attr.max_cq
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_cq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":420
 *     def max_cq(self):
 *         return self.dev_attr.max_cq
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cqe(self):
 *         return self.dev_attr.max_cqe
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_cqe_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_cqe_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_7pyverbs_6device_10DeviceAttr_7max_cqe___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_cqe___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":422
 *     @property
 *     def max_cqe(self):
 *         return self.dev_attr.max_cqe             # <<<<<<<<<<<<<<
 *     @property
 *     def max_mr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_cqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":420
 *     def max_cq(self):
 *         return self.dev_attr.max_cq
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cqe(self):
 *         return self.dev_attr.max_cqe
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_cqe.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":423
 *     def max_cqe(self):
 *         return self.dev_attr.max_cqe
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mr(self):
 *         return self.dev_attr.max_mr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_mr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_mr_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_7pyverbs_6device_10DeviceAttr_6max_mr___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_mr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":425
 *     @property
 *     def max_mr(self):
 *         return self.dev_attr.max_mr             # <<<<<<<<<<<<<<
 *     @property
 *     def max_pd(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_mr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":423
 *     def max_cqe(self):
 *         return self.dev_attr.max_cqe
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mr(self):
 *         return self.dev_attr.max_mr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_mr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":426
 *     def max_mr(self):
 *         return self.dev_attr.max_mr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_pd(self):
 *         return self.dev_attr.max_pd
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_pd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_pd_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_7pyverbs_6device_10DeviceAttr_6max_pd___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_pd___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":428
 *     @property
 *     def max_pd(self):
 *         return self.dev_attr.max_pd             # <<<<<<<<<<<<<<
 *     @property
 *     def max_qp_rd_atom(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":426
 *     def max_mr(self):
 *         return self.dev_attr.max_mr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_pd(self):
 *         return self.dev_attr.max_pd
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_pd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":429
 *     def max_pd(self):
 *         return self.dev_attr.max_pd
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp_rd_atom(self):
 *         return self.dev_attr.max_qp_rd_atom
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14max_qp_rd_atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14max_qp_rd_atom_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_7pyverbs_6device_10DeviceAttr_14max_qp_rd_atom___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14max_qp_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":431
 *     @property
 *     def max_qp_rd_atom(self):
 *         return self.dev_attr.max_qp_rd_atom             # <<<<<<<<<<<<<<
 *     @property
 *     def max_ee_rd_atom(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_qp_rd_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":429
 *     def max_pd(self):
 *         return self.dev_attr.max_pd
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp_rd_atom(self):
 *         return self.dev_attr.max_qp_rd_atom
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_qp_rd_atom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":432
 *     def max_qp_rd_atom(self):
 *         return self.dev_attr.max_qp_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ee_rd_atom(self):
 *         return self.dev_attr.max_ee_rd_atom
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14max_ee_rd_atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_14max_ee_rd_atom_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_7pyverbs_6device_10DeviceAttr_14max_ee_rd_atom___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_14max_ee_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":434
 *     @property
 *     def max_ee_rd_atom(self):
 *         return self.dev_attr.max_ee_rd_atom             # <<<<<<<<<<<<<<
 *     @property
 *     def max_res_rd_atom(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_ee_rd_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":432
 *     def max_qp_rd_atom(self):
 *         return self.dev_attr.max_qp_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ee_rd_atom(self):
 *         return self.dev_attr.max_ee_rd_atom
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_ee_rd_atom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":435
 *     def max_ee_rd_atom(self):
 *         return self.dev_attr.max_ee_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_res_rd_atom(self):
 *         return self.dev_attr.max_res_rd_atom
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_15max_res_rd_atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_15max_res_rd_atom_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_7pyverbs_6device_10DeviceAttr_15max_res_rd_atom___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_15max_res_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":437
 *     @property
 *     def max_res_rd_atom(self):
 *         return self.dev_attr.max_res_rd_atom             # <<<<<<<<<<<<<<
 *     @property
 *     def max_qp_init_rd_atom(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_res_rd_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":435
 *     def max_ee_rd_atom(self):
 *         return self.dev_attr.max_ee_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_res_rd_atom(self):
 *         return self.dev_attr.max_res_rd_atom
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_res_rd_atom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":438
 *     def max_res_rd_atom(self):
 *         return self.dev_attr.max_res_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp_init_rd_atom(self):
 *         return self.dev_attr.max_qp_init_rd_atom
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_19max_qp_init_rd_atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_19max_qp_init_rd_atom_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_7pyverbs_6device_10DeviceAttr_19max_qp_init_rd_atom___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_19max_qp_init_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":440
 *     @property
 *     def max_qp_init_rd_atom(self):
 *         return self.dev_attr.max_qp_init_rd_atom             # <<<<<<<<<<<<<<
 *     @property
 *     def max_ee_init_rd_atom(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_qp_init_rd_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":438
 *     def max_res_rd_atom(self):
 *         return self.dev_attr.max_res_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_qp_init_rd_atom(self):
 *         return self.dev_attr.max_qp_init_rd_atom
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_qp_init_rd_atom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":441
 *     def max_qp_init_rd_atom(self):
 *         return self.dev_attr.max_qp_init_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ee_init_rd_atom(self):
 *         return self.dev_attr.max_ee_init_rd_atom
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_19max_ee_init_rd_atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_19max_ee_init_rd_atom_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_7pyverbs_6device_10DeviceAttr_19max_ee_init_rd_atom___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_19max_ee_init_rd_atom___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":443
 *     @property
 *     def max_ee_init_rd_atom(self):
 *         return self.dev_attr.max_ee_init_rd_atom             # <<<<<<<<<<<<<<
 *     @property
 *     def atomic_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_ee_init_rd_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":441
 *     def max_qp_init_rd_atom(self):
 *         return self.dev_attr.max_qp_init_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ee_init_rd_atom(self):
 *         return self.dev_attr.max_ee_init_rd_atom
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_ee_init_rd_atom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":444
 *     def max_ee_init_rd_atom(self):
 *         return self.dev_attr.max_ee_init_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def atomic_caps(self):
 *         return self.dev_attr.atomic_cap
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_11atomic_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_11atomic_caps_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_7pyverbs_6device_10DeviceAttr_11atomic_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_11atomic_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":446
 *     @property
 *     def atomic_caps(self):
 *         return self.dev_attr.atomic_cap             # <<<<<<<<<<<<<<
 *     @property
 *     def max_ee(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py(__pyx_v_self->dev_attr.atomic_cap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":444
 *     def max_ee_init_rd_atom(self):
 *         return self.dev_attr.max_ee_init_rd_atom
 *     @property             # <<<<<<<<<<<<<<
 *     def atomic_caps(self):
 *         return self.dev_attr.atomic_cap
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.atomic_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":447
 *     def atomic_caps(self):
 *         return self.dev_attr.atomic_cap
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ee(self):
 *         return self.dev_attr.max_ee
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_ee_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_ee_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_7pyverbs_6device_10DeviceAttr_6max_ee___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_ee___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":449
 *     @property
 *     def max_ee(self):
 *         return self.dev_attr.max_ee             # <<<<<<<<<<<<<<
 *     @property
 *     def max_rdd(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_ee); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":447
 *     def atomic_caps(self):
 *         return self.dev_attr.atomic_cap
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ee(self):
 *         return self.dev_attr.max_ee
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_ee.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":450
 *     def max_ee(self):
 *         return self.dev_attr.max_ee
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rdd(self):
 *         return self.dev_attr.max_rdd
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_rdd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_rdd_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_7pyverbs_6device_10DeviceAttr_7max_rdd___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_rdd___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":452
 *     @property
 *     def max_rdd(self):
 *         return self.dev_attr.max_rdd             # <<<<<<<<<<<<<<
 *     @property
 *     def max_mw(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_rdd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":450
 *     def max_ee(self):
 *         return self.dev_attr.max_ee
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rdd(self):
 *         return self.dev_attr.max_rdd
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_rdd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":453
 *     def max_rdd(self):
 *         return self.dev_attr.max_rdd
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mw(self):
 *         return self.dev_attr.max_mw
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_mw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_mw_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_7pyverbs_6device_10DeviceAttr_6max_mw___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_mw___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":455
 *     @property
 *     def max_mw(self):
 *         return self.dev_attr.max_mw             # <<<<<<<<<<<<<<
 *     @property
 *     def max_raw_ipv6_qps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_mw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":453
 *     def max_rdd(self):
 *         return self.dev_attr.max_rdd
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mw(self):
 *         return self.dev_attr.max_mw
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_mw.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":456
 *     def max_mw(self):
 *         return self.dev_attr.max_mw
 *     @property             # <<<<<<<<<<<<<<
 *     def max_raw_ipv6_qps(self):
 *         return self.dev_attr.max_raw_ipv6_qp
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_16max_raw_ipv6_qps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_16max_raw_ipv6_qps_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_7pyverbs_6device_10DeviceAttr_16max_raw_ipv6_qps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_16max_raw_ipv6_qps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":458
 *     @property
 *     def max_raw_ipv6_qps(self):
 *         return self.dev_attr.max_raw_ipv6_qp             # <<<<<<<<<<<<<<
 *     @property
 *     def max_raw_ethy_qp(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_raw_ipv6_qp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":456
 *     def max_mw(self):
 *         return self.dev_attr.max_mw
 *     @property             # <<<<<<<<<<<<<<
 *     def max_raw_ipv6_qps(self):
 *         return self.dev_attr.max_raw_ipv6_qp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_raw_ipv6_qps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":459
 *     def max_raw_ipv6_qps(self):
 *         return self.dev_attr.max_raw_ipv6_qp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_raw_ethy_qp(self):
 *         return self.dev_attr.max_raw_ethy_qp
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_15max_raw_ethy_qp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_15max_raw_ethy_qp_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_7pyverbs_6device_10DeviceAttr_15max_raw_ethy_qp___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_15max_raw_ethy_qp___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":461
 *     @property
 *     def max_raw_ethy_qp(self):
 *         return self.dev_attr.max_raw_ethy_qp             # <<<<<<<<<<<<<<
 *     @property
 *     def max_mcast_grp(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_raw_ethy_qp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":459
 *     def max_raw_ipv6_qps(self):
 *         return self.dev_attr.max_raw_ipv6_qp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_raw_ethy_qp(self):
 *         return self.dev_attr.max_raw_ethy_qp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_raw_ethy_qp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":462
 *     def max_raw_ethy_qp(self):
 *         return self.dev_attr.max_raw_ethy_qp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mcast_grp(self):
 *         return self.dev_attr.max_mcast_grp
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_13max_mcast_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_13max_mcast_grp_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_7pyverbs_6device_10DeviceAttr_13max_mcast_grp___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_13max_mcast_grp___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":464
 *     @property
 *     def max_mcast_grp(self):
 *         return self.dev_attr.max_mcast_grp             # <<<<<<<<<<<<<<
 *     @property
 *     def max_mcast_qp_attach(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_mcast_grp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":462
 *     def max_raw_ethy_qp(self):
 *         return self.dev_attr.max_raw_ethy_qp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mcast_grp(self):
 *         return self.dev_attr.max_mcast_grp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_mcast_grp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":465
 *     def max_mcast_grp(self):
 *         return self.dev_attr.max_mcast_grp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mcast_qp_attach(self):
 *         return self.dev_attr.max_mcast_qp_attach
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_19max_mcast_qp_attach_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_19max_mcast_qp_attach_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_7pyverbs_6device_10DeviceAttr_19max_mcast_qp_attach___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_19max_mcast_qp_attach___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":467
 *     @property
 *     def max_mcast_qp_attach(self):
 *         return self.dev_attr.max_mcast_qp_attach             # <<<<<<<<<<<<<<
 *     @property
 *     def max_ah(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_mcast_qp_attach); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":465
 *     def max_mcast_grp(self):
 *         return self.dev_attr.max_mcast_grp
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mcast_qp_attach(self):
 *         return self.dev_attr.max_mcast_qp_attach
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_mcast_qp_attach.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":468
 *     def max_mcast_qp_attach(self):
 *         return self.dev_attr.max_mcast_qp_attach
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ah(self):
 *         return self.dev_attr.max_ah
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_ah_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_6max_ah_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_7pyverbs_6device_10DeviceAttr_6max_ah___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_6max_ah___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":470
 *     @property
 *     def max_ah(self):
 *         return self.dev_attr.max_ah             # <<<<<<<<<<<<<<
 *     @property
 *     def max_fmr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_ah); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":468
 *     def max_mcast_qp_attach(self):
 *         return self.dev_attr.max_mcast_qp_attach
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ah(self):
 *         return self.dev_attr.max_ah
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_ah.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":471
 *     def max_ah(self):
 *         return self.dev_attr.max_ah
 *     @property             # <<<<<<<<<<<<<<
 *     def max_fmr(self):
 *         return self.dev_attr.max_fmr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_fmr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_fmr_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_7pyverbs_6device_10DeviceAttr_7max_fmr___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_fmr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":473
 *     @property
 *     def max_fmr(self):
 *         return self.dev_attr.max_fmr             # <<<<<<<<<<<<<<
 *     @property
 *     def max_map_per_fmr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_fmr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":471
 *     def max_ah(self):
 *         return self.dev_attr.max_ah
 *     @property             # <<<<<<<<<<<<<<
 *     def max_fmr(self):
 *         return self.dev_attr.max_fmr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_fmr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":474
 *     def max_fmr(self):
 *         return self.dev_attr.max_fmr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_map_per_fmr(self):
 *         return self.dev_attr.max_map_per_fmr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_15max_map_per_fmr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_15max_map_per_fmr_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_7pyverbs_6device_10DeviceAttr_15max_map_per_fmr___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_15max_map_per_fmr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":476
 *     @property
 *     def max_map_per_fmr(self):
 *         return self.dev_attr.max_map_per_fmr             # <<<<<<<<<<<<<<
 *     @property
 *     def max_srq(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_map_per_fmr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":474
 *     def max_fmr(self):
 *         return self.dev_attr.max_fmr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_map_per_fmr(self):
 *         return self.dev_attr.max_map_per_fmr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_map_per_fmr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":477
 *     def max_map_per_fmr(self):
 *         return self.dev_attr.max_map_per_fmr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_srq(self):
 *         return self.dev_attr.max_srq
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_srq_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_7max_srq_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_7pyverbs_6device_10DeviceAttr_7max_srq___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_7max_srq___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":479
 *     @property
 *     def max_srq(self):
 *         return self.dev_attr.max_srq             # <<<<<<<<<<<<<<
 *     @property
 *     def max_srq_wr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_srq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":477
 *     def max_map_per_fmr(self):
 *         return self.dev_attr.max_map_per_fmr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_srq(self):
 *         return self.dev_attr.max_srq
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_srq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":480
 *     def max_srq(self):
 *         return self.dev_attr.max_srq
 *     @property             # <<<<<<<<<<<<<<
 *     def max_srq_wr(self):
 *         return self.dev_attr.max_srq_wr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_10max_srq_wr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_10max_srq_wr_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_7pyverbs_6device_10DeviceAttr_10max_srq_wr___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_10max_srq_wr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":482
 *     @property
 *     def max_srq_wr(self):
 *         return self.dev_attr.max_srq_wr             # <<<<<<<<<<<<<<
 *     @property
 *     def max_srq_sge(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_srq_wr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":480
 *     def max_srq(self):
 *         return self.dev_attr.max_srq
 *     @property             # <<<<<<<<<<<<<<
 *     def max_srq_wr(self):
 *         return self.dev_attr.max_srq_wr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_srq_wr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":483
 *     def max_srq_wr(self):
 *         return self.dev_attr.max_srq_wr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_srq_sge(self):
 *         return self.dev_attr.max_srq_sge
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_11max_srq_sge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_11max_srq_sge_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_7pyverbs_6device_10DeviceAttr_11max_srq_sge___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_11max_srq_sge___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":485
 *     @property
 *     def max_srq_sge(self):
 *         return self.dev_attr.max_srq_sge             # <<<<<<<<<<<<<<
 *     @property
 *     def max_pkeys(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_srq_sge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":483
 *     def max_srq_wr(self):
 *         return self.dev_attr.max_srq_wr
 *     @property             # <<<<<<<<<<<<<<
 *     def max_srq_sge(self):
 *         return self.dev_attr.max_srq_sge
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_srq_sge.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":486
 *     def max_srq_sge(self):
 *         return self.dev_attr.max_srq_sge
 *     @property             # <<<<<<<<<<<<<<
 *     def max_pkeys(self):
 *         return self.dev_attr.max_pkeys
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9max_pkeys_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_9max_pkeys_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_7pyverbs_6device_10DeviceAttr_9max_pkeys___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_9max_pkeys___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":488
 *     @property
 *     def max_pkeys(self):
 *         return self.dev_attr.max_pkeys             # <<<<<<<<<<<<<<
 *     @property
 *     def local_ca_ack_delay(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_pkeys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":486
 *     def max_srq_sge(self):
 *         return self.dev_attr.max_srq_sge
 *     @property             # <<<<<<<<<<<<<<
 *     def max_pkeys(self):
 *         return self.dev_attr.max_pkeys
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.max_pkeys.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":489
 *     def max_pkeys(self):
 *         return self.dev_attr.max_pkeys
 *     @property             # <<<<<<<<<<<<<<
 *     def local_ca_ack_delay(self):
 *         return self.dev_attr.local_ca_ack_delay
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_18local_ca_ack_delay_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_18local_ca_ack_delay_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_7pyverbs_6device_10DeviceAttr_18local_ca_ack_delay___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_18local_ca_ack_delay___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":491
 *     @property
 *     def local_ca_ack_delay(self):
 *         return self.dev_attr.local_ca_ack_delay             # <<<<<<<<<<<<<<
 *     @property
 *     def phys_port_cnt(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.local_ca_ack_delay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":489
 *     def max_pkeys(self):
 *         return self.dev_attr.max_pkeys
 *     @property             # <<<<<<<<<<<<<<
 *     def local_ca_ack_delay(self):
 *         return self.dev_attr.local_ca_ack_delay
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.local_ca_ack_delay.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":492
 *     def local_ca_ack_delay(self):
 *         return self.dev_attr.local_ca_ack_delay
 *     @property             # <<<<<<<<<<<<<<
 *     def phys_port_cnt(self):
 *         return self.dev_attr.phys_port_cnt
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_13phys_port_cnt_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_13phys_port_cnt_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_7pyverbs_6device_10DeviceAttr_13phys_port_cnt___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_13phys_port_cnt___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__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);

  /* "pyverbs/device.pyx":494
 *     @property
 *     def phys_port_cnt(self):
 *         return self.dev_attr.phys_port_cnt             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.phys_port_cnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":492
 *     def local_ca_ack_delay(self):
 *         return self.dev_attr.local_ca_ack_delay
 *     @property             # <<<<<<<<<<<<<<
 *     def phys_port_cnt(self):
 *         return self.dev_attr.phys_port_cnt
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.phys_port_cnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":496
 *         return self.dev_attr.phys_port_cnt
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<22}: {:<20}\n'
 *         return print_format.format('FW version', self.fw_version) +\
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_1__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_10DeviceAttr___str__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr___str__(struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self) {
  PyObject *__pyx_v_print_format = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":497
 * 
 *     def __str__(self):
 *         print_format = '{:<22}: {:<20}\n'             # <<<<<<<<<<<<<<
 *         return print_format.format('FW version', self.fw_version) +\
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_22_20);
  __pyx_v_print_format = __pyx_mstate_global->__pyx_kp_u_22_20;

  /* "pyverbs/device.pyx":498
 *     def __str__(self):
 *         print_format = '{:<22}: {:<20}\n'
 *         return print_format.format('FW version', self.fw_version) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_fw_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_FW_version, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":499
 *         print_format = '{:<22}: {:<20}\n'
 *         return print_format.format('FW version', self.fw_version) +\
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_guid_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_node_guid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 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_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Node_guid, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":498
 *     def __str__(self):
 *         print_format = '{:<22}: {:<20}\n'
 *         return print_format.format('FW version', self.fw_version) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":500
 *         return print_format.format('FW version', self.fw_version) +\
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_guid_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sys_image_guid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__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_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Sys_image_GUID, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":499
 *         print_format = '{:<22}: {:<20}\n'
 *         return print_format.format('FW version', self.fw_version) +\
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":501
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_mr_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyNumber_Hex(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "replace");
    __PYX_ERR(0, 501, __pyx_L1_error)
  }
  __pyx_t_5 = PyUnicode_Replace(((PyObject*)__pyx_t_1), __pyx_mstate_global->__pyx_n_u_L, __pyx_mstate_global->__pyx_kp_u__3, -1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_MR_size, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":500
 *         return print_format.format('FW version', self.fw_version) +\
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
*/
  __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":502
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_page_size_cap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Hex(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_4 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "replace");
    __PYX_ERR(0, 502, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_Replace(((PyObject*)__pyx_t_4), __pyx_mstate_global->__pyx_n_u_L, __pyx_mstate_global->__pyx_kp_u__3, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Page_size_cap, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":501
 *             print_format.format('Node guid', guid_format(self.node_guid)) +\
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":503
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
 *             print_format.format('HW version', self.hw_ver) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_vendor_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyNumber_Hex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Vendor_ID, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":502
 *             print_format.format('Sys image GUID', guid_format(self.sys_image_guid)) +\
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
*/
  __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":504
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\             # <<<<<<<<<<<<<<
 *             print_format.format('HW version', self.hw_ver) +\
 *             print_format.format('Max QP', self.max_qp) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_vendor_part_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Vendor_part_ID, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":503
 *             print_format.format('Max MR size', hex(self.max_mr_size).replace('L', '')) +\
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
 *             print_format.format('HW version', self.hw_ver) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":505
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
 *             print_format.format('HW version', self.hw_ver) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP', self.max_qp) +\
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_hw_ver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_HW_version, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":504
 *             print_format.format('Page size cap', hex(self.page_size_cap).replace('L', '')) +\
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\             # <<<<<<<<<<<<<<
 *             print_format.format('HW version', self.hw_ver) +\
 *             print_format.format('Max QP', self.max_qp) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":506
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
 *             print_format.format('HW version', self.hw_ver) +\
 *             print_format.format('Max QP', self.max_qp) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
 *             print_format.format('Device cap flags',
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_qp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_QP, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":505
 *             print_format.format('Vendor ID', hex(self.vendor_id)) +\
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
 *             print_format.format('HW version', self.hw_ver) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP', self.max_qp) +\
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
*/
  __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":507
 *             print_format.format('HW version', self.hw_ver) +\
 *             print_format.format('Max QP', self.max_qp) +\
 *             print_format.format('Max QP WR', self.max_qp_wr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Device cap flags',
 *                                 translate_device_caps(self.device_cap_flags)) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_qp_wr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_QP_WR, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":506
 *             print_format.format('Vendor part ID', self.vendor_part_id) +\
 *             print_format.format('HW version', self.hw_ver) +\
 *             print_format.format('Max QP', self.max_qp) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
 *             print_format.format('Device cap flags',
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":509
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
 *             print_format.format('Device cap flags',
 *                                 translate_device_caps(self.device_cap_flags)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SGE', self.max_sge) +\
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_translate_device_caps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device_cap_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __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_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }

  /* "pyverbs/device.pyx":508
 *             print_format.format('Max QP', self.max_qp) +\
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
 *             print_format.format('Device cap flags',             # <<<<<<<<<<<<<<
 *                                 translate_device_caps(self.device_cap_flags)) +\
 *             print_format.format('Max SGE', self.max_sge) +\
*/
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Device_cap_flags, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":507
 *             print_format.format('HW version', self.hw_ver) +\
 *             print_format.format('Max QP', self.max_qp) +\
 *             print_format.format('Max QP WR', self.max_qp_wr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Device cap flags',
 *                                 translate_device_caps(self.device_cap_flags)) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":510
 *             print_format.format('Device cap flags',
 *                                 translate_device_caps(self.device_cap_flags)) +\
 *             print_format.format('Max SGE', self.max_sge) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
 *             print_format.format('MAX CQ', self.max_cq) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_sge); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_SGE, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":509
 *             print_format.format('Max QP WR', self.max_qp_wr) +\
 *             print_format.format('Device cap flags',
 *                                 translate_device_caps(self.device_cap_flags)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SGE', self.max_sge) +\
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":511
 *                                 translate_device_caps(self.device_cap_flags)) +\
 *             print_format.format('Max SGE', self.max_sge) +\
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\             # <<<<<<<<<<<<<<
 *             print_format.format('MAX CQ', self.max_cq) +\
 *             print_format.format('Max CQE', self.max_cqe) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_sge_rd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_SGE_RD, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":510
 *             print_format.format('Device cap flags',
 *                                 translate_device_caps(self.device_cap_flags)) +\
 *             print_format.format('Max SGE', self.max_sge) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
 *             print_format.format('MAX CQ', self.max_cq) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":512
 *             print_format.format('Max SGE', self.max_sge) +\
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
 *             print_format.format('MAX CQ', self.max_cq) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max CQE', self.max_cqe) +\
 *             print_format.format('Max MR', self.max_mr) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_cq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_MAX_CQ, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":511
 *                                 translate_device_caps(self.device_cap_flags)) +\
 *             print_format.format('Max SGE', self.max_sge) +\
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\             # <<<<<<<<<<<<<<
 *             print_format.format('MAX CQ', self.max_cq) +\
 *             print_format.format('Max CQE', self.max_cqe) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":513
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
 *             print_format.format('MAX CQ', self.max_cq) +\
 *             print_format.format('Max CQE', self.max_cqe) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MR', self.max_mr) +\
 *             print_format.format('Max PD', self.max_pd) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_cqe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_CQE, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":512
 *             print_format.format('Max SGE', self.max_sge) +\
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
 *             print_format.format('MAX CQ', self.max_cq) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max CQE', self.max_cqe) +\
 *             print_format.format('Max MR', self.max_mr) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":514
 *             print_format.format('MAX CQ', self.max_cq) +\
 *             print_format.format('Max CQE', self.max_cqe) +\
 *             print_format.format('Max MR', self.max_mr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max PD', self.max_pd) +\
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_mr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_MR, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":513
 *             print_format.format('Max SGE RD', self.max_sge_rd) +\
 *             print_format.format('MAX CQ', self.max_cq) +\
 *             print_format.format('Max CQE', self.max_cqe) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MR', self.max_mr) +\
 *             print_format.format('Max PD', self.max_pd) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":515
 *             print_format.format('Max CQE', self.max_cqe) +\
 *             print_format.format('Max MR', self.max_mr) +\
 *             print_format.format('Max PD', self.max_pd) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_PD, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":514
 *             print_format.format('MAX CQ', self.max_cq) +\
 *             print_format.format('Max CQE', self.max_cqe) +\
 *             print_format.format('Max MR', self.max_mr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max PD', self.max_pd) +\
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":516
 *             print_format.format('Max MR', self.max_mr) +\
 *             print_format.format('Max PD', self.max_pd) +\
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_qp_rd_atom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_QP_RD_atom, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":515
 *             print_format.format('Max CQE', self.max_cqe) +\
 *             print_format.format('Max MR', self.max_mr) +\
 *             print_format.format('Max PD', self.max_pd) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":517
 *             print_format.format('Max PD', self.max_pd) +\
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_ee_rd_atom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_EE_RD_atom, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":516
 *             print_format.format('Max MR', self.max_mr) +\
 *             print_format.format('Max PD', self.max_pd) +\
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":518
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_res_rd_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_res_RD_atom, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":517
 *             print_format.format('Max PD', self.max_pd) +\
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":519
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
 *             print_format.format('Atomic caps', self.atomic_caps) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_qp_init_rd_atom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_QP_init_RD_atom, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":518
 *             print_format.format('Max QP RD atom', self.max_qp_rd_atom) +\
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":520
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Atomic caps', self.atomic_caps) +\
 *             print_format.format('Max EE', self.max_ee) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_ee_init_rd_atom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_EE_init_RD_atom, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":519
 *             print_format.format('Max EE RD atom', self.max_ee_rd_atom) +\
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
 *             print_format.format('Atomic caps', self.atomic_caps) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":521
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
 *             print_format.format('Atomic caps', self.atomic_caps) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max EE', self.max_ee) +\
 *             print_format.format('Max RDD', self.max_rdd) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_atomic_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Atomic_caps, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":520
 *             print_format.format('Max res RD atom', self.max_res_rd_atom) +\
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Atomic caps', self.atomic_caps) +\
 *             print_format.format('Max EE', self.max_ee) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":522
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
 *             print_format.format('Atomic caps', self.atomic_caps) +\
 *             print_format.format('Max EE', self.max_ee) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max RDD', self.max_rdd) +\
 *             print_format.format('Max MW', self.max_mw) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_ee); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_EE, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":521
 *             print_format.format('Max QP init RD atom', self.max_qp_init_rd_atom) +\
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
 *             print_format.format('Atomic caps', self.atomic_caps) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max EE', self.max_ee) +\
 *             print_format.format('Max RDD', self.max_rdd) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":523
 *             print_format.format('Atomic caps', self.atomic_caps) +\
 *             print_format.format('Max EE', self.max_ee) +\
 *             print_format.format('Max RDD', self.max_rdd) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MW', self.max_mw) +\
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_rdd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_RDD, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":522
 *             print_format.format('Max EE init RD atom', self.max_ee_init_rd_atom) +\
 *             print_format.format('Atomic caps', self.atomic_caps) +\
 *             print_format.format('Max EE', self.max_ee) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max RDD', self.max_rdd) +\
 *             print_format.format('Max MW', self.max_mw) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":524
 *             print_format.format('Max EE', self.max_ee) +\
 *             print_format.format('Max RDD', self.max_rdd) +\
 *             print_format.format('Max MW', self.max_mw) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_mw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_MW, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":523
 *             print_format.format('Atomic caps', self.atomic_caps) +\
 *             print_format.format('Max EE', self.max_ee) +\
 *             print_format.format('Max RDD', self.max_rdd) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MW', self.max_mw) +\
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":525
 *             print_format.format('Max RDD', self.max_rdd) +\
 *             print_format.format('Max MW', self.max_mw) +\
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_raw_ipv6_qps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_raw_IPv6_QPs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":524
 *             print_format.format('Max EE', self.max_ee) +\
 *             print_format.format('Max RDD', self.max_rdd) +\
 *             print_format.format('Max MW', self.max_mw) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":526
 *             print_format.format('Max MW', self.max_mw) +\
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_raw_ethy_qp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_raw_ethy_QP, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":525
 *             print_format.format('Max RDD', self.max_rdd) +\
 *             print_format.format('Max MW', self.max_mw) +\
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":527
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
 *             print_format.format('Max AH', self.max_ah) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_mcast_grp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_mcast_group, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":526
 *             print_format.format('Max MW', self.max_mw) +\
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":528
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max AH', self.max_ah) +\
 *             print_format.format('Max FMR', self.max_fmr) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_mcast_qp_attach); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_mcast_QP_attach, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":527
 *             print_format.format('Max raw IPv6 QPs', self.max_raw_ipv6_qps) +\
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
 *             print_format.format('Max AH', self.max_ah) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":529
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
 *             print_format.format('Max AH', self.max_ah) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max FMR', self.max_fmr) +\
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_ah); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_AH, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":528
 *             print_format.format('Max raw ethy QP', self.max_raw_ethy_qp) +\
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max AH', self.max_ah) +\
 *             print_format.format('Max FMR', self.max_fmr) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":530
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
 *             print_format.format('Max AH', self.max_ah) +\
 *             print_format.format('Max FMR', self.max_fmr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
 *             print_format.format('Max SRQ', self.max_srq) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_fmr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_FMR, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":529
 *             print_format.format('Max mcast group', self.max_mcast_grp) +\
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
 *             print_format.format('Max AH', self.max_ah) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max FMR', self.max_fmr) +\
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":531
 *             print_format.format('Max AH', self.max_ah) +\
 *             print_format.format('Max FMR', self.max_fmr) +\
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SRQ', self.max_srq) +\
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_map_per_fmr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_map_per_FMR, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":530
 *             print_format.format('Max mcast QP attach', self.max_mcast_qp_attach) +\
 *             print_format.format('Max AH', self.max_ah) +\
 *             print_format.format('Max FMR', self.max_fmr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
 *             print_format.format('Max SRQ', self.max_srq) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":532
 *             print_format.format('Max FMR', self.max_fmr) +\
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
 *             print_format.format('Max SRQ', self.max_srq) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_srq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_SRQ, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":531
 *             print_format.format('Max AH', self.max_ah) +\
 *             print_format.format('Max FMR', self.max_fmr) +\
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SRQ', self.max_srq) +\
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":533
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
 *             print_format.format('Max SRQ', self.max_srq) +\
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
 *             print_format.format('Max PKeys', self.max_pkeys) +\
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_srq_wr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_SRQ_WR, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":532
 *             print_format.format('Max FMR', self.max_fmr) +\
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
 *             print_format.format('Max SRQ', self.max_srq) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":534
 *             print_format.format('Max SRQ', self.max_srq) +\
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max PKeys', self.max_pkeys) +\
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_srq_sge); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_SRQ_SGE, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":533
 *             print_format.format('Max map per FMR', self.max_map_per_fmr) +\
 *             print_format.format('Max SRQ', self.max_srq) +\
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
 *             print_format.format('Max PKeys', self.max_pkeys) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":535
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
 *             print_format.format('Max PKeys', self.max_pkeys) +\             # <<<<<<<<<<<<<<
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\
 *             print_format.format('Phys port count', self.phys_port_cnt)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_pkeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_PKeys, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":534
 *             print_format.format('Max SRQ', self.max_srq) +\
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max PKeys', self.max_pkeys) +\
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":536
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
 *             print_format.format('Max PKeys', self.max_pkeys) +\
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Phys port count', self.phys_port_cnt)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_local_ca_ack_delay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_local_CA_ack_delay, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":535
 *             print_format.format('Max SRQ WR', self.max_srq_wr) +\
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
 *             print_format.format('Max PKeys', self.max_pkeys) +\             # <<<<<<<<<<<<<<
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\
 *             print_format.format('Phys port count', self.phys_port_cnt)
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":537
 *             print_format.format('Max PKeys', self.max_pkeys) +\
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\
 *             print_format.format('Phys port count', self.phys_port_cnt)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_phys_port_cnt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Phys_port_count, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":536
 *             print_format.format('Max SRQ SGE', self.max_srq_sge) +\
 *             print_format.format('Max PKeys', self.max_pkeys) +\
 *             print_format.format('local CA ack delay', self.local_ca_ack_delay) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Phys port count', self.phys_port_cnt)
 * 
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":496
 *         return self.dev_attr.phys_port_cnt
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<22}: {:<20}\n'
 *         return print_format.format('FW version', self.fw_version) +\
*/

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_3__reduce_cython__(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_7pyverbs_6device_10DeviceAttr_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10DeviceAttr_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_3__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_10DeviceAttr_2__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10DeviceAttr_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_5__setstate_cython__(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_7pyverbs_6device_10DeviceAttr_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10DeviceAttr_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_10DeviceAttr_5__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.DeviceAttr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_10DeviceAttr_4__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_10DeviceAttr_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DeviceAttr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":541
 * 
 * cdef class QueryDeviceExInput(PyverbsObject):
 *     def __init__(self, comp_mask):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         self.ex_input.comp_mask = comp_mask
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_18QueryDeviceExInput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyverbs_6device_18QueryDeviceExInput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comp_mask = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {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_comp_mask,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, 541, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __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, 541, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 541, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      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, 541, __pyx_L3_error)
    }
    __pyx_v_comp_mask = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 541, __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("pyverbs.device.QueryDeviceExInput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_18QueryDeviceExInput___init__(((struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *)__pyx_v_self), __pyx_v_comp_mask);

  /* 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_7pyverbs_6device_18QueryDeviceExInput___init__(struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_self, PyObject *__pyx_v_comp_mask) {
  int __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":542
 * cdef class QueryDeviceExInput(PyverbsObject):
 *     def __init__(self, comp_mask):
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         self.ex_input.comp_mask = comp_mask
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":543
 *     def __init__(self, comp_mask):
 *         super().__init__()
 *         self.ex_input.comp_mask = comp_mask             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ex_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_comp_mask, __pyx_v_comp_mask) < (0)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":541
 * 
 * cdef class QueryDeviceExInput(PyverbsObject):
 *     def __init__(self, comp_mask):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         self.ex_input.comp_mask = comp_mask
*/

  /* function exit code */
  __pyx_r = 0;
  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("pyverbs.device.QueryDeviceExInput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_3__reduce_cython__(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_7pyverbs_6device_18QueryDeviceExInput_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_3__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_18QueryDeviceExInput_2__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_18QueryDeviceExInput_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_2, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.QueryDeviceExInput.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_5__setstate_cython__(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_7pyverbs_6device_18QueryDeviceExInput_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_5__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.QueryDeviceExInput.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_18QueryDeviceExInput_4__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_18QueryDeviceExInput_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_2, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.QueryDeviceExInput.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":547
 * 
 * cdef class ODPCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def general_caps(self):
 *         return self.odp_caps.general_caps
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_12general_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_12general_caps_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_7pyverbs_6device_7ODPCaps_12general_caps___get__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_12general_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__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);

  /* "pyverbs/device.pyx":549
 *     @property
 *     def general_caps(self):
 *         return self.odp_caps.general_caps             # <<<<<<<<<<<<<<
 *     @property
 *     def rc_odp_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint64_t(__pyx_v_self->odp_caps.general_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":547
 * 
 * cdef class ODPCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def general_caps(self):
 *         return self.odp_caps.general_caps
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.general_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":550
 *     def general_caps(self):
 *         return self.odp_caps.general_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def rc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.rc_odp_caps
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_11rc_odp_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_11rc_odp_caps_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_7pyverbs_6device_7ODPCaps_11rc_odp_caps___get__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_11rc_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__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);

  /* "pyverbs/device.pyx":552
 *     @property
 *     def rc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.rc_odp_caps             # <<<<<<<<<<<<<<
 *     @property
 *     def uc_odp_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->odp_caps.per_transport_caps.rc_odp_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":550
 *     def general_caps(self):
 *         return self.odp_caps.general_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def rc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.rc_odp_caps
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.rc_odp_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":553
 *     def rc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.rc_odp_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def uc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.uc_odp_caps
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_11uc_odp_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_11uc_odp_caps_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_7pyverbs_6device_7ODPCaps_11uc_odp_caps___get__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_11uc_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__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);

  /* "pyverbs/device.pyx":555
 *     @property
 *     def uc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.uc_odp_caps             # <<<<<<<<<<<<<<
 *     @property
 *     def ud_odp_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->odp_caps.per_transport_caps.uc_odp_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":553
 *     def rc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.rc_odp_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def uc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.uc_odp_caps
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.uc_odp_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":556
 *     def uc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.uc_odp_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def ud_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.ud_odp_caps
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_11ud_odp_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_11ud_odp_caps_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_7pyverbs_6device_7ODPCaps_11ud_odp_caps___get__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_11ud_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__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);

  /* "pyverbs/device.pyx":558
 *     @property
 *     def ud_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.ud_odp_caps             # <<<<<<<<<<<<<<
 *     @property
 *     def xrc_odp_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->odp_caps.per_transport_caps.ud_odp_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":556
 *     def uc_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.uc_odp_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def ud_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.ud_odp_caps
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.ud_odp_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":559
 *     def ud_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.ud_odp_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def xrc_odp_caps(self):
 *         return self.xrc_odp_caps
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_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_7pyverbs_6device_7ODPCaps_12xrc_odp_caps___get__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_12xrc_odp_caps___get__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":561
 *     @property
 *     def xrc_odp_caps(self):
 *         return self.xrc_odp_caps             # <<<<<<<<<<<<<<
 *     @xrc_odp_caps.setter
 *     def xrc_odp_caps(self, val):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->xrc_odp_caps);
  __pyx_r = __pyx_v_self->xrc_odp_caps;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":559
 *     def ud_odp_caps(self):
 *         return self.odp_caps.per_transport_caps.ud_odp_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def xrc_odp_caps(self):
 *         return self.xrc_odp_caps
*/

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

/* "pyverbs/device.pyx":562
 *     def xrc_odp_caps(self):
 *         return self.xrc_odp_caps
 *     @xrc_odp_caps.setter             # <<<<<<<<<<<<<<
 *     def xrc_odp_caps(self, val):
 *        self.xrc_odp_caps = val
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  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_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_2__set__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_2__set__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyverbs/device.pyx":564
 *     @xrc_odp_caps.setter
 *     def xrc_odp_caps(self, val):
 *        self.xrc_odp_caps = val             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_INCREF(__pyx_v_val);
  __Pyx_GIVEREF(__pyx_v_val);
  __Pyx_GOTREF(__pyx_v_self->xrc_odp_caps);
  __Pyx_DECREF(__pyx_v_self->xrc_odp_caps);
  __pyx_v_self->xrc_odp_caps = __pyx_v_val;

  /* "pyverbs/device.pyx":562
 *     def xrc_odp_caps(self):
 *         return self.xrc_odp_caps
 *     @xrc_odp_caps.setter             # <<<<<<<<<<<<<<
 *     def xrc_odp_caps(self, val):
 *        self.xrc_odp_caps = val
*/

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

/* "pyverbs/device.pyx":566
 *        self.xrc_odp_caps = val
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         general_caps = {e.IBV_ODP_SUPPORT: 'IBV_ODP_SUPPORT',
 *               e.IBV_ODP_SUPPORT_IMPLICIT: 'IBV_ODP_SUPPORT_IMPLICIT'}
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_1__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_7ODPCaps___str__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps___str__(struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self) {
  PyObject *__pyx_v_general_caps = NULL;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_print_format = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":567
 * 
 *     def __str__(self):
 *         general_caps = {e.IBV_ODP_SUPPORT: 'IBV_ODP_SUPPORT',             # <<<<<<<<<<<<<<
 *               e.IBV_ODP_SUPPORT_IMPLICIT: 'IBV_ODP_SUPPORT_IMPLICIT'}
 * 
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py(IBV_ODP_SUPPORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT) < (0)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":568
 *     def __str__(self):
 *         general_caps = {e.IBV_ODP_SUPPORT: 'IBV_ODP_SUPPORT',
 *               e.IBV_ODP_SUPPORT_IMPLICIT: 'IBV_ODP_SUPPORT_IMPLICIT'}             # <<<<<<<<<<<<<<
 * 
 *         l = {e.IBV_ODP_SUPPORT_SEND: 'IBV_ODP_SUPPORT_SEND',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py(IBV_ODP_SUPPORT_IMPLICIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_IMPLICIT) < (0)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_general_caps = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":570
 *               e.IBV_ODP_SUPPORT_IMPLICIT: 'IBV_ODP_SUPPORT_IMPLICIT'}
 * 
 *         l = {e.IBV_ODP_SUPPORT_SEND: 'IBV_ODP_SUPPORT_SEND',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_RECV: 'IBV_ODP_SUPPORT_RECV',
 *              e.IBV_ODP_SUPPORT_WRITE: 'IBV_ODP_SUPPORT_WRITE',
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_SEND); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_SEND) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":571
 * 
 *         l = {e.IBV_ODP_SUPPORT_SEND: 'IBV_ODP_SUPPORT_SEND',
 *              e.IBV_ODP_SUPPORT_RECV: 'IBV_ODP_SUPPORT_RECV',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_WRITE: 'IBV_ODP_SUPPORT_WRITE',
 *              e.IBV_ODP_SUPPORT_READ: 'IBV_ODP_SUPPORT_READ',
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_RECV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_RECV) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":572
 *         l = {e.IBV_ODP_SUPPORT_SEND: 'IBV_ODP_SUPPORT_SEND',
 *              e.IBV_ODP_SUPPORT_RECV: 'IBV_ODP_SUPPORT_RECV',
 *              e.IBV_ODP_SUPPORT_WRITE: 'IBV_ODP_SUPPORT_WRITE',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_READ: 'IBV_ODP_SUPPORT_READ',
 *              e.IBV_ODP_SUPPORT_ATOMIC: 'IBV_ODP_SUPPORT_ATOMIC',
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_WRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_WRITE) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":573
 *              e.IBV_ODP_SUPPORT_RECV: 'IBV_ODP_SUPPORT_RECV',
 *              e.IBV_ODP_SUPPORT_WRITE: 'IBV_ODP_SUPPORT_WRITE',
 *              e.IBV_ODP_SUPPORT_READ: 'IBV_ODP_SUPPORT_READ',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_ATOMIC: 'IBV_ODP_SUPPORT_ATOMIC',
 *              e.IBV_ODP_SUPPORT_SRQ_RECV: 'IBV_ODP_SUPPORT_SRQ_RECV',
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_READ); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_READ) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":574
 *              e.IBV_ODP_SUPPORT_WRITE: 'IBV_ODP_SUPPORT_WRITE',
 *              e.IBV_ODP_SUPPORT_READ: 'IBV_ODP_SUPPORT_READ',
 *              e.IBV_ODP_SUPPORT_ATOMIC: 'IBV_ODP_SUPPORT_ATOMIC',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_SRQ_RECV: 'IBV_ODP_SUPPORT_SRQ_RECV',
 *              e.IBV_ODP_SUPPORT_FLUSH: 'IBV_ODP_SUPPORT_FLUSH',
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_ATOMIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_ATOMIC) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":575
 *              e.IBV_ODP_SUPPORT_READ: 'IBV_ODP_SUPPORT_READ',
 *              e.IBV_ODP_SUPPORT_ATOMIC: 'IBV_ODP_SUPPORT_ATOMIC',
 *              e.IBV_ODP_SUPPORT_SRQ_RECV: 'IBV_ODP_SUPPORT_SRQ_RECV',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_FLUSH: 'IBV_ODP_SUPPORT_FLUSH',
 *              e.IBV_ODP_SUPPORT_ATOMIC_WRITE: 'IBV_ODP_SUPPORT_ATOMIC_WRITE'}
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_SRQ_RECV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_SRQ_RECV) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":576
 *              e.IBV_ODP_SUPPORT_ATOMIC: 'IBV_ODP_SUPPORT_ATOMIC',
 *              e.IBV_ODP_SUPPORT_SRQ_RECV: 'IBV_ODP_SUPPORT_SRQ_RECV',
 *              e.IBV_ODP_SUPPORT_FLUSH: 'IBV_ODP_SUPPORT_FLUSH',             # <<<<<<<<<<<<<<
 *              e.IBV_ODP_SUPPORT_ATOMIC_WRITE: 'IBV_ODP_SUPPORT_ATOMIC_WRITE'}
 * 
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_FLUSH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_FLUSH) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":577
 *              e.IBV_ODP_SUPPORT_SRQ_RECV: 'IBV_ODP_SUPPORT_SRQ_RECV',
 *              e.IBV_ODP_SUPPORT_FLUSH: 'IBV_ODP_SUPPORT_FLUSH',
 *              e.IBV_ODP_SUPPORT_ATOMIC_WRITE: 'IBV_ODP_SUPPORT_ATOMIC_WRITE'}             # <<<<<<<<<<<<<<
 * 
 *         print_format = '{}: {}\n'
*/
  __pyx_t_2 = __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(IBV_ODP_SUPPORT_ATOMIC_WRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_ODP_SUPPORT_ATOMIC_WRITE) < (0)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":579
 *              e.IBV_ODP_SUPPORT_ATOMIC_WRITE: 'IBV_ODP_SUPPORT_ATOMIC_WRITE'}
 * 
 *         print_format = '{}: {}\n'             # <<<<<<<<<<<<<<
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__4);
  __pyx_v_print_format = __pyx_mstate_global->__pyx_kp_u__4;

  /* "pyverbs/device.pyx":580
 * 
 *         print_format = '{}: {}\n'
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_general_caps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_general_caps};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__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;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_ODP_General_caps, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":581
 *         print_format = '{}: {}\n'
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rc_odp_caps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_l};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_RC_ODP_caps, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":580
 * 
 *         print_format = '{}: {}\n'
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":582
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\
 *             print_format.format('XRC ODP caps', str_from_flags(self.xrc_odp_caps, l))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ud_odp_caps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_l};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__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;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_UD_ODP_caps, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":581
 *         print_format = '{}: {}\n'
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\
*/
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":583
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('XRC ODP caps', str_from_flags(self.xrc_odp_caps, l))
 * 
*/
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_uc_odp_caps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_l};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_UC_ODP_caps, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":582
 *         return print_format.format('ODP General caps', str_from_flags(self.general_caps, general_caps)) +\
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\
 *             print_format.format('XRC ODP caps', str_from_flags(self.xrc_odp_caps, l))
*/
  __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":584
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\
 *             print_format.format('XRC ODP caps', str_from_flags(self.xrc_odp_caps, l))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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[3] = {__pyx_t_2, __pyx_v_self->xrc_odp_caps, __pyx_v_l};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__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_4)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_XRC_ODP_caps, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":583
 *             print_format.format('RC ODP caps', str_from_flags(self.rc_odp_caps, l)) +\
 *             print_format.format('UD ODP caps', str_from_flags(self.ud_odp_caps, l)) +\
 *             print_format.format('UC ODP caps', str_from_flags(self.uc_odp_caps, l)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('XRC ODP caps', str_from_flags(self.xrc_odp_caps, l))
 * 
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":566
 *        self.xrc_odp_caps = val
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         general_caps = {e.IBV_ODP_SUPPORT: 'IBV_ODP_SUPPORT',
 *               e.IBV_ODP_SUPPORT_IMPLICIT: 'IBV_ODP_SUPPORT_IMPLICIT'}
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_general_caps);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_print_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_3__reduce_cython__(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_7pyverbs_6device_7ODPCaps_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7ODPCaps_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_3__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7ODPCaps_2__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7ODPCaps_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_3, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_5__setstate_cython__(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_7pyverbs_6device_7ODPCaps_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7ODPCaps_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7ODPCaps_5__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.ODPCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7ODPCaps_4__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_7ODPCaps_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_3, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.ODPCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":588
 * 
 * cdef class PCIAtomicCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def fetch_add(self):
 *         return self.caps.fetch_add
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_9fetch_add_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_9fetch_add_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_7pyverbs_6device_13PCIAtomicCaps_9fetch_add___get__(((struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_9fetch_add___get__(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__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);

  /* "pyverbs/device.pyx":590
 *     @property
 *     def fetch_add(self):
 *         return self.caps.fetch_add             # <<<<<<<<<<<<<<
 *     @property
 *     def swap(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint16_t(__pyx_v_self->caps.fetch_add); 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;

  /* "pyverbs/device.pyx":588
 * 
 * cdef class PCIAtomicCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def fetch_add(self):
 *         return self.caps.fetch_add
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PCIAtomicCaps.fetch_add.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":591
 *     def fetch_add(self):
 *         return self.caps.fetch_add
 *     @property             # <<<<<<<<<<<<<<
 *     def swap(self):
 *         return self.caps.swap
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_4swap_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_4swap_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_7pyverbs_6device_13PCIAtomicCaps_4swap___get__(((struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_4swap___get__(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__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);

  /* "pyverbs/device.pyx":593
 *     @property
 *     def swap(self):
 *         return self.caps.swap             # <<<<<<<<<<<<<<
 *     @property
 *     def compare_swap(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint16_t(__pyx_v_self->caps.swap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":591
 *     def fetch_add(self):
 *         return self.caps.fetch_add
 *     @property             # <<<<<<<<<<<<<<
 *     def swap(self):
 *         return self.caps.swap
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PCIAtomicCaps.swap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":594
 *     def swap(self):
 *         return self.caps.swap
 *     @property             # <<<<<<<<<<<<<<
 *     def compare_swap(self):
 *         return self.caps.compare_swap
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_12compare_swap_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_12compare_swap_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_7pyverbs_6device_13PCIAtomicCaps_12compare_swap___get__(((struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps_12compare_swap___get__(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__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);

  /* "pyverbs/device.pyx":596
 *     @property
 *     def compare_swap(self):
 *         return self.caps.compare_swap             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint16_t(__pyx_v_self->caps.compare_swap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":594
 *     def swap(self):
 *         return self.caps.swap
 *     @property             # <<<<<<<<<<<<<<
 *     def compare_swap(self):
 *         return self.caps.compare_swap
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PCIAtomicCaps.compare_swap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_1__reduce_cython__(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_7pyverbs_6device_13PCIAtomicCaps_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_13PCIAtomicCaps___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_13PCIAtomicCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_4, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.PCIAtomicCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_3__setstate_cython__(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_7pyverbs_6device_13PCIAtomicCaps_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.PCIAtomicCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_13PCIAtomicCaps_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_13PCIAtomicCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_4, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.PCIAtomicCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":600
 * 
 * cdef class TSOCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def max_tso(self):
 *         return self.tso_caps.max_tso
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_7max_tso_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_7max_tso_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_7pyverbs_6device_7TSOCaps_7max_tso___get__(((struct __pyx_obj_7pyverbs_6device_TSOCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps_7max_tso___get__(struct __pyx_obj_7pyverbs_6device_TSOCaps *__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);

  /* "pyverbs/device.pyx":602
 *     @property
 *     def max_tso(self):
 *         return self.tso_caps.max_tso             # <<<<<<<<<<<<<<
 *     @property
 *     def supported_qpts(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tso_caps.max_tso); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":600
 * 
 * cdef class TSOCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def max_tso(self):
 *         return self.tso_caps.max_tso
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TSOCaps.max_tso.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":603
 *     def max_tso(self):
 *         return self.tso_caps.max_tso
 *     @property             # <<<<<<<<<<<<<<
 *     def supported_qpts(self):
 *         return self.tso_caps.supported_qpts
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_14supported_qpts_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_14supported_qpts_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_7pyverbs_6device_7TSOCaps_14supported_qpts___get__(((struct __pyx_obj_7pyverbs_6device_TSOCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps_14supported_qpts___get__(struct __pyx_obj_7pyverbs_6device_TSOCaps *__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);

  /* "pyverbs/device.pyx":605
 *     @property
 *     def supported_qpts(self):
 *         return self.tso_caps.supported_qpts             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tso_caps.supported_qpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":603
 *     def max_tso(self):
 *         return self.tso_caps.max_tso
 *     @property             # <<<<<<<<<<<<<<
 *     def supported_qpts(self):
 *         return self.tso_caps.supported_qpts
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TSOCaps.supported_qpts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_1__reduce_cython__(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_7pyverbs_6device_7TSOCaps_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7TSOCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7TSOCaps___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_TSOCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7TSOCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_5, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.TSOCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_3__setstate_cython__(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_7pyverbs_6device_7TSOCaps_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7TSOCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7TSOCaps_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.TSOCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7TSOCaps_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_TSOCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_7TSOCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_5, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.TSOCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":609
 * 
 * cdef class RSSCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def supported_qpts(self):
 *         return self.rss_caps.supported_qpts
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_14supported_qpts_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_14supported_qpts_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_7pyverbs_6device_7RSSCaps_14supported_qpts___get__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_14supported_qpts___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__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);

  /* "pyverbs/device.pyx":611
 *     @property
 *     def supported_qpts(self):
 *         return self.rss_caps.supported_qpts             # <<<<<<<<<<<<<<
 *     @property
 *     def max_rwq_indirection_tables(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->rss_caps.supported_qpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":609
 * 
 * cdef class RSSCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def supported_qpts(self):
 *         return self.rss_caps.supported_qpts
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.supported_qpts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":612
 *     def supported_qpts(self):
 *         return self.rss_caps.supported_qpts
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rwq_indirection_tables(self):
 *         return self.rss_caps.max_rwq_indirection_tables
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_26max_rwq_indirection_tables_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_26max_rwq_indirection_tables_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_7pyverbs_6device_7RSSCaps_26max_rwq_indirection_tables___get__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_26max_rwq_indirection_tables___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__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);

  /* "pyverbs/device.pyx":614
 *     @property
 *     def max_rwq_indirection_tables(self):
 *         return self.rss_caps.max_rwq_indirection_tables             # <<<<<<<<<<<<<<
 *     @property
 *     def rx_hash_fields_mask(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->rss_caps.max_rwq_indirection_tables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":612
 *     def supported_qpts(self):
 *         return self.rss_caps.supported_qpts
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rwq_indirection_tables(self):
 *         return self.rss_caps.max_rwq_indirection_tables
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.max_rwq_indirection_tables.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":615
 *     def max_rwq_indirection_tables(self):
 *         return self.rss_caps.max_rwq_indirection_tables
 *     @property             # <<<<<<<<<<<<<<
 *     def rx_hash_fields_mask(self):
 *         return self.rss_caps.rx_hash_fields_mask
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_19rx_hash_fields_mask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_19rx_hash_fields_mask_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_7pyverbs_6device_7RSSCaps_19rx_hash_fields_mask___get__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_19rx_hash_fields_mask___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__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);

  /* "pyverbs/device.pyx":617
 *     @property
 *     def rx_hash_fields_mask(self):
 *         return self.rss_caps.rx_hash_fields_mask             # <<<<<<<<<<<<<<
 *     @property
 *     def rx_hash_function(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->rss_caps.rx_hash_fields_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":615
 *     def max_rwq_indirection_tables(self):
 *         return self.rss_caps.max_rwq_indirection_tables
 *     @property             # <<<<<<<<<<<<<<
 *     def rx_hash_fields_mask(self):
 *         return self.rss_caps.rx_hash_fields_mask
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.rx_hash_fields_mask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":618
 *     def rx_hash_fields_mask(self):
 *         return self.rss_caps.rx_hash_fields_mask
 *     @property             # <<<<<<<<<<<<<<
 *     def rx_hash_function(self):
 *         return self.rss_caps.rx_hash_function
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_16rx_hash_function_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_16rx_hash_function_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_7pyverbs_6device_7RSSCaps_16rx_hash_function___get__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_16rx_hash_function___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__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);

  /* "pyverbs/device.pyx":620
 *     @property
 *     def rx_hash_function(self):
 *         return self.rss_caps.rx_hash_function             # <<<<<<<<<<<<<<
 *     @property
 *     def max_rwq_indirection_table_size(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->rss_caps.rx_hash_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":618
 *     def rx_hash_fields_mask(self):
 *         return self.rss_caps.rx_hash_fields_mask
 *     @property             # <<<<<<<<<<<<<<
 *     def rx_hash_function(self):
 *         return self.rss_caps.rx_hash_function
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.rx_hash_function.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":621
 *     def rx_hash_function(self):
 *         return self.rss_caps.rx_hash_function
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rwq_indirection_table_size(self):
 *         return self.rss_caps.max_rwq_indirection_table_size
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_30max_rwq_indirection_table_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_30max_rwq_indirection_table_size_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_7pyverbs_6device_7RSSCaps_30max_rwq_indirection_table_size___get__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps_30max_rwq_indirection_table_size___get__(struct __pyx_obj_7pyverbs_6device_RSSCaps *__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);

  /* "pyverbs/device.pyx":623
 *     @property
 *     def max_rwq_indirection_table_size(self):
 *         return self.rss_caps.max_rwq_indirection_table_size             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->rss_caps.max_rwq_indirection_table_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":621
 *     def rx_hash_function(self):
 *         return self.rss_caps.rx_hash_function
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rwq_indirection_table_size(self):
 *         return self.rss_caps.max_rwq_indirection_table_size
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.max_rwq_indirection_table_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_1__reduce_cython__(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_7pyverbs_6device_7RSSCaps_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7RSSCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_7RSSCaps___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_7RSSCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_6, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_3__setstate_cython__(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_7pyverbs_6device_7RSSCaps_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7RSSCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7RSSCaps_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.RSSCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_7RSSCaps_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_7RSSCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_6, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.RSSCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":627
 * 
 * cdef class PacketPacingCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def qp_rate_limit_min(self):
 *         return self.packet_pacing_caps.qp_rate_limit_min
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_min_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_min_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_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_min___get__(((struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_min___get__(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__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);

  /* "pyverbs/device.pyx":629
 *     @property
 *     def qp_rate_limit_min(self):
 *         return self.packet_pacing_caps.qp_rate_limit_min             # <<<<<<<<<<<<<<
 *     @property
 *     def qp_rate_limit_max(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->packet_pacing_caps.qp_rate_limit_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":627
 * 
 * cdef class PacketPacingCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def qp_rate_limit_min(self):
 *         return self.packet_pacing_caps.qp_rate_limit_min
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PacketPacingCaps.qp_rate_limit_min.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":630
 *     def qp_rate_limit_min(self):
 *         return self.packet_pacing_caps.qp_rate_limit_min
 *     @property             # <<<<<<<<<<<<<<
 *     def qp_rate_limit_max(self):
 *         return self.packet_pacing_caps.qp_rate_limit_max
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_max_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_max_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_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_max___get__(((struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_max___get__(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__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);

  /* "pyverbs/device.pyx":632
 *     @property
 *     def qp_rate_limit_max(self):
 *         return self.packet_pacing_caps.qp_rate_limit_max             # <<<<<<<<<<<<<<
 *     @property
 *     def supported_qpts(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->packet_pacing_caps.qp_rate_limit_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":630
 *     def qp_rate_limit_min(self):
 *         return self.packet_pacing_caps.qp_rate_limit_min
 *     @property             # <<<<<<<<<<<<<<
 *     def qp_rate_limit_max(self):
 *         return self.packet_pacing_caps.qp_rate_limit_max
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PacketPacingCaps.qp_rate_limit_max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":633
 *     def qp_rate_limit_max(self):
 *         return self.packet_pacing_caps.qp_rate_limit_max
 *     @property             # <<<<<<<<<<<<<<
 *     def supported_qpts(self):
 *         return self.packet_pacing_caps.supported_qpts
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_14supported_qpts_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_14supported_qpts_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_7pyverbs_6device_16PacketPacingCaps_14supported_qpts___get__(((struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps_14supported_qpts___get__(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__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);

  /* "pyverbs/device.pyx":635
 *     @property
 *     def supported_qpts(self):
 *         return self.packet_pacing_caps.supported_qpts             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->packet_pacing_caps.supported_qpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":633
 *     def qp_rate_limit_max(self):
 *         return self.packet_pacing_caps.qp_rate_limit_max
 *     @property             # <<<<<<<<<<<<<<
 *     def supported_qpts(self):
 *         return self.packet_pacing_caps.supported_qpts
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PacketPacingCaps.supported_qpts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_1__reduce_cython__(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_7pyverbs_6device_16PacketPacingCaps_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16PacketPacingCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_16PacketPacingCaps___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16PacketPacingCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_7, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.PacketPacingCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_3__setstate_cython__(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_7pyverbs_6device_16PacketPacingCaps_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16PacketPacingCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_16PacketPacingCaps_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.PacketPacingCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_16PacketPacingCaps_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_16PacketPacingCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_7, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.PacketPacingCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":639
 * 
 * cdef class TMCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rndv_hdr_size(self):
 *         return self.tm_caps.max_rndv_hdr_size
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_17max_rndv_hdr_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_17max_rndv_hdr_size_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_7pyverbs_6device_6TMCaps_17max_rndv_hdr_size___get__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_17max_rndv_hdr_size___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__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);

  /* "pyverbs/device.pyx":641
 *     @property
 *     def max_rndv_hdr_size(self):
 *         return self.tm_caps.max_rndv_hdr_size             # <<<<<<<<<<<<<<
 *     @property
 *     def max_num_tags(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tm_caps.max_rndv_hdr_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":639
 * 
 * cdef class TMCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def max_rndv_hdr_size(self):
 *         return self.tm_caps.max_rndv_hdr_size
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TMCaps.max_rndv_hdr_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":642
 *     def max_rndv_hdr_size(self):
 *         return self.tm_caps.max_rndv_hdr_size
 *     @property             # <<<<<<<<<<<<<<
 *     def max_num_tags(self):
 *         return self.tm_caps.max_num_tags
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_12max_num_tags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_12max_num_tags_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_7pyverbs_6device_6TMCaps_12max_num_tags___get__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_12max_num_tags___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__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);

  /* "pyverbs/device.pyx":644
 *     @property
 *     def max_num_tags(self):
 *         return self.tm_caps.max_num_tags             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tm_caps.max_num_tags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":642
 *     def max_rndv_hdr_size(self):
 *         return self.tm_caps.max_rndv_hdr_size
 *     @property             # <<<<<<<<<<<<<<
 *     def max_num_tags(self):
 *         return self.tm_caps.max_num_tags
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TMCaps.max_num_tags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":645
 *     def max_num_tags(self):
 *         return self.tm_caps.max_num_tags
 *     @property             # <<<<<<<<<<<<<<
 *     def flags(self):
 *         return self.tm_caps.flags
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_5flags_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_7pyverbs_6device_6TMCaps_5flags___get__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_5flags___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__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);

  /* "pyverbs/device.pyx":647
 *     @property
 *     def flags(self):
 *         return self.tm_caps.flags             # <<<<<<<<<<<<<<
 *     @property
 *     def max_ops(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tm_caps.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":645
 *     def max_num_tags(self):
 *         return self.tm_caps.max_num_tags
 *     @property             # <<<<<<<<<<<<<<
 *     def flags(self):
 *         return self.tm_caps.flags
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TMCaps.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":648
 *     def flags(self):
 *         return self.tm_caps.flags
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ops(self):
 *         return self.tm_caps.max_ops
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_7max_ops_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_7max_ops_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_7pyverbs_6device_6TMCaps_7max_ops___get__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_7max_ops___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__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);

  /* "pyverbs/device.pyx":650
 *     @property
 *     def max_ops(self):
 *         return self.tm_caps.max_ops             # <<<<<<<<<<<<<<
 *     @property
 *     def max_sge(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tm_caps.max_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":648
 *     def flags(self):
 *         return self.tm_caps.flags
 *     @property             # <<<<<<<<<<<<<<
 *     def max_ops(self):
 *         return self.tm_caps.max_ops
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TMCaps.max_ops.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":651
 *     def max_ops(self):
 *         return self.tm_caps.max_ops
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sge(self):
 *         return self.tm_caps.max_sge
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_7max_sge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_7max_sge_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_7pyverbs_6device_6TMCaps_7max_sge___get__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps_7max_sge___get__(struct __pyx_obj_7pyverbs_6device_TMCaps *__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);

  /* "pyverbs/device.pyx":653
 *     @property
 *     def max_sge(self):
 *         return self.tm_caps.max_sge             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->tm_caps.max_sge); 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;

  /* "pyverbs/device.pyx":651
 *     def max_ops(self):
 *         return self.tm_caps.max_ops
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sge(self):
 *         return self.tm_caps.max_sge
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.TMCaps.max_sge.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_1__reduce_cython__(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_7pyverbs_6device_6TMCaps_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6TMCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_6TMCaps___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_6TMCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_8, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.TMCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_3__setstate_cython__(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_7pyverbs_6device_6TMCaps_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6TMCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_6TMCaps_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.TMCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6TMCaps_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_6TMCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_8, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.TMCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":657
 * 
 * cdef class CQModerationCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cq_count(self):
 *         return self.cq_mod_caps.max_cq_count
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_12max_cq_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_12max_cq_count_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_7pyverbs_6device_16CQModerationCaps_12max_cq_count___get__(((struct __pyx_obj_7pyverbs_6device_CQModerationCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps_12max_cq_count___get__(struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__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);

  /* "pyverbs/device.pyx":659
 *     @property
 *     def max_cq_count(self):
 *         return self.cq_mod_caps.max_cq_count             # <<<<<<<<<<<<<<
 *     @property
 *     def max_cq_period(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->cq_mod_caps.max_cq_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":657
 * 
 * cdef class CQModerationCaps(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cq_count(self):
 *         return self.cq_mod_caps.max_cq_count
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.CQModerationCaps.max_cq_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":660
 *     def max_cq_count(self):
 *         return self.cq_mod_caps.max_cq_count
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cq_period(self):
 *         return self.cq_mod_caps.max_cq_period
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_13max_cq_period_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_13max_cq_period_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_7pyverbs_6device_16CQModerationCaps_13max_cq_period___get__(((struct __pyx_obj_7pyverbs_6device_CQModerationCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps_13max_cq_period___get__(struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__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);

  /* "pyverbs/device.pyx":662
 *     @property
 *     def max_cq_period(self):
 *         return self.cq_mod_caps.max_cq_period             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->cq_mod_caps.max_cq_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":660
 *     def max_cq_count(self):
 *         return self.cq_mod_caps.max_cq_count
 *     @property             # <<<<<<<<<<<<<<
 *     def max_cq_period(self):
 *         return self.cq_mod_caps.max_cq_period
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.CQModerationCaps.max_cq_period.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_1__reduce_cython__(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_7pyverbs_6device_16CQModerationCaps_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16CQModerationCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_16CQModerationCaps___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_CQModerationCaps *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_16CQModerationCaps___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_9, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.CQModerationCaps.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_3__setstate_cython__(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_7pyverbs_6device_16CQModerationCaps_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16CQModerationCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_16CQModerationCaps_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.CQModerationCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_16CQModerationCaps_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_CQModerationCaps *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_16CQModerationCaps_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_9, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.CQModerationCaps.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":666
 * 
 * cdef class DeviceAttrEx(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def orig_attr(self):
 *         attr = DeviceAttr()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_9orig_attr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_9orig_attr_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_7pyverbs_6device_12DeviceAttrEx_9orig_attr___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_9orig_attr___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_DeviceAttr *__pyx_v_attr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_device_attr __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":668
 *     @property
 *     def orig_attr(self):
 *         attr = DeviceAttr()             # <<<<<<<<<<<<<<
 *         attr.dev_attr = self.dev_attr.orig_attr
 *         return attr
*/
  __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_7pyverbs_6device_DeviceAttr, __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, 668, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_attr = ((struct __pyx_obj_7pyverbs_6device_DeviceAttr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":669
 *     def orig_attr(self):
 *         attr = DeviceAttr()
 *         attr.dev_attr = self.dev_attr.orig_attr             # <<<<<<<<<<<<<<
 *         return attr
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.orig_attr;
  __pyx_v_attr->dev_attr = __pyx_t_4;

  /* "pyverbs/device.pyx":670
 *         attr = DeviceAttr()
 *         attr.dev_attr = self.dev_attr.orig_attr
 *         return attr             # <<<<<<<<<<<<<<
 *     @property
 *     def comp_mask(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_attr);
  __pyx_r = ((PyObject *)__pyx_v_attr);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":666
 * 
 * cdef class DeviceAttrEx(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def orig_attr(self):
 *         attr = DeviceAttr()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.orig_attr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_attr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":671
 *         attr.dev_attr = self.dev_attr.orig_attr
 *         return attr
 *     @property             # <<<<<<<<<<<<<<
 *     def comp_mask(self):
 *         return self.dev_attr.comp_mask
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_9comp_mask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_9comp_mask_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_7pyverbs_6device_12DeviceAttrEx_9comp_mask___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_9comp_mask___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":673
 *     @property
 *     def comp_mask(self):
 *         return self.dev_attr.comp_mask             # <<<<<<<<<<<<<<
 *     @comp_mask.setter
 *     def comp_mask(self, val):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.comp_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":671
 *         attr.dev_attr = self.dev_attr.orig_attr
 *         return attr
 *     @property             # <<<<<<<<<<<<<<
 *     def comp_mask(self):
 *         return self.dev_attr.comp_mask
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.comp_mask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":674
 *     def comp_mask(self):
 *         return self.dev_attr.comp_mask
 *     @comp_mask.setter             # <<<<<<<<<<<<<<
 *     def comp_mask(self, val):
 *         self.dev_attr.comp_mask = val
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_12DeviceAttrEx_9comp_mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_7pyverbs_6device_12DeviceAttrEx_9comp_mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  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_7pyverbs_6device_12DeviceAttrEx_9comp_mask_2__set__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_7pyverbs_6device_12DeviceAttrEx_9comp_mask_2__set__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyverbs/device.pyx":676
 *     @comp_mask.setter
 *     def comp_mask(self, val):
 *         self.dev_attr.comp_mask = val             # <<<<<<<<<<<<<<
 *     @property
 *     def odp_caps(self):
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 676, __pyx_L1_error)
  __pyx_v_self->dev_attr.comp_mask = __pyx_t_1;

  /* "pyverbs/device.pyx":674
 *     def comp_mask(self):
 *         return self.dev_attr.comp_mask
 *     @comp_mask.setter             # <<<<<<<<<<<<<<
 *     def comp_mask(self, val):
 *         self.dev_attr.comp_mask = val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.comp_mask.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pyverbs/device.pyx":677
 *     def comp_mask(self, val):
 *         self.dev_attr.comp_mask = val
 *     @property             # <<<<<<<<<<<<<<
 *     def odp_caps(self):
 *         caps = ODPCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_8odp_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_8odp_caps_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_7pyverbs_6device_12DeviceAttrEx_8odp_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_8odp_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_ODPCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_odp_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":679
 *     @property
 *     def odp_caps(self):
 *         caps = ODPCaps()             # <<<<<<<<<<<<<<
 *         caps.odp_caps = self.dev_attr.odp_caps
 *         caps.xrc_odp_caps = self.dev_attr.xrc_odp_caps
*/
  __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_7pyverbs_6device_ODPCaps, __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, 679, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_ODPCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":680
 *     def odp_caps(self):
 *         caps = ODPCaps()
 *         caps.odp_caps = self.dev_attr.odp_caps             # <<<<<<<<<<<<<<
 *         caps.xrc_odp_caps = self.dev_attr.xrc_odp_caps
 *         return caps
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.odp_caps;
  __pyx_v_caps->odp_caps = __pyx_t_4;

  /* "pyverbs/device.pyx":681
 *         caps = ODPCaps()
 *         caps.odp_caps = self.dev_attr.odp_caps
 *         caps.xrc_odp_caps = self.dev_attr.xrc_odp_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->dev_attr.xrc_odp_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_caps->xrc_odp_caps);
  __Pyx_DECREF(__pyx_v_caps->xrc_odp_caps);
  __pyx_v_caps->xrc_odp_caps = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":682
 *         caps.odp_caps = self.dev_attr.odp_caps
 *         caps.xrc_odp_caps = self.dev_attr.xrc_odp_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def completion_timestamp_mask(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":677
 *     def comp_mask(self, val):
 *         self.dev_attr.comp_mask = val
 *     @property             # <<<<<<<<<<<<<<
 *     def odp_caps(self):
 *         caps = ODPCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.odp_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":683
 *         caps.xrc_odp_caps = self.dev_attr.xrc_odp_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def completion_timestamp_mask(self):
 *         return self.dev_attr.completion_timestamp_mask
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_25completion_timestamp_mask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_25completion_timestamp_mask_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_7pyverbs_6device_12DeviceAttrEx_25completion_timestamp_mask___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_25completion_timestamp_mask___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":685
 *     @property
 *     def completion_timestamp_mask(self):
 *         return self.dev_attr.completion_timestamp_mask             # <<<<<<<<<<<<<<
 *     @property
 *     def hca_core_clock(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.completion_timestamp_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":683
 *         caps.xrc_odp_caps = self.dev_attr.xrc_odp_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def completion_timestamp_mask(self):
 *         return self.dev_attr.completion_timestamp_mask
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.completion_timestamp_mask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":686
 *     def completion_timestamp_mask(self):
 *         return self.dev_attr.completion_timestamp_mask
 *     @property             # <<<<<<<<<<<<<<
 *     def hca_core_clock(self):
 *         return self.dev_attr.hca_core_clock
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_14hca_core_clock_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_14hca_core_clock_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_7pyverbs_6device_12DeviceAttrEx_14hca_core_clock___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_14hca_core_clock___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":688
 *     @property
 *     def hca_core_clock(self):
 *         return self.dev_attr.hca_core_clock             # <<<<<<<<<<<<<<
 *     @property
 *     def device_cap_flags_ex(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.hca_core_clock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":686
 *     def completion_timestamp_mask(self):
 *         return self.dev_attr.completion_timestamp_mask
 *     @property             # <<<<<<<<<<<<<<
 *     def hca_core_clock(self):
 *         return self.dev_attr.hca_core_clock
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.hca_core_clock.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":689
 *     def hca_core_clock(self):
 *         return self.dev_attr.hca_core_clock
 *     @property             # <<<<<<<<<<<<<<
 *     def device_cap_flags_ex(self):
 *         return self.dev_attr.device_cap_flags_ex
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_19device_cap_flags_ex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_19device_cap_flags_ex_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_7pyverbs_6device_12DeviceAttrEx_19device_cap_flags_ex___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_19device_cap_flags_ex___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":691
 *     @property
 *     def device_cap_flags_ex(self):
 *         return self.dev_attr.device_cap_flags_ex             # <<<<<<<<<<<<<<
 *     @property
 *     def tso_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.device_cap_flags_ex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":689
 *     def hca_core_clock(self):
 *         return self.dev_attr.hca_core_clock
 *     @property             # <<<<<<<<<<<<<<
 *     def device_cap_flags_ex(self):
 *         return self.dev_attr.device_cap_flags_ex
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.device_cap_flags_ex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":692
 *     def device_cap_flags_ex(self):
 *         return self.dev_attr.device_cap_flags_ex
 *     @property             # <<<<<<<<<<<<<<
 *     def tso_caps(self):
 *         caps = TSOCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_8tso_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_8tso_caps_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_7pyverbs_6device_12DeviceAttrEx_8tso_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_8tso_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_TSOCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_tso_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":694
 *     @property
 *     def tso_caps(self):
 *         caps = TSOCaps()             # <<<<<<<<<<<<<<
 *         caps.tso_caps = self.dev_attr.tso_caps
 *         return caps
*/
  __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_7pyverbs_6device_TSOCaps, __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, 694, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_TSOCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":695
 *     def tso_caps(self):
 *         caps = TSOCaps()
 *         caps.tso_caps = self.dev_attr.tso_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.tso_caps;
  __pyx_v_caps->tso_caps = __pyx_t_4;

  /* "pyverbs/device.pyx":696
 *         caps = TSOCaps()
 *         caps.tso_caps = self.dev_attr.tso_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def pci_atomic_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":692
 *     def device_cap_flags_ex(self):
 *         return self.dev_attr.device_cap_flags_ex
 *     @property             # <<<<<<<<<<<<<<
 *     def tso_caps(self):
 *         caps = TSOCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.tso_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":697
 *         caps.tso_caps = self.dev_attr.tso_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def pci_atomic_caps(self):
 *         caps = PCIAtomicCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_15pci_atomic_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_15pci_atomic_caps_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_7pyverbs_6device_12DeviceAttrEx_15pci_atomic_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_15pci_atomic_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_pci_atomic_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":699
 *     @property
 *     def pci_atomic_caps(self):
 *         caps = PCIAtomicCaps()             # <<<<<<<<<<<<<<
 *         caps.caps = self.dev_attr.pci_atomic_caps
 *         return caps
*/
  __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_7pyverbs_6device_PCIAtomicCaps, __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, 699, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":700
 *     def pci_atomic_caps(self):
 *         caps = PCIAtomicCaps()
 *         caps.caps = self.dev_attr.pci_atomic_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.pci_atomic_caps;
  __pyx_v_caps->caps = __pyx_t_4;

  /* "pyverbs/device.pyx":701
 *         caps = PCIAtomicCaps()
 *         caps.caps = self.dev_attr.pci_atomic_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def rss_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":697
 *         caps.tso_caps = self.dev_attr.tso_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def pci_atomic_caps(self):
 *         caps = PCIAtomicCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.pci_atomic_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":702
 *         caps.caps = self.dev_attr.pci_atomic_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def rss_caps(self):
 *         caps = RSSCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_8rss_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_8rss_caps_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_7pyverbs_6device_12DeviceAttrEx_8rss_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_8rss_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_RSSCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_rss_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":704
 *     @property
 *     def rss_caps(self):
 *         caps = RSSCaps()             # <<<<<<<<<<<<<<
 *         caps.rss_caps = self.dev_attr.rss_caps
 *         return caps
*/
  __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_7pyverbs_6device_RSSCaps, __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, 704, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_RSSCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":705
 *     def rss_caps(self):
 *         caps = RSSCaps()
 *         caps.rss_caps = self.dev_attr.rss_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.rss_caps;
  __pyx_v_caps->rss_caps = __pyx_t_4;

  /* "pyverbs/device.pyx":706
 *         caps = RSSCaps()
 *         caps.rss_caps = self.dev_attr.rss_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def max_wq_type_rq(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":702
 *         caps.caps = self.dev_attr.pci_atomic_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def rss_caps(self):
 *         caps = RSSCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.rss_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":707
 *         caps.rss_caps = self.dev_attr.rss_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def max_wq_type_rq(self):
 *         return self.dev_attr.max_wq_type_rq
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_14max_wq_type_rq_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_14max_wq_type_rq_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_7pyverbs_6device_12DeviceAttrEx_14max_wq_type_rq___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_14max_wq_type_rq___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":709
 *     @property
 *     def max_wq_type_rq(self):
 *         return self.dev_attr.max_wq_type_rq             # <<<<<<<<<<<<<<
 *     @property
 *     def packet_pacing_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.max_wq_type_rq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":707
 *         caps.rss_caps = self.dev_attr.rss_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def max_wq_type_rq(self):
 *         return self.dev_attr.max_wq_type_rq
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.max_wq_type_rq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":710
 *     def max_wq_type_rq(self):
 *         return self.dev_attr.max_wq_type_rq
 *     @property             # <<<<<<<<<<<<<<
 *     def packet_pacing_caps(self):
 *         caps = PacketPacingCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_18packet_pacing_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_18packet_pacing_caps_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_7pyverbs_6device_12DeviceAttrEx_18packet_pacing_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_18packet_pacing_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_packet_pacing_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":712
 *     @property
 *     def packet_pacing_caps(self):
 *         caps = PacketPacingCaps()             # <<<<<<<<<<<<<<
 *         caps.packet_pacing_caps = self.dev_attr.packet_pacing_caps
 *         return caps
*/
  __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_7pyverbs_6device_PacketPacingCaps, __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, 712, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_PacketPacingCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":713
 *     def packet_pacing_caps(self):
 *         caps = PacketPacingCaps()
 *         caps.packet_pacing_caps = self.dev_attr.packet_pacing_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.packet_pacing_caps;
  __pyx_v_caps->packet_pacing_caps = __pyx_t_4;

  /* "pyverbs/device.pyx":714
 *         caps = PacketPacingCaps()
 *         caps.packet_pacing_caps = self.dev_attr.packet_pacing_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def raw_packet_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":710
 *     def max_wq_type_rq(self):
 *         return self.dev_attr.max_wq_type_rq
 *     @property             # <<<<<<<<<<<<<<
 *     def packet_pacing_caps(self):
 *         caps = PacketPacingCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.packet_pacing_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":715
 *         caps.packet_pacing_caps = self.dev_attr.packet_pacing_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def raw_packet_caps(self):
 *         return self.dev_attr.raw_packet_caps
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_15raw_packet_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_15raw_packet_caps_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_7pyverbs_6device_12DeviceAttrEx_15raw_packet_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_15raw_packet_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":717
 *     @property
 *     def raw_packet_caps(self):
 *         return self.dev_attr.raw_packet_caps             # <<<<<<<<<<<<<<
 *     @property
 *     def tm_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->dev_attr.raw_packet_caps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":715
 *         caps.packet_pacing_caps = self.dev_attr.packet_pacing_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def raw_packet_caps(self):
 *         return self.dev_attr.raw_packet_caps
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.raw_packet_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":718
 *     def raw_packet_caps(self):
 *         return self.dev_attr.raw_packet_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def tm_caps(self):
 *         caps = TMCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_7tm_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_7tm_caps_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_7pyverbs_6device_12DeviceAttrEx_7tm_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_7tm_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_TMCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_tm_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":720
 *     @property
 *     def tm_caps(self):
 *         caps = TMCaps()             # <<<<<<<<<<<<<<
 *         caps.tm_caps = self.dev_attr.tm_caps
 *         return caps
*/
  __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_7pyverbs_6device_TMCaps, __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, 720, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_TMCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":721
 *     def tm_caps(self):
 *         caps = TMCaps()
 *         caps.tm_caps = self.dev_attr.tm_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.tm_caps;
  __pyx_v_caps->tm_caps = __pyx_t_4;

  /* "pyverbs/device.pyx":722
 *         caps = TMCaps()
 *         caps.tm_caps = self.dev_attr.tm_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def cq_mod_caps(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":718
 *     def raw_packet_caps(self):
 *         return self.dev_attr.raw_packet_caps
 *     @property             # <<<<<<<<<<<<<<
 *     def tm_caps(self):
 *         caps = TMCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.tm_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":723
 *         caps.tm_caps = self.dev_attr.tm_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def cq_mod_caps(self):
 *         caps = CQModerationCaps()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_11cq_mod_caps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_11cq_mod_caps_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_7pyverbs_6device_12DeviceAttrEx_11cq_mod_caps___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_11cq_mod_caps___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  struct __pyx_obj_7pyverbs_6device_CQModerationCaps *__pyx_v_caps = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct ibv_cq_moderation_caps __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":725
 *     @property
 *     def cq_mod_caps(self):
 *         caps = CQModerationCaps()             # <<<<<<<<<<<<<<
 *         caps.cq_mod_caps = self.dev_attr.cq_mod_caps
 *         return caps
*/
  __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_7pyverbs_6device_CQModerationCaps, __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, 725, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_caps = ((struct __pyx_obj_7pyverbs_6device_CQModerationCaps *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":726
 *     def cq_mod_caps(self):
 *         caps = CQModerationCaps()
 *         caps.cq_mod_caps = self.dev_attr.cq_mod_caps             # <<<<<<<<<<<<<<
 *         return caps
 *     @property
*/
  __pyx_t_4 = __pyx_v_self->dev_attr.cq_mod_caps;
  __pyx_v_caps->cq_mod_caps = __pyx_t_4;

  /* "pyverbs/device.pyx":727
 *         caps = CQModerationCaps()
 *         caps.cq_mod_caps = self.dev_attr.cq_mod_caps
 *         return caps             # <<<<<<<<<<<<<<
 *     @property
 *     def max_dm_size(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_caps);
  __pyx_r = ((PyObject *)__pyx_v_caps);
  goto __pyx_L0;

  /* "pyverbs/device.pyx":723
 *         caps.tm_caps = self.dev_attr.tm_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def cq_mod_caps(self):
 *         caps = CQModerationCaps()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.cq_mod_caps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_caps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":728
 *         caps.cq_mod_caps = self.dev_attr.cq_mod_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def max_dm_size(self):
 *         return self.dev_attr.max_dm_size
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_11max_dm_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_11max_dm_size_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_7pyverbs_6device_12DeviceAttrEx_11max_dm_size___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_11max_dm_size___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":730
 *     @property
 *     def max_dm_size(self):
 *         return self.dev_attr.max_dm_size             # <<<<<<<<<<<<<<
 *     @property
 *     def phys_port_cnt_ex(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->dev_attr.max_dm_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":728
 *         caps.cq_mod_caps = self.dev_attr.cq_mod_caps
 *         return caps
 *     @property             # <<<<<<<<<<<<<<
 *     def max_dm_size(self):
 *         return self.dev_attr.max_dm_size
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.max_dm_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":731
 *     def max_dm_size(self):
 *         return self.dev_attr.max_dm_size
 *     @property             # <<<<<<<<<<<<<<
 *     def phys_port_cnt_ex(self):
 *         return self.dev_attr.phys_port_cnt_ex
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_16phys_port_cnt_ex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_16phys_port_cnt_ex_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_7pyverbs_6device_12DeviceAttrEx_16phys_port_cnt_ex___get__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx_16phys_port_cnt_ex___get__(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__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);

  /* "pyverbs/device.pyx":733
 *     @property
 *     def phys_port_cnt_ex(self):
 *         return self.dev_attr.phys_port_cnt_ex             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->dev_attr.phys_port_cnt_ex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":731
 *     def max_dm_size(self):
 *         return self.dev_attr.max_dm_size
 *     @property             # <<<<<<<<<<<<<<
 *     def phys_port_cnt_ex(self):
 *         return self.dev_attr.phys_port_cnt_ex
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.phys_port_cnt_ex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_1__reduce_cython__(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_7pyverbs_6device_12DeviceAttrEx_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_12DeviceAttrEx_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_1__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_12DeviceAttrEx___reduce_cython__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_12DeviceAttrEx___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_3__setstate_cython__(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_7pyverbs_6device_12DeviceAttrEx_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_12DeviceAttrEx_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_12DeviceAttrEx_3__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.DeviceAttrEx.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_12DeviceAttrEx_2__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_12DeviceAttrEx_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DeviceAttrEx *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DeviceAttrEx.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":737
 * 
 * cdef class AllocDmAttr(PyverbsObject):
 *     def __init__(self, length, log_align_req = 0, comp_mask = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Creates an AllocDmAttr object with the given parameters. This object
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_11AllocDmAttr___init__, "\n        Creates an AllocDmAttr object with the given parameters. This object\n        can than be used to create a DM object.\n        :param length: Length of the future device memory\n        :param log_align_req: log2 of address alignment requirement\n        :param comp_mask: compatibility mask\n        :return: An AllocDmAttr object\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyverbs_6device_11AllocDmAttr___init__;
#endif
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_v_log_align_req = 0;
  PyObject *__pyx_v_comp_mask = 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_length,&__pyx_mstate_global->__pyx_n_u_log_align_req,&__pyx_mstate_global->__pyx_n_u_comp_mask,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, 737, __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, 737, __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, 737, __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, 737, __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, 737, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 737, __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, 737, __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, 737, __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, 737, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_length = values[0];
    __pyx_v_log_align_req = values[1];
    __pyx_v_comp_mask = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 737, __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("pyverbs.device.AllocDmAttr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_11AllocDmAttr___init__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self), __pyx_v_length, __pyx_v_log_align_req, __pyx_v_comp_mask);

  /* 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_7pyverbs_6device_11AllocDmAttr___init__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_length, PyObject *__pyx_v_log_align_req, PyObject *__pyx_v_comp_mask) {
  int __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;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":746
 *         :return: An AllocDmAttr object
 *         """
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         self.alloc_dm_attr.length = length
 *         self.alloc_dm_attr.log_align_req = log_align_req
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_AllocDmAttr), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":747
 *         """
 *         super().__init__()
 *         self.alloc_dm_attr.length = length             # <<<<<<<<<<<<<<
 *         self.alloc_dm_attr.log_align_req = log_align_req
 *         self.alloc_dm_attr.comp_mask = comp_mask
*/
  __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L1_error)
  __pyx_v_self->alloc_dm_attr.length = __pyx_t_5;

  /* "pyverbs/device.pyx":748
 *         super().__init__()
 *         self.alloc_dm_attr.length = length
 *         self.alloc_dm_attr.log_align_req = log_align_req             # <<<<<<<<<<<<<<
 *         self.alloc_dm_attr.comp_mask = comp_mask
 * 
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_log_align_req); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 748, __pyx_L1_error)
  __pyx_v_self->alloc_dm_attr.log_align_req = __pyx_t_6;

  /* "pyverbs/device.pyx":749
 *         self.alloc_dm_attr.length = length
 *         self.alloc_dm_attr.log_align_req = log_align_req
 *         self.alloc_dm_attr.comp_mask = comp_mask             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_comp_mask); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_v_self->alloc_dm_attr.comp_mask = __pyx_t_6;

  /* "pyverbs/device.pyx":737
 * 
 * cdef class AllocDmAttr(PyverbsObject):
 *     def __init__(self, length, log_align_req = 0, comp_mask = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Creates an AllocDmAttr object with the given parameters. This object
*/

  /* function exit code */
  __pyx_r = 0;
  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("pyverbs.device.AllocDmAttr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":751
 *         self.alloc_dm_attr.comp_mask = comp_mask
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def length(self):
 *         return self.alloc_dm_attr.length
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_6length_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_6length_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_7pyverbs_6device_11AllocDmAttr_6length___get__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_6length___get__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__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);

  /* "pyverbs/device.pyx":753
 *     @property
 *     def length(self):
 *         return self.alloc_dm_attr.length             # <<<<<<<<<<<<<<
 * 
 *     @length.setter
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_FromSize_t(__pyx_v_self->alloc_dm_attr.length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":751
 *         self.alloc_dm_attr.comp_mask = comp_mask
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def length(self):
 *         return self.alloc_dm_attr.length
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":755
 *         return self.alloc_dm_attr.length
 * 
 *     @length.setter             # <<<<<<<<<<<<<<
 *     def length(self, val):
 *         self.alloc_dm_attr.length = val
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  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_7pyverbs_6device_11AllocDmAttr_6length_2__set__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_7pyverbs_6device_11AllocDmAttr_6length_2__set__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  size_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyverbs/device.pyx":757
 *     @length.setter
 *     def length(self, val):
 *         self.alloc_dm_attr.length = val             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_val); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error)
  __pyx_v_self->alloc_dm_attr.length = __pyx_t_1;

  /* "pyverbs/device.pyx":755
 *         return self.alloc_dm_attr.length
 * 
 *     @length.setter             # <<<<<<<<<<<<<<
 *     def length(self, val):
 *         self.alloc_dm_attr.length = val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.length.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pyverbs/device.pyx":759
 *         self.alloc_dm_attr.length = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def log_align_req(self):
 *         return self.alloc_dm_attr.log_align_req
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_13log_align_req_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_13log_align_req_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_7pyverbs_6device_11AllocDmAttr_13log_align_req___get__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_13log_align_req___get__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__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);

  /* "pyverbs/device.pyx":761
 *     @property
 *     def log_align_req(self):
 *         return self.alloc_dm_attr.log_align_req             # <<<<<<<<<<<<<<
 * 
 *     @log_align_req.setter
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->alloc_dm_attr.log_align_req); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":759
 *         self.alloc_dm_attr.length = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def log_align_req(self):
 *         return self.alloc_dm_attr.log_align_req
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.log_align_req.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":763
 *         return self.alloc_dm_attr.log_align_req
 * 
 *     @log_align_req.setter             # <<<<<<<<<<<<<<
 *     def log_align_req(self, val):
 *         self.alloc_dm_attr.log_align_req = val
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_13log_align_req_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_13log_align_req_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  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_7pyverbs_6device_11AllocDmAttr_13log_align_req_2__set__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_7pyverbs_6device_11AllocDmAttr_13log_align_req_2__set__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyverbs/device.pyx":765
 *     @log_align_req.setter
 *     def log_align_req(self, val):
 *         self.alloc_dm_attr.log_align_req = val             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L1_error)
  __pyx_v_self->alloc_dm_attr.log_align_req = __pyx_t_1;

  /* "pyverbs/device.pyx":763
 *         return self.alloc_dm_attr.log_align_req
 * 
 *     @log_align_req.setter             # <<<<<<<<<<<<<<
 *     def log_align_req(self, val):
 *         self.alloc_dm_attr.log_align_req = val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.log_align_req.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pyverbs/device.pyx":767
 *         self.alloc_dm_attr.log_align_req = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def comp_mask(self):
 *         return self.alloc_dm_attr.comp_mask
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_9comp_mask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_9comp_mask_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_7pyverbs_6device_11AllocDmAttr_9comp_mask___get__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_9comp_mask___get__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__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);

  /* "pyverbs/device.pyx":769
 *     @property
 *     def comp_mask(self):
 *         return self.alloc_dm_attr.comp_mask             # <<<<<<<<<<<<<<
 * 
 *     @comp_mask.setter
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->alloc_dm_attr.comp_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":767
 *         self.alloc_dm_attr.log_align_req = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def comp_mask(self):
 *         return self.alloc_dm_attr.comp_mask
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.comp_mask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":771
 *         return self.alloc_dm_attr.comp_mask
 * 
 *     @comp_mask.setter             # <<<<<<<<<<<<<<
 *     def comp_mask(self, val):
 *         self.alloc_dm_attr.comp_mask = val
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_9comp_mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_7pyverbs_6device_11AllocDmAttr_9comp_mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  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_7pyverbs_6device_11AllocDmAttr_9comp_mask_2__set__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self), ((PyObject *)__pyx_v_val));

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

static int __pyx_pf_7pyverbs_6device_11AllocDmAttr_9comp_mask_2__set__(struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyverbs/device.pyx":773
 *     @comp_mask.setter
 *     def comp_mask(self, val):
 *         self.alloc_dm_attr.comp_mask = val             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_val); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 773, __pyx_L1_error)
  __pyx_v_self->alloc_dm_attr.comp_mask = __pyx_t_1;

  /* "pyverbs/device.pyx":771
 *         return self.alloc_dm_attr.comp_mask
 * 
 *     @comp_mask.setter             # <<<<<<<<<<<<<<
 *     def comp_mask(self, val):
 *         self.alloc_dm_attr.comp_mask = val
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.comp_mask.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_3__reduce_cython__(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_7pyverbs_6device_11AllocDmAttr_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_11AllocDmAttr_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_3__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_11AllocDmAttr_2__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_11AllocDmAttr_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_10, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_5__setstate_cython__(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_7pyverbs_6device_11AllocDmAttr_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_11AllocDmAttr_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_11AllocDmAttr_5__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.AllocDmAttr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_11AllocDmAttr_4__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_11AllocDmAttr_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_10, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AllocDmAttr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":777
 * 
 * cdef class DM(PyverbsCM):
 *     def __init__(self, Context context, AllocDmAttr dm_attr=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Allocate a device (direct) memory.
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_2DM_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_2DM___init__, "\n        Allocate a device (direct) memory.\n        :param context: The context of the device on which to allocate memory\n        :param dm_attr: Attributes that define the DM\n        :param kwargs: Arguments:\n            * *handle*\n                A valid kernel handle for a DM object in the given context.\n                If passed, the DM will be imported and associated with the\n                given context using ibv_import_dm.\n        :return: A DM object on success\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyverbs_6device_2DM___init__;
#endif
static int __pyx_pw_7pyverbs_6device_2DM_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_context = 0;
  struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_dm_attr = 0;
  PyObject *__pyx_v_kwargs = 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);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_context,&__pyx_mstate_global->__pyx_n_u_dm_attr,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, 777, __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, 777, __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, 777, __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, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(0, 777, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, i); __PYX_ERR(0, 777, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 777, __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, 777, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)Py_None));
    }
    __pyx_v_context = ((struct __pyx_obj_7pyverbs_6device_Context *)values[0]);
    __pyx_v_dm_attr = ((struct __pyx_obj_7pyverbs_6device_AllocDmAttr *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 777, __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_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("pyverbs.device.DM.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_context), __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, 1, "context", 0))) __PYX_ERR(0, 777, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm_attr), __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_AllocDmAttr, 1, "dm_attr", 0))) __PYX_ERR(0, 777, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM___init__(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self), __pyx_v_context, __pyx_v_dm_attr, __pyx_v_kwargs);

  /* 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_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7pyverbs_6device_2DM___init__(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, struct __pyx_obj_7pyverbs_6device_Context *__pyx_v_context, struct __pyx_obj_7pyverbs_6device_AllocDmAttr *__pyx_v_dm_attr, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_dm_handle = NULL;
  PyObject *__pyx_v_device_attr = NULL;
  int __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;
  int __pyx_t_6;
  uint32_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":789
 *         :return: A DM object on success
 *         """
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         self.dm_mrs = weakref.WeakSet()
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":790
 *         """
 *         super().__init__()
 *         self.dm_mrs = weakref.WeakSet()             # <<<<<<<<<<<<<<
 * 
 *         dm_handle = kwargs.get('handle')
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = __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_1)) __PYX_ERR(0, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dm_mrs);
  __Pyx_DECREF(__pyx_v_self->dm_mrs);
  __pyx_v_self->dm_mrs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":792
 *         self.dm_mrs = weakref.WeakSet()
 * 
 *         dm_handle = kwargs.get('handle')             # <<<<<<<<<<<<<<
 *         if dm_handle is not None:
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_handle, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dm_handle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":793
 * 
 *         dm_handle = kwargs.get('handle')
 *         if dm_handle is not None:             # <<<<<<<<<<<<<<
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)
 *             if self.dm == NULL:
*/
  __pyx_t_6 = (__pyx_v_dm_handle != Py_None);
  if (__pyx_t_6) {

    /* "pyverbs/device.pyx":794
 *         dm_handle = kwargs.get('handle')
 *         if dm_handle is not None:
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)             # <<<<<<<<<<<<<<
 *             if self.dm == NULL:
 *                 raise PyverbsRDMAErrno('Failed to import DM')
*/
    __pyx_t_7 = __Pyx_PyLong_As_uint32_t(__pyx_v_dm_handle); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L1_error)
    __pyx_v_self->dm = ibv_import_dm(__pyx_v_context->context, __pyx_t_7);

    /* "pyverbs/device.pyx":795
 *         if dm_handle is not None:
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)
 *             if self.dm == NULL:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno('Failed to import DM')
 *             self._is_imported = True
*/
    __pyx_t_6 = (__pyx_v_self->dm == NULL);
    if (unlikely(__pyx_t_6)) {

      /* "pyverbs/device.pyx":796
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)
 *             if self.dm == NULL:
 *                 raise PyverbsRDMAErrno('Failed to import DM')             # <<<<<<<<<<<<<<
 *             self._is_imported = True
 *         else:
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 796, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_import_DM};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __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;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __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, 796, __pyx_L1_error)

      /* "pyverbs/device.pyx":795
 *         if dm_handle is not None:
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)
 *             if self.dm == NULL:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno('Failed to import DM')
 *             self._is_imported = True
*/
    }

    /* "pyverbs/device.pyx":797
 *             if self.dm == NULL:
 *                 raise PyverbsRDMAErrno('Failed to import DM')
 *             self._is_imported = True             # <<<<<<<<<<<<<<
 *         else:
 *             device_attr = context.query_device_ex()
*/
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF(__pyx_v_self->_is_imported);
    __Pyx_DECREF(__pyx_v_self->_is_imported);
    __pyx_v_self->_is_imported = Py_True;

    /* "pyverbs/device.pyx":793
 * 
 *         dm_handle = kwargs.get('handle')
 *         if dm_handle is not None:             # <<<<<<<<<<<<<<
 *             self.dm = v.ibv_import_dm(context.context, dm_handle)
 *             if self.dm == NULL:
*/
    goto __pyx_L3;
  }

  /* "pyverbs/device.pyx":799
 *             self._is_imported = True
 *         else:
 *             device_attr = context.query_device_ex()             # <<<<<<<<<<<<<<
 *             if device_attr.max_dm_size <= 0:
 *                 raise PyverbsUserError('Device doesn\'t support dm allocation')
*/
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_context);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_query_device_ex, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_device_attr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":800
 *         else:
 *             device_attr = context.query_device_ex()
 *             if device_attr.max_dm_size <= 0:             # <<<<<<<<<<<<<<
 *                 raise PyverbsUserError('Device doesn\'t support dm allocation')
 *             self.dm = v.ibv_alloc_dm(<v.ibv_context*>context.context,
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_device_attr, __pyx_mstate_global->__pyx_n_u_max_dm_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_6)) {

      /* "pyverbs/device.pyx":801
 *             device_attr = context.query_device_ex()
 *             if device_attr.max_dm_size <= 0:
 *                 raise PyverbsUserError('Device doesn\'t support dm allocation')             # <<<<<<<<<<<<<<
 *             self.dm = v.ibv_alloc_dm(<v.ibv_context*>context.context,
 *                                      &dm_attr.alloc_dm_attr)
*/
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsUserError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Device_doesn_t_support_dm_alloca};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __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, 801, __pyx_L1_error)

      /* "pyverbs/device.pyx":800
 *         else:
 *             device_attr = context.query_device_ex()
 *             if device_attr.max_dm_size <= 0:             # <<<<<<<<<<<<<<
 *                 raise PyverbsUserError('Device doesn\'t support dm allocation')
 *             self.dm = v.ibv_alloc_dm(<v.ibv_context*>context.context,
*/
    }

    /* "pyverbs/device.pyx":802
 *             if device_attr.max_dm_size <= 0:
 *                 raise PyverbsUserError('Device doesn\'t support dm allocation')
 *             self.dm = v.ibv_alloc_dm(<v.ibv_context*>context.context,             # <<<<<<<<<<<<<<
 *                                      &dm_attr.alloc_dm_attr)
 *             if self.dm == NULL:
*/
    __pyx_v_self->dm = ibv_alloc_dm(((struct ibv_context *)__pyx_v_context->context), (&__pyx_v_dm_attr->alloc_dm_attr));

    /* "pyverbs/device.pyx":804
 *             self.dm = v.ibv_alloc_dm(<v.ibv_context*>context.context,
 *                                      &dm_attr.alloc_dm_attr)
 *             if self.dm == NULL:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno('Failed to allocate device memory of size '
 *                                        '{size}. Max available size {max}.'
*/
    __pyx_t_6 = (__pyx_v_self->dm == NULL);
    if (unlikely(__pyx_t_6)) {

      /* "pyverbs/device.pyx":805
 *                                      &dm_attr.alloc_dm_attr)
 *             if self.dm == NULL:
 *                 raise PyverbsRDMAErrno('Failed to allocate device memory of size '             # <<<<<<<<<<<<<<
 *                                        '{size}. Max available size {max}.'
 *                                        .format(size=dm_attr.length,
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "pyverbs/device.pyx":807
 *                 raise PyverbsRDMAErrno('Failed to allocate device memory of size '
 *                                        '{size}. Max available size {max}.'
 *                                        .format(size=dm_attr.length,             # <<<<<<<<<<<<<<
 *                                                max=device_attr.max_dm_size))
 *         self.context = context
*/
      __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_device_memory;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dm_attr), __pyx_mstate_global->__pyx_n_u_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "pyverbs/device.pyx":808
 *                                        '{size}. Max available size {max}.'
 *                                        .format(size=dm_attr.length,
 *                                                max=device_attr.max_dm_size))             # <<<<<<<<<<<<<<
 *         self.context = context
 *         context.add_ref(self)
*/
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_device_attr, __pyx_mstate_global->__pyx_n_u_max_dm_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, NULL};
        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_size, __pyx_t_9, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 807, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_max, __pyx_t_10, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 807, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
        __Pyx_XDECREF(__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;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __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;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __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, 805, __pyx_L1_error)

      /* "pyverbs/device.pyx":804
 *             self.dm = v.ibv_alloc_dm(<v.ibv_context*>context.context,
 *                                      &dm_attr.alloc_dm_attr)
 *             if self.dm == NULL:             # <<<<<<<<<<<<<<
 *                 raise PyverbsRDMAErrno('Failed to allocate device memory of size '
 *                                        '{size}. Max available size {max}.'
*/
    }
  }
  __pyx_L3:;

  /* "pyverbs/device.pyx":809
 *                                        .format(size=dm_attr.length,
 *                                                max=device_attr.max_dm_size))
 *         self.context = context             # <<<<<<<<<<<<<<
 *         context.add_ref(self)
 * 
*/
  __Pyx_INCREF((PyObject *)__pyx_v_context);
  __Pyx_GIVEREF((PyObject *)__pyx_v_context);
  __Pyx_GOTREF(__pyx_v_self->context);
  __Pyx_DECREF(__pyx_v_self->context);
  __pyx_v_self->context = ((PyObject *)__pyx_v_context);

  /* "pyverbs/device.pyx":810
 *                                                max=device_attr.max_dm_size))
 *         self.context = context
 *         context.add_ref(self)             # <<<<<<<<<<<<<<
 * 
 *     def unimport(self):
*/
  __pyx_t_3 = ((struct __pyx_vtabstruct_7pyverbs_6device_Context *)__pyx_v_context->__pyx_base.__pyx_vtab)->add_ref(__pyx_v_context, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":777
 * 
 * cdef class DM(PyverbsCM):
 *     def __init__(self, Context context, AllocDmAttr dm_attr=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Allocate a device (direct) memory.
*/

  /* function exit code */
  __pyx_r = 0;
  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_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyverbs.device.DM.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dm_handle);
  __Pyx_XDECREF(__pyx_v_device_attr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":812
 *         context.add_ref(self)
 * 
 *     def unimport(self):             # <<<<<<<<<<<<<<
 *         v.ibv_unimport_dm(self.dm)
 *         self.close()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_2DM_3unimport(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_7pyverbs_6device_2DM_3unimport = {"unimport", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_3unimport, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_2DM_3unimport(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unimport (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("unimport", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("unimport", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM_2unimport(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_2DM_2unimport(struct __pyx_obj_7pyverbs_6device_DM *__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("unimport", 0);

  /* "pyverbs/device.pyx":813
 * 
 *     def unimport(self):
 *         v.ibv_unimport_dm(self.dm)             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/
  ibv_unimport_dm(__pyx_v_self->dm);

  /* "pyverbs/device.pyx":814
 *     def unimport(self):
 *         v.ibv_unimport_dm(self.dm)
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7pyverbs_6device_DM *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.close(((struct __pyx_obj_7pyverbs_4base_PyverbsCM *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":812
 *         context.add_ref(self)
 * 
 *     def unimport(self):             # <<<<<<<<<<<<<<
 *         v.ibv_unimport_dm(self.dm)
 *         self.close()
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DM.unimport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":816
 *         self.close()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

/* Python wrapper */
static void __pyx_pw_7pyverbs_6device_2DM_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7pyverbs_6device_2DM_5__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_7pyverbs_6device_2DM_4__dealloc__(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self));

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

static void __pyx_pf_7pyverbs_6device_2DM_4__dealloc__(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyverbs/device.pyx":817
 * 
 *     def __dealloc__(self):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     cpdef close(self):
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7pyverbs_6device_DM *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.close(((struct __pyx_obj_7pyverbs_4base_PyverbsCM *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":816
 *         self.close()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("pyverbs.device.DM.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyverbs/device.pyx":819
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Closes the underlying C object of the DM.
*/

static PyObject *__pyx_pw_7pyverbs_6device_2DM_7close(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_7pyverbs_6device_2DM_close(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_rc;
  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_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 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_7pyverbs_6device_DM &&
  __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_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyverbs_6device_2DM_7close)) {
        __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[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, 819, __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
  }

  /* "pyverbs/device.pyx":825
 *         original DM object, in order to prevent double free by Python GC.
 *         """
 *         if self.dm != NULL:             # <<<<<<<<<<<<<<
 *             if self.logger:
 *                 self.logger.debug('Closing DM')
*/
  __pyx_t_6 = (__pyx_v_self->dm != NULL);
  if (__pyx_t_6) {

    /* "pyverbs/device.pyx":826
 *         """
 *         if self.dm != NULL:
 *             if self.logger:             # <<<<<<<<<<<<<<
 *                 self.logger.debug('Closing DM')
 *             close_weakrefs([self.dm_mrs])
*/
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx_base.__pyx_base.logger); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 826, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "pyverbs/device.pyx":827
 *         if self.dm != NULL:
 *             if self.logger:
 *                 self.logger.debug('Closing DM')             # <<<<<<<<<<<<<<
 *             close_weakrefs([self.dm_mrs])
 *             if not self._is_imported:
*/
      __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.logger;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Closing_DM};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_debug, __pyx_callargs+__pyx_t_5, (2-__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, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyverbs/device.pyx":826
 *         """
 *         if self.dm != NULL:
 *             if self.logger:             # <<<<<<<<<<<<<<
 *                 self.logger.debug('Closing DM')
 *             close_weakrefs([self.dm_mrs])
*/
    }

    /* "pyverbs/device.pyx":828
 *             if self.logger:
 *                 self.logger.debug('Closing DM')
 *             close_weakrefs([self.dm_mrs])             # <<<<<<<<<<<<<<
 *             if not self._is_imported:
 *                 rc = v.ibv_free_dm(self.dm)
*/
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->dm_mrs);
    __Pyx_GIVEREF(__pyx_v_self->dm_mrs);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->dm_mrs) != (0)) __PYX_ERR(0, 828, __pyx_L1_error);
    __pyx_t_2 = __pyx_f_7pyverbs_4base_close_weakrefs(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":829
 *                 self.logger.debug('Closing DM')
 *             close_weakrefs([self.dm_mrs])
 *             if not self._is_imported:             # <<<<<<<<<<<<<<
 *                 rc = v.ibv_free_dm(self.dm)
 *                 if rc != 0:
*/
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->_is_imported); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 829, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_6);
    if (__pyx_t_7) {

      /* "pyverbs/device.pyx":830
 *             close_weakrefs([self.dm_mrs])
 *             if not self._is_imported:
 *                 rc = v.ibv_free_dm(self.dm)             # <<<<<<<<<<<<<<
 *                 if rc != 0:
 *                     raise PyverbsRDMAError('Failed to free dm', rc)
*/
      __pyx_v_rc = ibv_free_dm(__pyx_v_self->dm);

      /* "pyverbs/device.pyx":831
 *             if not self._is_imported:
 *                 rc = v.ibv_free_dm(self.dm)
 *                 if rc != 0:             # <<<<<<<<<<<<<<
 *                     raise PyverbsRDMAError('Failed to free dm', rc)
 *             self.dm = NULL
*/
      __pyx_t_7 = (__pyx_v_rc != 0);
      if (unlikely(__pyx_t_7)) {

        /* "pyverbs/device.pyx":832
 *                 rc = v.ibv_free_dm(self.dm)
 *                 if rc != 0:
 *                     raise PyverbsRDMAError('Failed to free dm', rc)             # <<<<<<<<<<<<<<
 *             self.dm = NULL
 *             self.context = None
*/
        __pyx_t_1 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_1);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Failed_to_free_dm, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __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, 832, __pyx_L1_error)

        /* "pyverbs/device.pyx":831
 *             if not self._is_imported:
 *                 rc = v.ibv_free_dm(self.dm)
 *                 if rc != 0:             # <<<<<<<<<<<<<<
 *                     raise PyverbsRDMAError('Failed to free dm', rc)
 *             self.dm = NULL
*/
      }

      /* "pyverbs/device.pyx":829
 *                 self.logger.debug('Closing DM')
 *             close_weakrefs([self.dm_mrs])
 *             if not self._is_imported:             # <<<<<<<<<<<<<<
 *                 rc = v.ibv_free_dm(self.dm)
 *                 if rc != 0:
*/
    }

    /* "pyverbs/device.pyx":833
 *                 if rc != 0:
 *                     raise PyverbsRDMAError('Failed to free dm', rc)
 *             self.dm = NULL             # <<<<<<<<<<<<<<
 *             self.context = None
 * 
*/
    __pyx_v_self->dm = NULL;

    /* "pyverbs/device.pyx":834
 *                     raise PyverbsRDMAError('Failed to free dm', rc)
 *             self.dm = NULL
 *             self.context = None             # <<<<<<<<<<<<<<
 * 
 *     cdef add_ref(self, obj):
*/
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->context);
    __Pyx_DECREF(__pyx_v_self->context);
    __pyx_v_self->context = Py_None;

    /* "pyverbs/device.pyx":825
 *         original DM object, in order to prevent double free by Python GC.
 *         """
 *         if self.dm != NULL:             # <<<<<<<<<<<<<<
 *             if self.logger:
 *                 self.logger.debug('Closing DM')
*/
  }

  /* "pyverbs/device.pyx":819
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Closes the underlying C object of the DM.
*/

  /* 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("pyverbs.device.DM.close", __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_7pyverbs_6device_2DM_7close(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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_2DM_6close, "\n        Closes the underlying C object of the DM.\n        In case of an imported DM, the DM won't be freed, and it's kept for the\n        original DM object, in order to prevent double free by Python GC.\n        ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_2DM_7close = {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_2DM_6close};
static PyObject *__pyx_pw_7pyverbs_6device_2DM_7close(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("close", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM_6close(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_2DM_6close(struct __pyx_obj_7pyverbs_6device_DM *__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("close", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyverbs_6device_2DM_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __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("pyverbs.device.DM.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":836
 *             self.context = None
 * 
 *     cdef add_ref(self, obj):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, DMMR):
 *             self.dm_mrs.add(obj)
*/

static PyObject *__pyx_f_7pyverbs_6device_2DM_add_ref(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  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("add_ref", 0);

  /* "pyverbs/device.pyx":837
 * 
 *     cdef add_ref(self, obj):
 *         if isinstance(obj, DMMR):             # <<<<<<<<<<<<<<
 *             self.dm_mrs.add(obj)
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DMMR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyverbs/device.pyx":838
 *     cdef add_ref(self, obj):
 *         if isinstance(obj, DMMR):
 *             self.dm_mrs.add(obj)             # <<<<<<<<<<<<<<
 * 
 *     def copy_to_dm(self, dm_offset, data, length):
*/
    __pyx_t_3 = __pyx_v_self->dm_mrs;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":837
 * 
 *     cdef add_ref(self, obj):
 *         if isinstance(obj, DMMR):             # <<<<<<<<<<<<<<
 *             self.dm_mrs.add(obj)
 * 
*/
  }

  /* "pyverbs/device.pyx":836
 *             self.context = None
 * 
 *     cdef add_ref(self, obj):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, DMMR):
 *             self.dm_mrs.add(obj)
*/

  /* 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("pyverbs.device.DM.add_ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":840
 *             self.dm_mrs.add(obj)
 * 
 *     def copy_to_dm(self, dm_offset, data, length):             # <<<<<<<<<<<<<<
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,
 *                                 <char *>data, <size_t>length)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_2DM_9copy_to_dm(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_7pyverbs_6device_2DM_9copy_to_dm = {"copy_to_dm", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_9copy_to_dm, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_2DM_9copy_to_dm(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_dm_offset = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_length = 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("copy_to_dm (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_dm_offset,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_length,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, 840, __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, 840, __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, 840, __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, 840, __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, "copy_to_dm", 0) < (0)) __PYX_ERR(0, 840, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("copy_to_dm", 1, 3, 3, i); __PYX_ERR(0, 840, __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, 840, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 840, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 840, __pyx_L3_error)
    }
    __pyx_v_dm_offset = values[0];
    __pyx_v_data = values[1];
    __pyx_v_length = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("copy_to_dm", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 840, __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("pyverbs.device.DM.copy_to_dm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM_8copy_to_dm(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self), __pyx_v_dm_offset, __pyx_v_data, __pyx_v_length);

  /* 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_7pyverbs_6device_2DM_8copy_to_dm(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, PyObject *__pyx_v_dm_offset, PyObject *__pyx_v_data, PyObject *__pyx_v_length) {
  int __pyx_v_rc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint64_t __pyx_t_1;
  char *__pyx_t_2;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy_to_dm", 0);

  /* "pyverbs/device.pyx":841
 * 
 *     def copy_to_dm(self, dm_offset, data, length):
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,             # <<<<<<<<<<<<<<
 *                                 <char *>data, <size_t>length)
 *         if rc != 0:
*/
  __pyx_t_1 = __Pyx_PyLong_As_uint64_t(__pyx_v_dm_offset); if (unlikely((__pyx_t_1 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 841, __pyx_L1_error)

  /* "pyverbs/device.pyx":842
 *     def copy_to_dm(self, dm_offset, data, length):
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,
 *                                 <char *>data, <size_t>length)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)
*/
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L1_error)

  /* "pyverbs/device.pyx":841
 * 
 *     def copy_to_dm(self, dm_offset, data, length):
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,             # <<<<<<<<<<<<<<
 *                                 <char *>data, <size_t>length)
 *         if rc != 0:
*/
  __pyx_v_rc = ibv_memcpy_to_dm(((struct ibv_dm *)__pyx_v_self->dm), ((uint64_t)__pyx_t_1), ((char *)__pyx_t_2), ((size_t)__pyx_t_3));

  /* "pyverbs/device.pyx":843
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,
 *                                 <char *>data, <size_t>length)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)
 * 
*/
  __pyx_t_4 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_4)) {

    /* "pyverbs/device.pyx":844
 *                                 <char *>data, <size_t>length)
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)             # <<<<<<<<<<<<<<
 * 
 *     def copy_from_dm(self, dm_offset, length):
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Failed_to_copy_to_dm, __pyx_t_8};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_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, 844, __pyx_L1_error)

    /* "pyverbs/device.pyx":843
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,
 *                                 <char *>data, <size_t>length)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)
 * 
*/
  }

  /* "pyverbs/device.pyx":840
 *             self.dm_mrs.add(obj)
 * 
 *     def copy_to_dm(self, dm_offset, data, length):             # <<<<<<<<<<<<<<
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,
 *                                 <char *>data, <size_t>length)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyverbs.device.DM.copy_to_dm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":846
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)
 * 
 *     def copy_from_dm(self, dm_offset, length):             # <<<<<<<<<<<<<<
 *         cdef char *data =<char*>malloc(length)
 *         memset(data, 0, length)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_2DM_11copy_from_dm(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_7pyverbs_6device_2DM_11copy_from_dm = {"copy_from_dm", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_11copy_from_dm, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_2DM_11copy_from_dm(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_dm_offset = 0;
  PyObject *__pyx_v_length = 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("copy_from_dm (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_dm_offset,&__pyx_mstate_global->__pyx_n_u_length,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, 846, __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, 846, __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, 846, __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, "copy_from_dm", 0) < (0)) __PYX_ERR(0, 846, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("copy_from_dm", 1, 2, 2, i); __PYX_ERR(0, 846, __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, 846, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 846, __pyx_L3_error)
    }
    __pyx_v_dm_offset = values[0];
    __pyx_v_length = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("copy_from_dm", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 846, __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("pyverbs.device.DM.copy_from_dm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM_10copy_from_dm(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self), __pyx_v_dm_offset, __pyx_v_length);

  /* 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_7pyverbs_6device_2DM_10copy_from_dm(struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, PyObject *__pyx_v_dm_offset, PyObject *__pyx_v_length) {
  char *__pyx_v_data;
  int __pyx_v_rc;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  uint64_t __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;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy_from_dm", 0);

  /* "pyverbs/device.pyx":847
 * 
 *     def copy_from_dm(self, dm_offset, length):
 *         cdef char *data =<char*>malloc(length)             # <<<<<<<<<<<<<<
 *         memset(data, 0, length)
 *         rc = v.ibv_memcpy_from_dm(<void *>data, <v.ibv_dm *>self.dm,
*/
  __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error)
  __pyx_v_data = ((char *)malloc(__pyx_t_1));

  /* "pyverbs/device.pyx":848
 *     def copy_from_dm(self, dm_offset, length):
 *         cdef char *data =<char*>malloc(length)
 *         memset(data, 0, length)             # <<<<<<<<<<<<<<
 *         rc = v.ibv_memcpy_from_dm(<void *>data, <v.ibv_dm *>self.dm,
 *                                   <uint64_t>dm_offset, <size_t>length)
*/
  __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error)
  (void)(memset(__pyx_v_data, 0, __pyx_t_1));

  /* "pyverbs/device.pyx":850
 *         memset(data, 0, length)
 *         rc = v.ibv_memcpy_from_dm(<void *>data, <v.ibv_dm *>self.dm,
 *                                   <uint64_t>dm_offset, <size_t>length)             # <<<<<<<<<<<<<<
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to copy from dm', rc)
*/
  __pyx_t_2 = __Pyx_PyLong_As_uint64_t(__pyx_v_dm_offset); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L1_error)

  /* "pyverbs/device.pyx":849
 *         cdef char *data =<char*>malloc(length)
 *         memset(data, 0, length)
 *         rc = v.ibv_memcpy_from_dm(<void *>data, <v.ibv_dm *>self.dm,             # <<<<<<<<<<<<<<
 *                                   <uint64_t>dm_offset, <size_t>length)
 *         if rc != 0:
*/
  __pyx_v_rc = ibv_memcpy_from_dm(((void *)__pyx_v_data), ((struct ibv_dm *)__pyx_v_self->dm), ((uint64_t)__pyx_t_2), ((size_t)__pyx_t_1));

  /* "pyverbs/device.pyx":851
 *         rc = v.ibv_memcpy_from_dm(<void *>data, <v.ibv_dm *>self.dm,
 *                                   <uint64_t>dm_offset, <size_t>length)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to copy from dm', rc)
 *         res = data[:length]
*/
  __pyx_t_3 = (__pyx_v_rc != 0);
  if (unlikely(__pyx_t_3)) {

    /* "pyverbs/device.pyx":852
 *                                   <uint64_t>dm_offset, <size_t>length)
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to copy from dm', rc)             # <<<<<<<<<<<<<<
 *         res = data[:length]
 *         free(data)
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = 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_1 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Failed_to_copy_from_dm, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_1, (3-__pyx_t_1) | (__pyx_t_1*__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_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __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, 852, __pyx_L1_error)

    /* "pyverbs/device.pyx":851
 *         rc = v.ibv_memcpy_from_dm(<void *>data, <v.ibv_dm *>self.dm,
 *                                   <uint64_t>dm_offset, <size_t>length)
 *         if rc != 0:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to copy from dm', rc)
 *         res = data[:length]
*/
  }

  /* "pyverbs/device.pyx":853
 *         if rc != 0:
 *             raise PyverbsRDMAError('Failed to copy from dm', rc)
 *         res = data[:length]             # <<<<<<<<<<<<<<
 *         free(data)
 *         return res
*/
  __Pyx_INCREF(__pyx_v_length);
  __pyx_t_4 = __pyx_v_length;
  __pyx_t_3 = (__pyx_t_4 == Py_None);
  if (__pyx_t_3) {
    __pyx_t_8 = PY_SSIZE_T_MAX;
  } else {
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L1_error)
    __pyx_t_8 = __pyx_t_9;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_data + 0, __pyx_t_8 - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_res = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":854
 *             raise PyverbsRDMAError('Failed to copy from dm', rc)
 *         res = data[:length]
 *         free(data)             # <<<<<<<<<<<<<<
 *         return res
 * 
*/
  free(__pyx_v_data);

  /* "pyverbs/device.pyx":855
 *         res = data[:length]
 *         free(data)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":846
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)
 * 
 *     def copy_from_dm(self, dm_offset, length):             # <<<<<<<<<<<<<<
 *         cdef char *data =<char*>malloc(length)
 *         memset(data, 0, length)
*/

  /* function exit code */
  __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("pyverbs.device.DM.copy_from_dm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":857
 *         return res
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def handle(self):
 *         return self.dm.handle
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_2DM_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_2DM_6handle_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_7pyverbs_6device_2DM_6handle___get__(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_2DM_6handle___get__(struct __pyx_obj_7pyverbs_6device_DM *__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);

  /* "pyverbs/device.pyx":859
 *     @property
 *     def handle(self):
 *         return self.dm.handle             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->dm->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":857
 *         return res
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def handle(self):
 *         return self.dm.handle
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.DM.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_2DM_13__reduce_cython__(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_7pyverbs_6device_2DM_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_2DM_13__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM_12__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_2DM_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_dm_cannot_be_converted_to_a, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DM.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_2DM_15__setstate_cython__(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_7pyverbs_6device_2DM_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_2DM_15__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.DM.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_2DM_14__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_DM *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_2DM_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_DM *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_dm_cannot_be_converted_to_a, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.DM.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":863
 * 
 * cdef class PortAttr(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def state(self):
 *         return self.attr.state
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5state_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_7pyverbs_6device_8PortAttr_5state___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_5state___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":865
 *     @property
 *     def state(self):
 *         return self.attr.state             # <<<<<<<<<<<<<<
 *     @property
 *     def max_mtu(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py(__pyx_v_self->attr.state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":863
 * 
 * cdef class PortAttr(PyverbsObject):
 *     @property             # <<<<<<<<<<<<<<
 *     def state(self):
 *         return self.attr.state
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":866
 *     def state(self):
 *         return self.attr.state
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mtu(self):
 *         return self.attr.max_mtu
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_7max_mtu_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_7max_mtu_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_7pyverbs_6device_8PortAttr_7max_mtu___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_7max_mtu___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":868
 *     @property
 *     def max_mtu(self):
 *         return self.attr.max_mtu             # <<<<<<<<<<<<<<
 *     @property
 *     def active_mtu(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(__pyx_v_self->attr.max_mtu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":866
 *     def state(self):
 *         return self.attr.state
 *     @property             # <<<<<<<<<<<<<<
 *     def max_mtu(self):
 *         return self.attr.max_mtu
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.max_mtu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":869
 *     def max_mtu(self):
 *         return self.attr.max_mtu
 *     @property             # <<<<<<<<<<<<<<
 *     def active_mtu(self):
 *         return self.attr.active_mtu
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10active_mtu_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10active_mtu_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_7pyverbs_6device_8PortAttr_10active_mtu___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10active_mtu___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":871
 *     @property
 *     def active_mtu(self):
 *         return self.attr.active_mtu             # <<<<<<<<<<<<<<
 *     @property
 *     def gid_tbl_len(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(__pyx_v_self->attr.active_mtu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":869
 *     def max_mtu(self):
 *         return self.attr.max_mtu
 *     @property             # <<<<<<<<<<<<<<
 *     def active_mtu(self):
 *         return self.attr.active_mtu
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.active_mtu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":872
 *     def active_mtu(self):
 *         return self.attr.active_mtu
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_tbl_len(self):
 *         return self.attr.gid_tbl_len
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_11gid_tbl_len_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_11gid_tbl_len_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_7pyverbs_6device_8PortAttr_11gid_tbl_len___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_11gid_tbl_len___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":874
 *     @property
 *     def gid_tbl_len(self):
 *         return self.attr.gid_tbl_len             # <<<<<<<<<<<<<<
 *     @property
 *     def port_cap_flags(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->attr.gid_tbl_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":872
 *     def active_mtu(self):
 *         return self.attr.active_mtu
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_tbl_len(self):
 *         return self.attr.gid_tbl_len
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.gid_tbl_len.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":875
 *     def gid_tbl_len(self):
 *         return self.attr.gid_tbl_len
 *     @property             # <<<<<<<<<<<<<<
 *     def port_cap_flags(self):
 *         return self.attr.port_cap_flags
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_14port_cap_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_14port_cap_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_7pyverbs_6device_8PortAttr_14port_cap_flags___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_14port_cap_flags___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":877
 *     @property
 *     def port_cap_flags(self):
 *         return self.attr.port_cap_flags             # <<<<<<<<<<<<<<
 *     @property
 *     def max_msg_sz(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.port_cap_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":875
 *     def gid_tbl_len(self):
 *         return self.attr.gid_tbl_len
 *     @property             # <<<<<<<<<<<<<<
 *     def port_cap_flags(self):
 *         return self.attr.port_cap_flags
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.port_cap_flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":878
 *     def port_cap_flags(self):
 *         return self.attr.port_cap_flags
 *     @property             # <<<<<<<<<<<<<<
 *     def max_msg_sz(self):
 *         return self.attr.max_msg_sz
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10max_msg_sz_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10max_msg_sz_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_7pyverbs_6device_8PortAttr_10max_msg_sz___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10max_msg_sz___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":880
 *     @property
 *     def max_msg_sz(self):
 *         return self.attr.max_msg_sz             # <<<<<<<<<<<<<<
 *     @property
 *     def bad_pkey_cntr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.max_msg_sz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":878
 *     def port_cap_flags(self):
 *         return self.attr.port_cap_flags
 *     @property             # <<<<<<<<<<<<<<
 *     def max_msg_sz(self):
 *         return self.attr.max_msg_sz
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.max_msg_sz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":881
 *     def max_msg_sz(self):
 *         return self.attr.max_msg_sz
 *     @property             # <<<<<<<<<<<<<<
 *     def bad_pkey_cntr(self):
 *         return self.attr.bad_pkey_cntr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_13bad_pkey_cntr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_13bad_pkey_cntr_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_7pyverbs_6device_8PortAttr_13bad_pkey_cntr___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_13bad_pkey_cntr___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":883
 *     @property
 *     def bad_pkey_cntr(self):
 *         return self.attr.bad_pkey_cntr             # <<<<<<<<<<<<<<
 *     @property
 *     def qkey_viol_cntr(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.bad_pkey_cntr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":881
 *     def max_msg_sz(self):
 *         return self.attr.max_msg_sz
 *     @property             # <<<<<<<<<<<<<<
 *     def bad_pkey_cntr(self):
 *         return self.attr.bad_pkey_cntr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.bad_pkey_cntr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":884
 *     def bad_pkey_cntr(self):
 *         return self.attr.bad_pkey_cntr
 *     @property             # <<<<<<<<<<<<<<
 *     def qkey_viol_cntr(self):
 *         return self.attr.qkey_viol_cntr
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_14qkey_viol_cntr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_14qkey_viol_cntr_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_7pyverbs_6device_8PortAttr_14qkey_viol_cntr___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_14qkey_viol_cntr___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":886
 *     @property
 *     def qkey_viol_cntr(self):
 *         return self.attr.qkey_viol_cntr             # <<<<<<<<<<<<<<
 *     @property
 *     def pkey_tbl_len(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.qkey_viol_cntr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":884
 *     def bad_pkey_cntr(self):
 *         return self.attr.bad_pkey_cntr
 *     @property             # <<<<<<<<<<<<<<
 *     def qkey_viol_cntr(self):
 *         return self.attr.qkey_viol_cntr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.qkey_viol_cntr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":887
 *     def qkey_viol_cntr(self):
 *         return self.attr.qkey_viol_cntr
 *     @property             # <<<<<<<<<<<<<<
 *     def pkey_tbl_len(self):
 *         return self.attr.pkey_tbl_len
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_12pkey_tbl_len_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_12pkey_tbl_len_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_7pyverbs_6device_8PortAttr_12pkey_tbl_len___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_12pkey_tbl_len___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":889
 *     @property
 *     def pkey_tbl_len(self):
 *         return self.attr.pkey_tbl_len             # <<<<<<<<<<<<<<
 *     @property
 *     def lid(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.pkey_tbl_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":887
 *     def qkey_viol_cntr(self):
 *         return self.attr.qkey_viol_cntr
 *     @property             # <<<<<<<<<<<<<<
 *     def pkey_tbl_len(self):
 *         return self.attr.pkey_tbl_len
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.pkey_tbl_len.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":890
 *     def pkey_tbl_len(self):
 *         return self.attr.pkey_tbl_len
 *     @property             # <<<<<<<<<<<<<<
 *     def lid(self):
 *         return self.attr.lid
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_3lid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_3lid_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_7pyverbs_6device_8PortAttr_3lid___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_3lid___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":892
 *     @property
 *     def lid(self):
 *         return self.attr.lid             # <<<<<<<<<<<<<<
 *     @property
 *     def sm_lid(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.lid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":890
 *     def pkey_tbl_len(self):
 *         return self.attr.pkey_tbl_len
 *     @property             # <<<<<<<<<<<<<<
 *     def lid(self):
 *         return self.attr.lid
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.lid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":893
 *     def lid(self):
 *         return self.attr.lid
 *     @property             # <<<<<<<<<<<<<<
 *     def sm_lid(self):
 *         return self.attr.sm_lid
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_6sm_lid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_6sm_lid_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_7pyverbs_6device_8PortAttr_6sm_lid___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_6sm_lid___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":895
 *     @property
 *     def sm_lid(self):
 *         return self.attr.sm_lid             # <<<<<<<<<<<<<<
 *     @property
 *     def lmc(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.sm_lid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":893
 *     def lid(self):
 *         return self.attr.lid
 *     @property             # <<<<<<<<<<<<<<
 *     def sm_lid(self):
 *         return self.attr.sm_lid
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.sm_lid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":896
 *     def sm_lid(self):
 *         return self.attr.sm_lid
 *     @property             # <<<<<<<<<<<<<<
 *     def lmc(self):
 *         return self.attr.lmc
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_3lmc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_3lmc_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_7pyverbs_6device_8PortAttr_3lmc___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_3lmc___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":898
 *     @property
 *     def lmc(self):
 *         return self.attr.lmc             # <<<<<<<<<<<<<<
 *     @property
 *     def max_vl_num(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.lmc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":896
 *     def sm_lid(self):
 *         return self.attr.sm_lid
 *     @property             # <<<<<<<<<<<<<<
 *     def lmc(self):
 *         return self.attr.lmc
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.lmc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":899
 *     def lmc(self):
 *         return self.attr.lmc
 *     @property             # <<<<<<<<<<<<<<
 *     def max_vl_num(self):
 *         return self.attr.max_vl_num
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10max_vl_num_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10max_vl_num_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_7pyverbs_6device_8PortAttr_10max_vl_num___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10max_vl_num___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":901
 *     @property
 *     def max_vl_num(self):
 *         return self.attr.max_vl_num             # <<<<<<<<<<<<<<
 *     @property
 *     def sm_sl(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.max_vl_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":899
 *     def lmc(self):
 *         return self.attr.lmc
 *     @property             # <<<<<<<<<<<<<<
 *     def max_vl_num(self):
 *         return self.attr.max_vl_num
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.max_vl_num.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":902
 *     def max_vl_num(self):
 *         return self.attr.max_vl_num
 *     @property             # <<<<<<<<<<<<<<
 *     def sm_sl(self):
 *         return self.attr.sm_sl
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5sm_sl_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5sm_sl_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_7pyverbs_6device_8PortAttr_5sm_sl___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_5sm_sl___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":904
 *     @property
 *     def sm_sl(self):
 *         return self.attr.sm_sl             # <<<<<<<<<<<<<<
 *     @property
 *     def subnet_timeout(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.sm_sl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":902
 *     def max_vl_num(self):
 *         return self.attr.max_vl_num
 *     @property             # <<<<<<<<<<<<<<
 *     def sm_sl(self):
 *         return self.attr.sm_sl
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.sm_sl.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":905
 *     def sm_sl(self):
 *         return self.attr.sm_sl
 *     @property             # <<<<<<<<<<<<<<
 *     def subnet_timeout(self):
 *         return self.attr.subnet_timeout
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_14subnet_timeout_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_14subnet_timeout_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_7pyverbs_6device_8PortAttr_14subnet_timeout___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_14subnet_timeout___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":907
 *     @property
 *     def subnet_timeout(self):
 *         return self.attr.subnet_timeout             # <<<<<<<<<<<<<<
 *     @property
 *     def init_type_reply(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.subnet_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":905
 *     def sm_sl(self):
 *         return self.attr.sm_sl
 *     @property             # <<<<<<<<<<<<<<
 *     def subnet_timeout(self):
 *         return self.attr.subnet_timeout
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.subnet_timeout.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":908
 *     def subnet_timeout(self):
 *         return self.attr.subnet_timeout
 *     @property             # <<<<<<<<<<<<<<
 *     def init_type_reply(self):
 *         return self.attr.init_type_reply
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_15init_type_reply_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_15init_type_reply_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_7pyverbs_6device_8PortAttr_15init_type_reply___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_15init_type_reply___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":910
 *     @property
 *     def init_type_reply(self):
 *         return self.attr.init_type_reply             # <<<<<<<<<<<<<<
 *     @property
 *     def active_width(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.init_type_reply); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":908
 *     def subnet_timeout(self):
 *         return self.attr.subnet_timeout
 *     @property             # <<<<<<<<<<<<<<
 *     def init_type_reply(self):
 *         return self.attr.init_type_reply
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.init_type_reply.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":911
 *     def init_type_reply(self):
 *         return self.attr.init_type_reply
 *     @property             # <<<<<<<<<<<<<<
 *     def active_width(self):
 *         return self.attr.active_width
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_12active_width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_12active_width_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_7pyverbs_6device_8PortAttr_12active_width___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_12active_width___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":913
 *     @property
 *     def active_width(self):
 *         return self.attr.active_width             # <<<<<<<<<<<<<<
 *     @property
 *     def active_speed(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.active_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":911
 *     def init_type_reply(self):
 *         return self.attr.init_type_reply
 *     @property             # <<<<<<<<<<<<<<
 *     def active_width(self):
 *         return self.attr.active_width
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.active_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":914
 *     def active_width(self):
 *         return self.attr.active_width
 *     @property             # <<<<<<<<<<<<<<
 *     def active_speed(self):
 *         return self.attr.active_speed
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_12active_speed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_12active_speed_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_7pyverbs_6device_8PortAttr_12active_speed___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_12active_speed___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":916
 *     @property
 *     def active_speed(self):
 *         return self.attr.active_speed             # <<<<<<<<<<<<<<
 *     @property
 *     def phys_state(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.active_speed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":914
 *     def active_width(self):
 *         return self.attr.active_width
 *     @property             # <<<<<<<<<<<<<<
 *     def active_speed(self):
 *         return self.attr.active_speed
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.active_speed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":917
 *     def active_speed(self):
 *         return self.attr.active_speed
 *     @property             # <<<<<<<<<<<<<<
 *     def phys_state(self):
 *         return self.attr.phys_state
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10phys_state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10phys_state_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_7pyverbs_6device_8PortAttr_10phys_state___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10phys_state___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":919
 *     @property
 *     def phys_state(self):
 *         return self.attr.phys_state             # <<<<<<<<<<<<<<
 *     @property
 *     def link_layer(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.phys_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":917
 *     def active_speed(self):
 *         return self.attr.active_speed
 *     @property             # <<<<<<<<<<<<<<
 *     def phys_state(self):
 *         return self.attr.phys_state
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.phys_state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":920
 *     def phys_state(self):
 *         return self.attr.phys_state
 *     @property             # <<<<<<<<<<<<<<
 *     def link_layer(self):
 *         return self.attr.link_layer
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10link_layer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_10link_layer_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_7pyverbs_6device_8PortAttr_10link_layer___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_10link_layer___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":922
 *     @property
 *     def link_layer(self):
 *         return self.attr.link_layer             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.link_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":920
 *     def phys_state(self):
 *         return self.attr.phys_state
 *     @property             # <<<<<<<<<<<<<<
 *     def link_layer(self):
 *         return self.attr.link_layer
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.link_layer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":923
 *     def link_layer(self):
 *         return self.attr.link_layer
 *     @property             # <<<<<<<<<<<<<<
 *     def flags(self):
 *         return self.attr.flags
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5flags_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_7pyverbs_6device_8PortAttr_5flags___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_5flags___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":925
 *     @property
 *     def flags(self):
 *         return self.attr.flags             # <<<<<<<<<<<<<<
 *     @property
 *     def port_cap_flags2(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":923
 *     def link_layer(self):
 *         return self.attr.link_layer
 *     @property             # <<<<<<<<<<<<<<
 *     def flags(self):
 *         return self.attr.flags
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":926
 *     def flags(self):
 *         return self.attr.flags
 *     @property             # <<<<<<<<<<<<<<
 *     def port_cap_flags2(self):
 *         return self.attr.port_cap_flags2
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_15port_cap_flags2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_15port_cap_flags2_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_7pyverbs_6device_8PortAttr_15port_cap_flags2___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_15port_cap_flags2___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":928
 *     @property
 *     def port_cap_flags2(self):
 *         return self.attr.port_cap_flags2             # <<<<<<<<<<<<<<
 *     @property
 *     def active_speed_ex(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.port_cap_flags2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":926
 *     def flags(self):
 *         return self.attr.flags
 *     @property             # <<<<<<<<<<<<<<
 *     def port_cap_flags2(self):
 *         return self.attr.port_cap_flags2
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.port_cap_flags2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":929
 *     def port_cap_flags2(self):
 *         return self.attr.port_cap_flags2
 *     @property             # <<<<<<<<<<<<<<
 *     def active_speed_ex(self):
 *         return self.attr.active_speed_ex
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_15active_speed_ex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_15active_speed_ex_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_7pyverbs_6device_8PortAttr_15active_speed_ex___get__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_15active_speed_ex___get__(struct __pyx_obj_7pyverbs_6device_PortAttr *__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);

  /* "pyverbs/device.pyx":931
 *     @property
 *     def active_speed_ex(self):
 *         return self.attr.active_speed_ex             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.active_speed_ex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":929
 *     def port_cap_flags2(self):
 *         return self.attr.port_cap_flags2
 *     @property             # <<<<<<<<<<<<<<
 *     def active_speed_ex(self):
 *         return self.attr.active_speed_ex
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.active_speed_ex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":933
 *         return self.attr.active_speed_ex
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_1__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_8PortAttr___str__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr___str__(struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self) {
  PyObject *__pyx_v_print_format = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":934
 * 
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'             # <<<<<<<<<<<<<<
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_24_20);
  __pyx_v_print_format = __pyx_mstate_global->__pyx_kp_u_24_20;

  /* "pyverbs/device.pyx":935
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_port_state_to_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py(__pyx_v_self->attr.state); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__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;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Port_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":936
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
 *             print_format.format('SM lid', self.attr.sm_lid) +\
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_translate_mtu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(__pyx_v_self->attr.max_mtu); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __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;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_MTU, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":935
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":937
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('SM lid', self.attr.sm_lid) +\
 *             print_format.format('Port lid', self.attr.lid) +\
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_translate_mtu); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(__pyx_v_self->attr.active_mtu); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__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;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Active_MTU, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":936
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
 *             print_format.format('SM lid', self.attr.sm_lid) +\
*/
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":938
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
 *             print_format.format('SM lid', self.attr.sm_lid) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port lid', self.attr.lid) +\
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
*/
  __pyx_t_6 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.sm_lid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_SM_lid, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":937
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('SM lid', self.attr.sm_lid) +\
 *             print_format.format('Port lid', self.attr.lid) +\
*/
  __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":939
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
 *             print_format.format('SM lid', self.attr.sm_lid) +\
 *             print_format.format('Port lid', self.attr.lid) +\             # <<<<<<<<<<<<<<
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.lid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Port_lid, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":938
 *             print_format.format('Max MTU', translate_mtu(self.attr.max_mtu)) +\
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
 *             print_format.format('SM lid', self.attr.sm_lid) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port lid', self.attr.lid) +\
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":940
 *             print_format.format('SM lid', self.attr.sm_lid) +\
 *             print_format.format('Port lid', self.attr.lid) +\
 *             print_format.format('lmc', hex(self.attr.lmc)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
*/
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.lmc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyNumber_Hex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_n_u_lmc, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":939
 *             print_format.format('Active MTU', translate_mtu(self.attr.active_mtu)) +\
 *             print_format.format('SM lid', self.attr.sm_lid) +\
 *             print_format.format('Port lid', self.attr.lid) +\             # <<<<<<<<<<<<<<
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
*/
  __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":941
 *             print_format.format('Port lid', self.attr.lid) +\
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
*/
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_translate_link_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.link_layer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Link_layer, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":940
 *             print_format.format('SM lid', self.attr.sm_lid) +\
 *             print_format.format('Port lid', self.attr.lid) +\
 *             print_format.format('lmc', hex(self.attr.lmc)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
*/
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":942
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
*/
  __pyx_t_4 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.max_msg_sz); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyNumber_Hex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Max_message_size, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":941
 *             print_format.format('Port lid', self.attr.lid) +\
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
*/
  __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":943
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_translate_port_cap_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.port_cap_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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[2] = {__pyx_t_2, __pyx_t_1};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Port_cap_flags, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":942
 *             print_format.format('lmc', hex(self.attr.lmc)) +\
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":944
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
*/
  __pyx_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_translate_port_cap_flags2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.port_cap_flags2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Port_cap_flags_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":943
 *             print_format.format('Link layer', translate_link_layer(self.attr.link_layer)) +\
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":945
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
 *             print_format.format('max VL num', self.attr.max_vl_num) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.max_vl_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_max_VL_num, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":944
 *             print_format.format('Max message size', hex(self.attr.max_msg_sz)) +\
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":946
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
*/
  __pyx_t_4 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.bad_pkey_cntr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Bad_Pkey_counter, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":945
 *             print_format.format('Port cap flags', translate_port_cap_flags(self.attr.port_cap_flags)) +\
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
 *             print_format.format('max VL num', self.attr.max_vl_num) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __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;

  /* "pyverbs/device.pyx":947
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
*/
  __pyx_t_3 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.qkey_viol_cntr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Qkey_violations_counter, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":946
 *             print_format.format('Port cap flags 2', translate_port_cap_flags2(self.attr.port_cap_flags2)) +\
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":948
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
 *             print_format.format('SM sl', self.attr.sm_sl) +\
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->attr.gid_tbl_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_GID_table_len, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":947
 *             print_format.format('max VL num', self.attr.max_vl_num) +\
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\             # <<<<<<<<<<<<<<
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":949
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\             # <<<<<<<<<<<<<<
 *             print_format.format('SM sl', self.attr.sm_sl) +\
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
*/
  __pyx_t_4 = __Pyx_PyLong_From_unsigned_short(__pyx_v_self->attr.pkey_tbl_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Pkey_table_len, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":948
 *             print_format.format('Bad Pkey counter', self.attr.bad_pkey_cntr) +\
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
 *             print_format.format('SM sl', self.attr.sm_sl) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __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;

  /* "pyverbs/device.pyx":950
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
 *             print_format.format('SM sl', self.attr.sm_sl) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
*/
  __pyx_t_3 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.sm_sl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_SM_sl, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":949
 *             print_format.format('Qkey violations counter', self.attr.qkey_viol_cntr) +\
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\             # <<<<<<<<<<<<<<
 *             print_format.format('SM sl', self.attr.sm_sl) +\
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":951
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
 *             print_format.format('SM sl', self.attr.sm_sl) +\
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.subnet_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Subnet_timeout, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":950
 *             print_format.format('GID table len', self.attr.gid_tbl_len) +\
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
 *             print_format.format('SM sl', self.attr.sm_sl) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":952
 *             print_format.format('SM sl', self.attr.sm_sl) +\
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
*/
  __pyx_t_4 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.init_type_reply); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Init_type_reply, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":951
 *             print_format.format('Pkey table len', self.attr.pkey_tbl_len) +\
 *             print_format.format('SM sl', self.attr.sm_sl) +\
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __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;

  /* "pyverbs/device.pyx":953
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\
*/
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_width_to_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.active_width); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Active_width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyverbs/device.pyx":952
 *             print_format.format('SM sl', self.attr.sm_sl) +\
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
*/
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":954
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\
 *             print_format.format('Flags', self.attr.flags)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_speed_to_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.active_speed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->attr.active_speed_ex); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_t_7};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Active_speed, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":953
 *             print_format.format('Subnet timeout', self.attr.subnet_timeout) +\
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\
*/
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":955
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Flags', self.attr.flags)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_phys_state_to_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.phys_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_7 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Phys_state, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyverbs/device.pyx":954
 *             print_format.format('Init type reply', self.attr.init_type_reply) +\
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\
 *             print_format.format('Flags', self.attr.flags)
*/
  __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyverbs/device.pyx":956
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\
 *             print_format.format('Flags', self.attr.flags)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->attr.flags); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_n_u_Flags, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyverbs/device.pyx":955
 *             print_format.format('Active width', width_to_str(self.attr.active_width)) +\
 *             print_format.format('Active speed', speed_to_str(self.attr.active_speed, self.attr.active_speed_ex)) +\
 *             print_format.format('Phys state', phys_state_to_str(self.attr.phys_state)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Flags', self.attr.flags)
 * 
*/
  __pyx_t_7 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":933
 *         return self.attr.active_speed_ex
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Port state', port_state_to_str(self.attr.state)) +\
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyverbs.device.PortAttr.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_print_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_3__reduce_cython__(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_7pyverbs_6device_8PortAttr_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8PortAttr_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_3__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_8PortAttr_2__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8PortAttr_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_11, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.PortAttr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5__setstate_cython__(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_7pyverbs_6device_8PortAttr_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8PortAttr_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_8PortAttr_5__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.PortAttr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_8PortAttr_4__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_PortAttr *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_8PortAttr_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_PortAttr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_11, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.PortAttr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":960
 * 
 * cdef class GIDEntry(PyverbsObject):
 *     def __init__(self, subnet_prefix=0, interface_id=0, gid_index=0,             # <<<<<<<<<<<<<<
 *                  port_num=0, gid_type=0, ndev_ifindex=0):
 *         super().__init__()
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_8GIDEntry_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyverbs_6device_8GIDEntry_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_subnet_prefix = 0;
  PyObject *__pyx_v_interface_id = 0;
  PyObject *__pyx_v_gid_index = 0;
  PyObject *__pyx_v_port_num = 0;
  PyObject *__pyx_v_gid_type = 0;
  PyObject *__pyx_v_ndev_ifindex = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,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_subnet_prefix,&__pyx_mstate_global->__pyx_n_u_interface_id,&__pyx_mstate_global->__pyx_n_u_gid_index,&__pyx_mstate_global->__pyx_n_u_port_num,&__pyx_mstate_global->__pyx_n_u_gid_type,&__pyx_mstate_global->__pyx_n_u_ndev_ifindex,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, 960, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 960, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 960, __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, 960, __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, 960, __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, 960, __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, 960, __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, 960, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 960, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 960, __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, 960, __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, 960, __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, 960, __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, 960, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_subnet_prefix = values[0];
    __pyx_v_interface_id = values[1];
    __pyx_v_gid_index = values[2];
    __pyx_v_port_num = values[3];
    __pyx_v_gid_type = values[4];
    __pyx_v_ndev_ifindex = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 960, __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("pyverbs.device.GIDEntry.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_8GIDEntry___init__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self), __pyx_v_subnet_prefix, __pyx_v_interface_id, __pyx_v_gid_index, __pyx_v_port_num, __pyx_v_gid_type, __pyx_v_ndev_ifindex);

  /* 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_7pyverbs_6device_8GIDEntry___init__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self, PyObject *__pyx_v_subnet_prefix, PyObject *__pyx_v_interface_id, PyObject *__pyx_v_gid_index, PyObject *__pyx_v_port_num, PyObject *__pyx_v_gid_type, PyObject *__pyx_v_ndev_ifindex) {
  int __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;
  unsigned long __pyx_t_6;
  uint32_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":962
 *     def __init__(self, subnet_prefix=0, interface_id=0, gid_index=0,
 *                  port_num=0, gid_type=0, ndev_ifindex=0):
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         self.entry.gid._global.subnet_prefix = subnet_prefix
 *         self.entry.gid._global.interface_id = interface_id
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_GIDEntry), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":963
 *                  port_num=0, gid_type=0, ndev_ifindex=0):
 *         super().__init__()
 *         self.entry.gid._global.subnet_prefix = subnet_prefix             # <<<<<<<<<<<<<<
 *         self.entry.gid._global.interface_id = interface_id
 *         self.entry.gid_index = gid_index
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_long(__pyx_v_subnet_prefix); if (unlikely((__pyx_t_6 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L1_error)
  __pyx_v_self->entry.gid.global.subnet_prefix = __pyx_t_6;

  /* "pyverbs/device.pyx":964
 *         super().__init__()
 *         self.entry.gid._global.subnet_prefix = subnet_prefix
 *         self.entry.gid._global.interface_id = interface_id             # <<<<<<<<<<<<<<
 *         self.entry.gid_index = gid_index
 *         self.entry.port_num = port_num
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_long(__pyx_v_interface_id); if (unlikely((__pyx_t_6 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 964, __pyx_L1_error)
  __pyx_v_self->entry.gid.global.interface_id = __pyx_t_6;

  /* "pyverbs/device.pyx":965
 *         self.entry.gid._global.subnet_prefix = subnet_prefix
 *         self.entry.gid._global.interface_id = interface_id
 *         self.entry.gid_index = gid_index             # <<<<<<<<<<<<<<
 *         self.entry.port_num = port_num
 *         self.entry.gid_type = gid_type
*/
  __pyx_t_7 = __Pyx_PyLong_As_uint32_t(__pyx_v_gid_index); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L1_error)
  __pyx_v_self->entry.gid_index = __pyx_t_7;

  /* "pyverbs/device.pyx":966
 *         self.entry.gid._global.interface_id = interface_id
 *         self.entry.gid_index = gid_index
 *         self.entry.port_num = port_num             # <<<<<<<<<<<<<<
 *         self.entry.gid_type = gid_type
 *         self.entry.ndev_ifindex = ndev_ifindex
*/
  __pyx_t_7 = __Pyx_PyLong_As_uint32_t(__pyx_v_port_num); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 966, __pyx_L1_error)
  __pyx_v_self->entry.port_num = __pyx_t_7;

  /* "pyverbs/device.pyx":967
 *         self.entry.gid_index = gid_index
 *         self.entry.port_num = port_num
 *         self.entry.gid_type = gid_type             # <<<<<<<<<<<<<<
 *         self.entry.ndev_ifindex = ndev_ifindex
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_As_uint32_t(__pyx_v_gid_type); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L1_error)
  __pyx_v_self->entry.gid_type = __pyx_t_7;

  /* "pyverbs/device.pyx":968
 *         self.entry.port_num = port_num
 *         self.entry.gid_type = gid_type
 *         self.entry.ndev_ifindex = ndev_ifindex             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_7 = __Pyx_PyLong_As_uint32_t(__pyx_v_ndev_ifindex); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
  __pyx_v_self->entry.ndev_ifindex = __pyx_t_7;

  /* "pyverbs/device.pyx":960
 * 
 * cdef class GIDEntry(PyverbsObject):
 *     def __init__(self, subnet_prefix=0, interface_id=0, gid_index=0,             # <<<<<<<<<<<<<<
 *                  port_num=0, gid_type=0, ndev_ifindex=0):
 *         super().__init__()
*/

  /* function exit code */
  __pyx_r = 0;
  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("pyverbs.device.GIDEntry.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":970
 *         self.entry.ndev_ifindex = ndev_ifindex
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_subnet_prefix(self):
 *         return self.entry.gid._global.subnet_prefix
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_17gid_subnet_prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_17gid_subnet_prefix_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_7pyverbs_6device_8GIDEntry_17gid_subnet_prefix___get__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_17gid_subnet_prefix___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__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);

  /* "pyverbs/device.pyx":972
 *     @property
 *     def gid_subnet_prefix(self):
 *         return self.entry.gid._global.subnet_prefix             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->entry.gid.global.subnet_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":970
 *         self.entry.ndev_ifindex = ndev_ifindex
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_subnet_prefix(self):
 *         return self.entry.gid._global.subnet_prefix
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.gid_subnet_prefix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":974
 *         return self.entry.gid._global.subnet_prefix
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_interface_id(self):
 *         return self.entry.gid._global.interface_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_16gid_interface_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_16gid_interface_id_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_7pyverbs_6device_8GIDEntry_16gid_interface_id___get__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_16gid_interface_id___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__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);

  /* "pyverbs/device.pyx":976
 *     @property
 *     def gid_interface_id(self):
 *         return self.entry.gid._global.interface_id             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->entry.gid.global.interface_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":974
 *         return self.entry.gid._global.subnet_prefix
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_interface_id(self):
 *         return self.entry.gid._global.interface_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.gid_interface_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":978
 *         return self.entry.gid._global.interface_id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_index(self):
 *         return self.entry.gid_index
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_9gid_index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_9gid_index_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_7pyverbs_6device_8GIDEntry_9gid_index___get__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_9gid_index___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__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);

  /* "pyverbs/device.pyx":980
 *     @property
 *     def gid_index(self):
 *         return self.entry.gid_index             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->entry.gid_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":978
 *         return self.entry.gid._global.interface_id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_index(self):
 *         return self.entry.gid_index
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.gid_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":982
 *         return self.entry.gid_index
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def port_num(self):
 *         return self.entry.port_num
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_8port_num_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_8port_num_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_7pyverbs_6device_8GIDEntry_8port_num___get__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_8port_num___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__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);

  /* "pyverbs/device.pyx":984
 *     @property
 *     def port_num(self):
 *         return self.entry.port_num             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->entry.port_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":982
 *         return self.entry.gid_index
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def port_num(self):
 *         return self.entry.port_num
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.port_num.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":986
 *         return self.entry.port_num
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_type(self):
 *         return self.entry.gid_type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_8gid_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_8gid_type_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_7pyverbs_6device_8GIDEntry_8gid_type___get__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_8gid_type___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__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);

  /* "pyverbs/device.pyx":988
 *     @property
 *     def gid_type(self):
 *         return self.entry.gid_type             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->entry.gid_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":986
 *         return self.entry.port_num
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def gid_type(self):
 *         return self.entry.gid_type
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.gid_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":990
 *         return self.entry.gid_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndev_ifindex(self):
 *         return self.entry.ndev_ifindex
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_12ndev_ifindex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_12ndev_ifindex_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_7pyverbs_6device_8GIDEntry_12ndev_ifindex___get__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_12ndev_ifindex___get__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__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);

  /* "pyverbs/device.pyx":992
 *     @property
 *     def ndev_ifindex(self):
 *         return self.entry.ndev_ifindex             # <<<<<<<<<<<<<<
 * 
 *     def gid_str(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->entry.ndev_ifindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":990
 *         return self.entry.gid_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndev_ifindex(self):
 *         return self.entry.ndev_ifindex
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.ndev_ifindex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":994
 *         return self.entry.ndev_ifindex
 * 
 *     def gid_str(self):             # <<<<<<<<<<<<<<
 *         return gid_str(self.gid_subnet_prefix, self.gid_interface_id)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_3gid_str(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_7pyverbs_6device_8GIDEntry_3gid_str = {"gid_str", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8GIDEntry_3gid_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_3gid_str(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gid_str (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("gid_str", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("gid_str", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_8GIDEntry_2gid_str(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_2gid_str(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gid_str", 0);

  /* "pyverbs/device.pyx":995
 * 
 *     def gid_str(self):
 *         return gid_str(self.gid_subnet_prefix, self.gid_interface_id)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_gid_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_gid_subnet_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_gid_interface_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 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_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":994
 *         return self.entry.ndev_ifindex
 * 
 *     def gid_str(self):             # <<<<<<<<<<<<<<
 *         return gid_str(self.gid_subnet_prefix, self.gid_interface_id)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.gid_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":997
 *         return gid_str(self.gid_subnet_prefix, self.gid_interface_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('GID', self.gid_str()) +\
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_5__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_8GIDEntry_4__str__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_4__str__(struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self) {
  PyObject *__pyx_v_print_format = NULL;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":998
 * 
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'             # <<<<<<<<<<<<<<
 *         return print_format.format('GID', self.gid_str()) +\
 *             print_format.format('GID Index', self.gid_index) +\
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_24_20);
  __pyx_v_print_format = __pyx_mstate_global->__pyx_kp_u_24_20;

  /* "pyverbs/device.pyx":999
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('GID', self.gid_str()) +\             # <<<<<<<<<<<<<<
 *             print_format.format('GID Index', self.gid_index) +\
 *             print_format.format('Port number', self.port_num) +\
*/
  __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_gid_str, __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, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_n_u_GID, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1000
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('GID', self.gid_str()) +\
 *             print_format.format('GID Index', self.gid_index) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port number', self.port_num) +\
 *             print_format.format('GID type', translate_gid_type(
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_gid_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_GID_Index, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":999
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('GID', self.gid_str()) +\             # <<<<<<<<<<<<<<
 *             print_format.format('GID Index', self.gid_index) +\
 *             print_format.format('Port number', self.port_num) +\
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1001
 *         return print_format.format('GID', self.gid_str()) +\
 *             print_format.format('GID Index', self.gid_index) +\
 *             print_format.format('Port number', self.port_num) +\             # <<<<<<<<<<<<<<
 *             print_format.format('GID type', translate_gid_type(
 *                                 self.gid_type)) +\
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_port_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Port_number, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1000
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('GID', self.gid_str()) +\
 *             print_format.format('GID Index', self.gid_index) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Port number', self.port_num) +\
 *             print_format.format('GID type', translate_gid_type(
*/
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1000, __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;

  /* "pyverbs/device.pyx":1002
 *             print_format.format('GID Index', self.gid_index) +\
 *             print_format.format('Port number', self.port_num) +\
 *             print_format.format('GID type', translate_gid_type(             # <<<<<<<<<<<<<<
 *                                 self.gid_type)) +\
 *             print_format.format('Ndev ifindex', self.ndev_ifindex)
*/
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_translate_gid_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pyverbs/device.pyx":1003
 *             print_format.format('Port number', self.port_num) +\
 *             print_format.format('GID type', translate_gid_type(
 *                                 self.gid_type)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Ndev ifindex', self.ndev_ifindex)
 * 
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_gid_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_3 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }

  /* "pyverbs/device.pyx":1002
 *             print_format.format('GID Index', self.gid_index) +\
 *             print_format.format('Port number', self.port_num) +\
 *             print_format.format('GID type', translate_gid_type(             # <<<<<<<<<<<<<<
 *                                 self.gid_type)) +\
 *             print_format.format('Ndev ifindex', self.ndev_ifindex)
*/
  __pyx_t_5 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_GID_type, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1001
 *         return print_format.format('GID', self.gid_str()) +\
 *             print_format.format('GID Index', self.gid_index) +\
 *             print_format.format('Port number', self.port_num) +\             # <<<<<<<<<<<<<<
 *             print_format.format('GID type', translate_gid_type(
 *                                 self.gid_type)) +\
*/
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":1004
 *             print_format.format('GID type', translate_gid_type(
 *                                 self.gid_type)) +\
 *             print_format.format('Ndev ifindex', self.ndev_ifindex)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ndev_ifindex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Ndev_ifindex, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyverbs/device.pyx":1003
 *             print_format.format('Port number', self.port_num) +\
 *             print_format.format('GID type', translate_gid_type(
 *                                 self.gid_type)) +\             # <<<<<<<<<<<<<<
 *             print_format.format('Ndev ifindex', self.ndev_ifindex)
 * 
*/
  __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":997
 *         return gid_str(self.gid_subnet_prefix, self.gid_interface_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('GID', self.gid_str()) +\
*/

  /* 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_6);
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_print_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_7__reduce_cython__(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_7pyverbs_6device_8GIDEntry_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8GIDEntry_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_7__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_8GIDEntry_6__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_8GIDEntry_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_12, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_9__setstate_cython__(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_7pyverbs_6device_8GIDEntry_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8GIDEntry_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_8GIDEntry_9__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.GIDEntry.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_8GIDEntry_8__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_GIDEntry *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_8GIDEntry_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_GIDEntry *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Pickling_of_struct_members_such_12, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.GIDEntry.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1008
 * 
 * cdef class AsyncEvent(PyverbsObject):
 *     def __init__(self, event_type=0):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         self.event.event_type = event_type
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_10AsyncEvent_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyverbs_6device_10AsyncEvent_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_event_type = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {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_event_type,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, 1008, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1008, __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, 1008, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1008, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_event_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1008, __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("pyverbs.device.AsyncEvent.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_10AsyncEvent___init__(((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_v_self), __pyx_v_event_type);

  /* 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_7pyverbs_6device_10AsyncEvent___init__(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self, PyObject *__pyx_v_event_type) {
  int __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;
  enum ibv_event_type __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":1009
 * cdef class AsyncEvent(PyverbsObject):
 *     def __init__(self, event_type=0):
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         self.event.event_type = event_type
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_AsyncEvent), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1010
 *     def __init__(self, event_type=0):
 *         super().__init__()
 *         self.event.event_type = event_type             # <<<<<<<<<<<<<<
 * 
 *     def ack(self):
*/
  __pyx_t_6 = ((enum ibv_event_type)__Pyx_PyLong_As_enum__ibv_event_type(__pyx_v_event_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_v_self->event.event_type = __pyx_t_6;

  /* "pyverbs/device.pyx":1008
 * 
 * cdef class AsyncEvent(PyverbsObject):
 *     def __init__(self, event_type=0):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         self.event.event_type = event_type
*/

  /* function exit code */
  __pyx_r = 0;
  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("pyverbs.device.AsyncEvent.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1012
 *         self.event.event_type = event_type
 * 
 *     def ack(self):             # <<<<<<<<<<<<<<
 *         v.ibv_ack_async_event(&self.event)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_3ack(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_7pyverbs_6device_10AsyncEvent_3ack = {"ack", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10AsyncEvent_3ack, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_3ack(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ack (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("ack", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("ack", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_10AsyncEvent_2ack(((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_2ack(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ack", 0);

  /* "pyverbs/device.pyx":1013
 * 
 *     def ack(self):
 *         v.ibv_ack_async_event(&self.event)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  ibv_ack_async_event((&__pyx_v_self->event));

  /* "pyverbs/device.pyx":1012
 *         self.event.event_type = event_type
 * 
 *     def ack(self):             # <<<<<<<<<<<<<<
 *         v.ibv_ack_async_event(&self.event)
 * 
*/

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

/* "pyverbs/device.pyx":1015
 *         v.ibv_ack_async_event(&self.event)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def event_type(self):
 *         return self.event.event_type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_10event_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_10event_type_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_7pyverbs_6device_10AsyncEvent_10event_type___get__(((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_10event_type___get__(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__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);

  /* "pyverbs/device.pyx":1017
 *     @property
 *     def event_type(self):
 *         return self.event.event_type             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(__pyx_v_self->event.event_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1015
 *         v.ibv_ack_async_event(&self.event)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def event_type(self):
 *         return self.event.event_type
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.AsyncEvent.event_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1019
 *         return self.event.event_type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Event Type', translate_event_type(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_5__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_10AsyncEvent_4__str__(((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_4__str__(struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self) {
  PyObject *__pyx_v_print_format = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":1020
 * 
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'             # <<<<<<<<<<<<<<
 *         return print_format.format('Event Type', translate_event_type(
 *                                    self.event.event_type))
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_24_20);
  __pyx_v_print_format = __pyx_mstate_global->__pyx_kp_u_24_20;

  /* "pyverbs/device.pyx":1021
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Event Type', translate_event_type(             # <<<<<<<<<<<<<<
 *                                    self.event.event_type))
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_translate_event_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyverbs/device.pyx":1022
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Event Type', translate_event_type(
 *                                    self.event.event_type))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(__pyx_v_self->event.event_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__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;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }

  /* "pyverbs/device.pyx":1021
 *     def __str__(self):
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Event Type', translate_event_type(             # <<<<<<<<<<<<<<
 *                                    self.event.event_type))
 * 
*/
  __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Event_Type, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1019
 *         return self.event.event_type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:<24}: {:<20}\n'
 *         return print_format.format('Event Type', translate_event_type(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyverbs.device.AsyncEvent.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_print_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_7__reduce_cython__(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_7pyverbs_6device_10AsyncEvent_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10AsyncEvent_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_7__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_10AsyncEvent_6__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_10AsyncEvent_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_event_cannot_be_converted_t, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AsyncEvent.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_9__setstate_cython__(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_7pyverbs_6device_10AsyncEvent_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10AsyncEvent_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_10AsyncEvent_9__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.AsyncEvent.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_10AsyncEvent_8__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_AsyncEvent *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_10AsyncEvent_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_AsyncEvent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_event_cannot_be_converted_t, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.AsyncEvent.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1025
 * 
 * 
 * def translate_gid_type(gid_type):             # <<<<<<<<<<<<<<
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_1translate_gid_type(PyObject *__pyx_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_7pyverbs_6device_1translate_gid_type = {"translate_gid_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_1translate_gid_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_1translate_gid_type(PyObject *__pyx_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_gid_type = 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("translate_gid_type (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_gid_type,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, 1025, __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, 1025, __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, "translate_gid_type", 0) < (0)) __PYX_ERR(0, 1025, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_gid_type", 1, 1, 1, i); __PYX_ERR(0, 1025, __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, 1025, __pyx_L3_error)
    }
    __pyx_v_gid_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_gid_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1025, __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("pyverbs.device.translate_gid_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_translate_gid_type(__pyx_self, __pyx_v_gid_type);

  /* 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_7pyverbs_6device_translate_gid_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gid_type) {
  PyObject *__pyx_v_types = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[3];
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("translate_gid_type", 0);

  /* "pyverbs/device.pyx":1026
 * 
 * def translate_gid_type(gid_type):
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',             # <<<<<<<<<<<<<<
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
 *     try:
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(IBV_GID_TYPE_IB); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IB) < (0)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(IBV_GID_TYPE_ROCE_V1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_RoCEv1) < (0)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1027
 * def translate_gid_type(gid_type):
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}             # <<<<<<<<<<<<<<
 *     try:
 *         return types[gid_type]
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(IBV_GID_TYPE_ROCE_V2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_RoCEv2) < (0)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1028
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
 *     try:             # <<<<<<<<<<<<<<
 *         return types[gid_type]
 *     except KeyError:
*/
  {
    __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:*/ {

      /* "pyverbs/device.pyx":1029
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
 *     try:
 *         return types[gid_type]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return f'Unknown gid_type ({gid_type})'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_types, __pyx_v_gid_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1028
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
 *     try:             # <<<<<<<<<<<<<<
 *         return types[gid_type]
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":1030
 *     try:
 *         return types[gid_type]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return f'Unknown gid_type ({gid_type})'
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pyverbs.device.translate_gid_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 1030, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "pyverbs/device.pyx":1031
 *         return types[gid_type]
 *     except KeyError:
 *         return f'Unknown gid_type ({gid_type})'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_gid_type, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Unknown_gid_type;
      __pyx_t_9[1] = __pyx_t_8;
      __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1031, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1028
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
 *     try:             # <<<<<<<<<<<<<<
 *         return types[gid_type]
 *     except KeyError:
*/
    __pyx_L5_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_L7_try_return:;
    __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_L0;
    __pyx_L6_except_return:;
    __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_L0;
  }

  /* "pyverbs/device.pyx":1025
 * 
 * 
 * def translate_gid_type(gid_type):             # <<<<<<<<<<<<<<
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyverbs.device.translate_gid_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_types);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1034
 * 
 * 
 * def guid_format(num):             # <<<<<<<<<<<<<<
 *     """
 *     Get GUID representation of the given number, including change of endianness.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_3guid_format(PyObject *__pyx_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*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_2guid_format, "\n    Get GUID representation of the given number, including change of endianness.\n    :param num: Number to change to GUID format.\n    :return: GUID-formatted string.\n    ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_3guid_format = {"guid_format", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_3guid_format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_2guid_format};
static PyObject *__pyx_pw_7pyverbs_6device_3guid_format(PyObject *__pyx_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_num = 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("guid_format (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_num,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, 1034, __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, 1034, __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, "guid_format", 0) < (0)) __PYX_ERR(0, 1034, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("guid_format", 1, 1, 1, i); __PYX_ERR(0, 1034, __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, 1034, __pyx_L3_error)
    }
    __pyx_v_num = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("guid_format", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1034, __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("pyverbs.device.guid_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_2guid_format(__pyx_self, __pyx_v_num);

  /* 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_7pyverbs_6device_2guid_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_v_hex_str = NULL;
  PyObject *__pyx_v_hex_array = NULL;
  Py_ssize_t __pyx_7genexpr__pyx_v_i;
  PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("guid_format", 0);
  __Pyx_INCREF(__pyx_v_num);

  /* "pyverbs/device.pyx":1040
 *     :return: GUID-formatted string.
 *     """
 *     num = be64toh(num)             # <<<<<<<<<<<<<<
 *     hex_str = "%016x" % (num)
 *     hex_array = [hex_str[i:i+2] for i in range(0, len(hex_str), 2)]
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_long(__pyx_v_num); if (unlikely((__pyx_t_1 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_long(be64toh(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_num, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1041
 *     """
 *     num = be64toh(num)
 *     hex_str = "%016x" % (num)             # <<<<<<<<<<<<<<
 *     hex_array = [hex_str[i:i+2] for i in range(0, len(hex_str), 2)]
 *     hex_array = [''.join(x) for x in zip(hex_array[0::2], hex_array[1::2])]
*/
  __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_016x, __pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_hex_str = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1042
 *     num = be64toh(num)
 *     hex_str = "%016x" % (num)
 *     hex_array = [hex_str[i:i+2] for i in range(0, len(hex_str), 2)]             # <<<<<<<<<<<<<<
 *     hex_array = [''.join(x) for x in zip(hex_array[0::2], hex_array[1::2])]
 *     return ':'.join(hex_array)
*/
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_hex_str); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1042, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=2) {
      __pyx_7genexpr__pyx_v_i = __pyx_t_5;
      __pyx_t_6 = __Pyx_PyUnicode_Substring(__pyx_v_hex_str, __pyx_7genexpr__pyx_v_i, (__pyx_7genexpr__pyx_v_i + 2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1042, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1042, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_v_hex_array = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1043
 *     hex_str = "%016x" % (num)
 *     hex_array = [hex_str[i:i+2] for i in range(0, len(hex_str), 2)]
 *     hex_array = [''.join(x) for x in zip(hex_array[0::2], hex_array[1::2])]             # <<<<<<<<<<<<<<
 *     return ':'.join(hex_array)
 * 
*/
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_hex_array, __pyx_mstate_global->__pyx_slice[0]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1043, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_hex_array, __pyx_mstate_global->__pyx_slice[1]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1043, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__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;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1043, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1043, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1043, __pyx_L7_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1043, __pyx_L7_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1043, __pyx_L7_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_3));
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1043, __pyx_L7_error)
      } else {
        __pyx_t_6 = __pyx_t_11(__pyx_t_9);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1043, __pyx_L7_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__3, __pyx_8genexpr1__pyx_v_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1043, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1043, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_hex_array, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1044
 *     hex_array = [hex_str[i:i+2] for i in range(0, len(hex_str), 2)]
 *     hex_array = [''.join(x) for x in zip(hex_array[0::2], hex_array[1::2])]
 *     return ':'.join(hex_array)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__6, __pyx_v_hex_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1034
 * 
 * 
 * def guid_format(num):             # <<<<<<<<<<<<<<
 *     """
 *     Get GUID representation of the given number, including change of endianness.
*/

  /* function exit code */
  __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_AddTraceback("pyverbs.device.guid_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hex_str);
  __Pyx_XDECREF(__pyx_v_hex_array);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1047
 * 
 * 
 * def translate_transport_type(transport_type):             # <<<<<<<<<<<<<<
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_5translate_transport_type(PyObject *__pyx_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_7pyverbs_6device_5translate_transport_type = {"translate_transport_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_5translate_transport_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_5translate_transport_type(PyObject *__pyx_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_transport_type = 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("translate_transport_type (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_transport_type,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, 1047, __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, 1047, __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, "translate_transport_type", 0) < (0)) __PYX_ERR(0, 1047, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_transport_type", 1, 1, 1, i); __PYX_ERR(0, 1047, __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, 1047, __pyx_L3_error)
    }
    __pyx_v_transport_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_transport_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1047, __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("pyverbs.device.translate_transport_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_4translate_transport_type(__pyx_self, __pyx_v_transport_type);

  /* 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_7pyverbs_6device_4translate_transport_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transport_type) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("translate_transport_type", 0);

  /* "pyverbs/device.pyx":1048
 * 
 * def translate_transport_type(transport_type):
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}             # <<<<<<<<<<<<<<
 *     try:
 *         return l[transport_type]
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_n_u_IB) < (0)) __PYX_ERR(0, 1048, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_n_u_IWARP) < (0)) __PYX_ERR(0, 1048, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_n_u_USNIC) < (0)) __PYX_ERR(0, 1048, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_kp_u_USNIC_UDP) < (0)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1049
 * def translate_transport_type(transport_type):
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[transport_type]
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1050
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:
 *         return l[transport_type]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Unknown'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_transport_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1049
 * def translate_transport_type(transport_type):
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[transport_type]
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":1051
 *     try:
 *         return l[transport_type]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Unknown'
 * 
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyverbs/device.pyx":1052
 *         return l[transport_type]
 *     except KeyError:
 *         return 'Unknown'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Unknown);
      __pyx_r = __pyx_mstate_global->__pyx_n_u_Unknown;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1049
 * def translate_transport_type(transport_type):
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[transport_type]
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1047
 * 
 * 
 * def translate_transport_type(transport_type):             # <<<<<<<<<<<<<<
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.translate_transport_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1055
 * 
 * 
 * def translate_node_type(node_type):             # <<<<<<<<<<<<<<
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',
 *          6: 'USNIC UDP'}
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_7translate_node_type(PyObject *__pyx_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_7pyverbs_6device_7translate_node_type = {"translate_node_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7translate_node_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_7translate_node_type(PyObject *__pyx_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_node_type = 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("translate_node_type (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_node_type,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, 1055, __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, 1055, __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, "translate_node_type", 0) < (0)) __PYX_ERR(0, 1055, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_node_type", 1, 1, 1, i); __PYX_ERR(0, 1055, __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, 1055, __pyx_L3_error)
    }
    __pyx_v_node_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_node_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1055, __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("pyverbs.device.translate_node_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_6translate_node_type(__pyx_self, __pyx_v_node_type);

  /* 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_7pyverbs_6device_6translate_node_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node_type) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("translate_node_type", 0);

  /* "pyverbs/device.pyx":1056
 * 
 * def translate_node_type(node_type):
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',             # <<<<<<<<<<<<<<
 *          6: 'USNIC UDP'}
 *     try:
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_n_u_CA) < (0)) __PYX_ERR(0, 1056, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_n_u_Switch) < (0)) __PYX_ERR(0, 1056, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_n_u_Router) < (0)) __PYX_ERR(0, 1056, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_n_u_RNIC) < (0)) __PYX_ERR(0, 1056, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_n_u_USNIC) < (0)) __PYX_ERR(0, 1056, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_6, __pyx_mstate_global->__pyx_kp_u_USNIC_UDP) < (0)) __PYX_ERR(0, 1056, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1058
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',
 *          6: 'USNIC UDP'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[node_type]
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1059
 *          6: 'USNIC UDP'}
 *     try:
 *         return l[node_type]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Unknown'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_node_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1058
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',
 *          6: 'USNIC UDP'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[node_type]
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":1060
 *     try:
 *         return l[node_type]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Unknown'
 * 
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyverbs/device.pyx":1061
 *         return l[node_type]
 *     except KeyError:
 *         return 'Unknown'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Unknown);
      __pyx_r = __pyx_mstate_global->__pyx_n_u_Unknown;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1058
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',
 *          6: 'USNIC UDP'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[node_type]
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1055
 * 
 * 
 * def translate_node_type(node_type):             # <<<<<<<<<<<<<<
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',
 *          6: 'USNIC UDP'}
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.translate_node_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1064
 * 
 * 
 * def guid_to_hex(node_guid):             # <<<<<<<<<<<<<<
 *     return hex(node_guid).replace('L', '').replace('0x', '')
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_9guid_to_hex(PyObject *__pyx_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_7pyverbs_6device_9guid_to_hex = {"guid_to_hex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_9guid_to_hex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_9guid_to_hex(PyObject *__pyx_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_node_guid = 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("guid_to_hex (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_node_guid,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  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, "guid_to_hex", 0) < (0)) __PYX_ERR(0, 1064, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("guid_to_hex", 1, 1, 1, i); __PYX_ERR(0, 1064, __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, 1064, __pyx_L3_error)
    }
    __pyx_v_node_guid = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("guid_to_hex", 1, 1, 1, __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("pyverbs.device.guid_to_hex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_8guid_to_hex(__pyx_self, __pyx_v_node_guid);

  /* 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_7pyverbs_6device_8guid_to_hex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node_guid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("guid_to_hex", 0);

  /* "pyverbs/device.pyx":1065
 * 
 * def guid_to_hex(node_guid):
 *     return hex(node_guid).replace('L', '').replace('0x', '')             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Hex(__pyx_v_node_guid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "replace");
    __PYX_ERR(0, 1065, __pyx_L1_error)
  }
  __pyx_t_2 = PyUnicode_Replace(((PyObject*)__pyx_t_1), __pyx_mstate_global->__pyx_n_u_L, __pyx_mstate_global->__pyx_kp_u__3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyUnicode_Replace(((PyObject*)__pyx_t_2), __pyx_mstate_global->__pyx_kp_u_0x, __pyx_mstate_global->__pyx_kp_u__3, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1064
 * 
 * 
 * def guid_to_hex(node_guid):             # <<<<<<<<<<<<<<
 *     return hex(node_guid).replace('L', '').replace('0x', '')
 * 
*/

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

/* "pyverbs/device.pyx":1068
 * 
 * 
 * def port_state_to_str(port_state):             # <<<<<<<<<<<<<<
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_11port_state_to_str(PyObject *__pyx_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_7pyverbs_6device_11port_state_to_str = {"port_state_to_str", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_11port_state_to_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_11port_state_to_str(PyObject *__pyx_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_port_state = 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("port_state_to_str (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_port_state,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, 1068, __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, 1068, __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, "port_state_to_str", 0) < (0)) __PYX_ERR(0, 1068, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("port_state_to_str", 1, 1, 1, i); __PYX_ERR(0, 1068, __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, 1068, __pyx_L3_error)
    }
    __pyx_v_port_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("port_state_to_str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1068, __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("pyverbs.device.port_state_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_10port_state_to_str(__pyx_self, __pyx_v_port_state);

  /* 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_7pyverbs_6device_10port_state_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_port_state) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("port_state_to_str", 0);

  /* "pyverbs/device.pyx":1069
 * 
 * def port_state_to_str(port_state):
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}             # <<<<<<<<<<<<<<
 *     try:
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_n_u_NOP) < (0)) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_n_u_Down) < (0)) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_n_u_Init) < (0)) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_n_u_Armed) < (0)) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_n_u_Active) < (0)) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_n_u_Defer) < (0)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1070
 * def port_state_to_str(port_state):
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1071
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Invalid state ({s})'.format(s=port_state)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_s_n;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_port_state); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1071, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1071, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_s, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1071, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_n, __pyx_v_port_state, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1071, __pyx_L3_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1070
 * def port_state_to_str(port_state):
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;

    /* "pyverbs/device.pyx":1072
 *     try:
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Invalid state ({s})'.format(s=port_state)
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("pyverbs.device.port_state_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 1072, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);

      /* "pyverbs/device.pyx":1073
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)
 *     except KeyError:
 *         return 'Invalid state ({s})'.format(s=port_state)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __pyx_mstate_global->__pyx_kp_u_Invalid_state_s;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, NULL};
        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1073, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_s, __pyx_v_port_state, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1073, __pyx_L5_except_error)
        __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1073, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1070
 * def port_state_to_str(port_state):
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[port_state], n=port_state)
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1068
 * 
 * 
 * def port_state_to_str(port_state):             # <<<<<<<<<<<<<<
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:
*/

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyverbs.device.port_state_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1076
 * 
 * 
 * def translate_mtu(mtu):             # <<<<<<<<<<<<<<
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_13translate_mtu(PyObject *__pyx_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_7pyverbs_6device_13translate_mtu = {"translate_mtu", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_13translate_mtu, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_13translate_mtu(PyObject *__pyx_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_mtu = 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("translate_mtu (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_mtu,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, 1076, __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, 1076, __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, "translate_mtu", 0) < (0)) __PYX_ERR(0, 1076, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_mtu", 1, 1, 1, i); __PYX_ERR(0, 1076, __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, 1076, __pyx_L3_error)
    }
    __pyx_v_mtu = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_mtu", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1076, __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("pyverbs.device.translate_mtu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_12translate_mtu(__pyx_self, __pyx_v_mtu);

  /* 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_7pyverbs_6device_12translate_mtu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mtu) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("translate_mtu", 0);

  /* "pyverbs/device.pyx":1077
 * 
 * def translate_mtu(mtu):
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}             # <<<<<<<<<<<<<<
 *     try:
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_256) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_512) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_1024) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_2048) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_4096) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1078
 * def translate_mtu(mtu):
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1079
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Invalid MTU ({m})'.format(m=mtu)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_s_n;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_mtu); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1079, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_s, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1079, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_n, __pyx_v_mtu, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1079, __pyx_L3_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1078
 * def translate_mtu(mtu):
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;

    /* "pyverbs/device.pyx":1080
 *     try:
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Invalid MTU ({m})'.format(m=mtu)
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("pyverbs.device.translate_mtu", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 1080, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);

      /* "pyverbs/device.pyx":1081
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)
 *     except KeyError:
 *         return 'Invalid MTU ({m})'.format(m=mtu)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __pyx_mstate_global->__pyx_kp_u_Invalid_MTU_m;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, NULL};
        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1081, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_m, __pyx_v_mtu, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1081, __pyx_L5_except_error)
        __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1078
 * def translate_mtu(mtu):
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[mtu], n=mtu)
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1076
 * 
 * 
 * def translate_mtu(mtu):             # <<<<<<<<<<<<<<
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:
*/

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyverbs.device.translate_mtu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1084
 * 
 * 
 * def translate_link_layer(ll):             # <<<<<<<<<<<<<<
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_15translate_link_layer(PyObject *__pyx_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_7pyverbs_6device_15translate_link_layer = {"translate_link_layer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_15translate_link_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_15translate_link_layer(PyObject *__pyx_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_ll = 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("translate_link_layer (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_ll,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, 1084, __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, 1084, __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, "translate_link_layer", 0) < (0)) __PYX_ERR(0, 1084, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_link_layer", 1, 1, 1, i); __PYX_ERR(0, 1084, __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, 1084, __pyx_L3_error)
    }
    __pyx_v_ll = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_link_layer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1084, __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("pyverbs.device.translate_link_layer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_14translate_link_layer(__pyx_self, __pyx_v_ll);

  /* 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_7pyverbs_6device_14translate_link_layer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ll) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("translate_link_layer", 0);

  /* "pyverbs/device.pyx":1085
 * 
 * def translate_link_layer(ll):
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}             # <<<<<<<<<<<<<<
 *     try:
 *         return l[ll]
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_n_u_Unspecified) < (0)) __PYX_ERR(0, 1085, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_n_u_InfiniBand) < (0)) __PYX_ERR(0, 1085, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_n_u_Ethernet) < (0)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1086
 * def translate_link_layer(ll):
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[ll]
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1087
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:
 *         return l[ll]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Invalid link layer ({ll})'.format(ll=ll)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_ll); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1086
 * def translate_link_layer(ll):
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[ll]
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyverbs/device.pyx":1088
 *     try:
 *         return l[ll]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Invalid link layer ({ll})'.format(ll=ll)
 * 
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pyverbs.device.translate_link_layer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1088, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "pyverbs/device.pyx":1089
 *         return l[ll]
 *     except KeyError:
 *         return 'Invalid link layer ({ll})'.format(ll=ll)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_Invalid_link_layer_ll;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, NULL};
        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1089, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ll, __pyx_v_ll, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1089, __pyx_L5_except_error)
        __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1089, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1086
 * def translate_link_layer(ll):
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:             # <<<<<<<<<<<<<<
 *         return l[ll]
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1084
 * 
 * 
 * def translate_link_layer(ll):             # <<<<<<<<<<<<<<
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyverbs.device.translate_link_layer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1092
 * 
 * 
 * def translate_port_cap_flags(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_PORT_SM: 'IBV_PORT_SM',
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_17translate_port_cap_flags(PyObject *__pyx_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_7pyverbs_6device_17translate_port_cap_flags = {"translate_port_cap_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_17translate_port_cap_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_17translate_port_cap_flags(PyObject *__pyx_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_flags = 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("translate_port_cap_flags (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_flags,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, 1092, __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, 1092, __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, "translate_port_cap_flags", 0) < (0)) __PYX_ERR(0, 1092, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_port_cap_flags", 1, 1, 1, i); __PYX_ERR(0, 1092, __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, 1092, __pyx_L3_error)
    }
    __pyx_v_flags = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_port_cap_flags", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1092, __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("pyverbs.device.translate_port_cap_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_16translate_port_cap_flags(__pyx_self, __pyx_v_flags);

  /* 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_7pyverbs_6device_16translate_port_cap_flags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  PyObject *__pyx_v_l = NULL;
  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("translate_port_cap_flags", 0);

  /* "pyverbs/device.pyx":1093
 * 
 * def translate_port_cap_flags(flags):
 *     l = {e.IBV_PORT_SM: 'IBV_PORT_SM',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',
 *          e.IBV_PORT_TRAP_SUP: 'IBV_PORT_TRAP_SUP',
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_SM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SM) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1094
 * def translate_port_cap_flags(flags):
 *     l = {e.IBV_PORT_SM: 'IBV_PORT_SM',
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_TRAP_SUP: 'IBV_PORT_TRAP_SUP',
 *          e.IBV_PORT_OPT_IPD_SUP: 'IBV_PORT_OPT_IPD_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_NOTICE_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_NOTICE_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1095
 *     l = {e.IBV_PORT_SM: 'IBV_PORT_SM',
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',
 *          e.IBV_PORT_TRAP_SUP: 'IBV_PORT_TRAP_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_OPT_IPD_SUP: 'IBV_PORT_OPT_IPD_SUP',
 *          e.IBV_PORT_AUTO_MIGR_SUP: 'IBV_PORT_AUTO_MIGR_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_TRAP_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_TRAP_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1096
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',
 *          e.IBV_PORT_TRAP_SUP: 'IBV_PORT_TRAP_SUP',
 *          e.IBV_PORT_OPT_IPD_SUP: 'IBV_PORT_OPT_IPD_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_AUTO_MIGR_SUP: 'IBV_PORT_AUTO_MIGR_SUP',
 *          e.IBV_PORT_SL_MAP_SUP: 'IBV_PORT_SL_MAP_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_OPT_IPD_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_OPT_IPD_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1097
 *          e.IBV_PORT_TRAP_SUP: 'IBV_PORT_TRAP_SUP',
 *          e.IBV_PORT_OPT_IPD_SUP: 'IBV_PORT_OPT_IPD_SUP',
 *          e.IBV_PORT_AUTO_MIGR_SUP: 'IBV_PORT_AUTO_MIGR_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_SL_MAP_SUP: 'IBV_PORT_SL_MAP_SUP',
 *          e.IBV_PORT_MKEY_NVRAM: 'IBV_PORT_MKEY_NVRAM',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_AUTO_MIGR_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_AUTO_MIGR_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1098
 *          e.IBV_PORT_OPT_IPD_SUP: 'IBV_PORT_OPT_IPD_SUP',
 *          e.IBV_PORT_AUTO_MIGR_SUP: 'IBV_PORT_AUTO_MIGR_SUP',
 *          e.IBV_PORT_SL_MAP_SUP: 'IBV_PORT_SL_MAP_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_MKEY_NVRAM: 'IBV_PORT_MKEY_NVRAM',
 *          e.IBV_PORT_PKEY_NVRAM: 'IBV_PORT_PKEY_NVRAM',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_SL_MAP_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SL_MAP_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1099
 *          e.IBV_PORT_AUTO_MIGR_SUP: 'IBV_PORT_AUTO_MIGR_SUP',
 *          e.IBV_PORT_SL_MAP_SUP: 'IBV_PORT_SL_MAP_SUP',
 *          e.IBV_PORT_MKEY_NVRAM: 'IBV_PORT_MKEY_NVRAM',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_PKEY_NVRAM: 'IBV_PORT_PKEY_NVRAM',
 *          e.IBV_PORT_LED_INFO_SUP: 'IBV_PORT_LED_INFO_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_MKEY_NVRAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_MKEY_NVRAM) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1100
 *          e.IBV_PORT_SL_MAP_SUP: 'IBV_PORT_SL_MAP_SUP',
 *          e.IBV_PORT_MKEY_NVRAM: 'IBV_PORT_MKEY_NVRAM',
 *          e.IBV_PORT_PKEY_NVRAM: 'IBV_PORT_PKEY_NVRAM',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_LED_INFO_SUP: 'IBV_PORT_LED_INFO_SUP',
 *          e.IBV_PORT_SYS_IMAGE_GUID_SUP: 'IBV_PORT_SYS_IMAGE_GUID_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_PKEY_NVRAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_PKEY_NVRAM) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1101
 *          e.IBV_PORT_MKEY_NVRAM: 'IBV_PORT_MKEY_NVRAM',
 *          e.IBV_PORT_PKEY_NVRAM: 'IBV_PORT_PKEY_NVRAM',
 *          e.IBV_PORT_LED_INFO_SUP: 'IBV_PORT_LED_INFO_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_SYS_IMAGE_GUID_SUP: 'IBV_PORT_SYS_IMAGE_GUID_SUP',
 *          e.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP: 'IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_LED_INFO_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LED_INFO_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1102
 *          e.IBV_PORT_PKEY_NVRAM: 'IBV_PORT_PKEY_NVRAM',
 *          e.IBV_PORT_LED_INFO_SUP: 'IBV_PORT_LED_INFO_SUP',
 *          e.IBV_PORT_SYS_IMAGE_GUID_SUP: 'IBV_PORT_SYS_IMAGE_GUID_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP: 'IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP',
 *          e.IBV_PORT_EXTENDED_SPEEDS_SUP: 'IBV_PORT_EXTENDED_SPEEDS_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_SYS_IMAGE_GUID_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SYS_IMAGE_GUID_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1103
 *          e.IBV_PORT_LED_INFO_SUP: 'IBV_PORT_LED_INFO_SUP',
 *          e.IBV_PORT_SYS_IMAGE_GUID_SUP: 'IBV_PORT_SYS_IMAGE_GUID_SUP',
 *          e.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP: 'IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_EXTENDED_SPEEDS_SUP: 'IBV_PORT_EXTENDED_SPEEDS_SUP',
 *          e.IBV_PORT_CAP_MASK2_SUP: 'IBV_PORT_CAP_MASK2_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_PKEY_SW_EXT_PORT_TRAP_S) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1104
 *          e.IBV_PORT_SYS_IMAGE_GUID_SUP: 'IBV_PORT_SYS_IMAGE_GUID_SUP',
 *          e.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP: 'IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP',
 *          e.IBV_PORT_EXTENDED_SPEEDS_SUP: 'IBV_PORT_EXTENDED_SPEEDS_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_CAP_MASK2_SUP: 'IBV_PORT_CAP_MASK2_SUP',
 *          e.IBV_PORT_CM_SUP: 'IBV_PORT_CM_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_EXTENDED_SPEEDS_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_EXTENDED_SPEEDS_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1105
 *          e.IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP: 'IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP',
 *          e.IBV_PORT_EXTENDED_SPEEDS_SUP: 'IBV_PORT_EXTENDED_SPEEDS_SUP',
 *          e.IBV_PORT_CAP_MASK2_SUP: 'IBV_PORT_CAP_MASK2_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_CM_SUP: 'IBV_PORT_CM_SUP',
 *          e.IBV_PORT_SNMP_TUNNEL_SUP: 'IBV_PORT_SNMP_TUNNEL_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_CAP_MASK2_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CAP_MASK2_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1106
 *          e.IBV_PORT_EXTENDED_SPEEDS_SUP: 'IBV_PORT_EXTENDED_SPEEDS_SUP',
 *          e.IBV_PORT_CAP_MASK2_SUP: 'IBV_PORT_CAP_MASK2_SUP',
 *          e.IBV_PORT_CM_SUP: 'IBV_PORT_CM_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_SNMP_TUNNEL_SUP: 'IBV_PORT_SNMP_TUNNEL_SUP',
 *          e.IBV_PORT_REINIT_SUP: 'IBV_PORT_REINIT_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_CM_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CM_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1107
 *          e.IBV_PORT_CAP_MASK2_SUP: 'IBV_PORT_CAP_MASK2_SUP',
 *          e.IBV_PORT_CM_SUP: 'IBV_PORT_CM_SUP',
 *          e.IBV_PORT_SNMP_TUNNEL_SUP: 'IBV_PORT_SNMP_TUNNEL_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_REINIT_SUP: 'IBV_PORT_REINIT_SUP',
 *          e.IBV_PORT_DEVICE_MGMT_SUP: 'IBV_PORT_DEVICE_MGMT_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_SNMP_TUNNEL_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SNMP_TUNNEL_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1108
 *          e.IBV_PORT_CM_SUP: 'IBV_PORT_CM_SUP',
 *          e.IBV_PORT_SNMP_TUNNEL_SUP: 'IBV_PORT_SNMP_TUNNEL_SUP',
 *          e.IBV_PORT_REINIT_SUP: 'IBV_PORT_REINIT_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_DEVICE_MGMT_SUP: 'IBV_PORT_DEVICE_MGMT_SUP',
 *          e.IBV_PORT_VENDOR_CLASS_SUP: 'IBV_PORT_VENDOR_CLASS_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_REINIT_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_REINIT_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1109
 *          e.IBV_PORT_SNMP_TUNNEL_SUP: 'IBV_PORT_SNMP_TUNNEL_SUP',
 *          e.IBV_PORT_REINIT_SUP: 'IBV_PORT_REINIT_SUP',
 *          e.IBV_PORT_DEVICE_MGMT_SUP: 'IBV_PORT_DEVICE_MGMT_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_VENDOR_CLASS_SUP: 'IBV_PORT_VENDOR_CLASS_SUP',
 *          e.IBV_PORT_DR_NOTICE_SUP: 'IBV_PORT_DR_NOTICE_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_DEVICE_MGMT_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_DEVICE_MGMT_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1110
 *          e.IBV_PORT_REINIT_SUP: 'IBV_PORT_REINIT_SUP',
 *          e.IBV_PORT_DEVICE_MGMT_SUP: 'IBV_PORT_DEVICE_MGMT_SUP',
 *          e.IBV_PORT_VENDOR_CLASS_SUP: 'IBV_PORT_VENDOR_CLASS_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_DR_NOTICE_SUP: 'IBV_PORT_DR_NOTICE_SUP',
 *          e.IBV_PORT_CAP_MASK_NOTICE_SUP: 'IBV_PORT_CAP_MASK_NOTICE_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_VENDOR_CLASS_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_VENDOR_CLASS_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1111
 *          e.IBV_PORT_DEVICE_MGMT_SUP: 'IBV_PORT_DEVICE_MGMT_SUP',
 *          e.IBV_PORT_VENDOR_CLASS_SUP: 'IBV_PORT_VENDOR_CLASS_SUP',
 *          e.IBV_PORT_DR_NOTICE_SUP: 'IBV_PORT_DR_NOTICE_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_CAP_MASK_NOTICE_SUP: 'IBV_PORT_CAP_MASK_NOTICE_SUP',
 *          e.IBV_PORT_BOOT_MGMT_SUP: 'IBV_PORT_BOOT_MGMT_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_DR_NOTICE_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_DR_NOTICE_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1112
 *          e.IBV_PORT_VENDOR_CLASS_SUP: 'IBV_PORT_VENDOR_CLASS_SUP',
 *          e.IBV_PORT_DR_NOTICE_SUP: 'IBV_PORT_DR_NOTICE_SUP',
 *          e.IBV_PORT_CAP_MASK_NOTICE_SUP: 'IBV_PORT_CAP_MASK_NOTICE_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_BOOT_MGMT_SUP: 'IBV_PORT_BOOT_MGMT_SUP',
 *          e.IBV_PORT_LINK_LATENCY_SUP: 'IBV_PORT_LINK_LATENCY_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_CAP_MASK_NOTICE_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CAP_MASK_NOTICE_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1113
 *          e.IBV_PORT_DR_NOTICE_SUP: 'IBV_PORT_DR_NOTICE_SUP',
 *          e.IBV_PORT_CAP_MASK_NOTICE_SUP: 'IBV_PORT_CAP_MASK_NOTICE_SUP',
 *          e.IBV_PORT_BOOT_MGMT_SUP: 'IBV_PORT_BOOT_MGMT_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_LINK_LATENCY_SUP: 'IBV_PORT_LINK_LATENCY_SUP',
 *          e.IBV_PORT_CLIENT_REG_SUP: 'IBV_PORT_CLIENT_REG_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_BOOT_MGMT_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_BOOT_MGMT_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1114
 *          e.IBV_PORT_CAP_MASK_NOTICE_SUP: 'IBV_PORT_CAP_MASK_NOTICE_SUP',
 *          e.IBV_PORT_BOOT_MGMT_SUP: 'IBV_PORT_BOOT_MGMT_SUP',
 *          e.IBV_PORT_LINK_LATENCY_SUP: 'IBV_PORT_LINK_LATENCY_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_CLIENT_REG_SUP: 'IBV_PORT_CLIENT_REG_SUP',
 *          e.IBV_PORT_IP_BASED_GIDS: 'IBV_PORT_IP_BASED_GIDS'}
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_LINK_LATENCY_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_LATENCY_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1115
 *          e.IBV_PORT_BOOT_MGMT_SUP: 'IBV_PORT_BOOT_MGMT_SUP',
 *          e.IBV_PORT_LINK_LATENCY_SUP: 'IBV_PORT_LINK_LATENCY_SUP',
 *          e.IBV_PORT_CLIENT_REG_SUP: 'IBV_PORT_CLIENT_REG_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_IP_BASED_GIDS: 'IBV_PORT_IP_BASED_GIDS'}
 *     return str_from_flags(flags, l)
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_CLIENT_REG_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_CLIENT_REG_SUP) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1116
 *          e.IBV_PORT_LINK_LATENCY_SUP: 'IBV_PORT_LINK_LATENCY_SUP',
 *          e.IBV_PORT_CLIENT_REG_SUP: 'IBV_PORT_CLIENT_REG_SUP',
 *          e.IBV_PORT_IP_BASED_GIDS: 'IBV_PORT_IP_BASED_GIDS'}             # <<<<<<<<<<<<<<
 *     return str_from_flags(flags, l)
 * 
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py(IBV_PORT_IP_BASED_GIDS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_IP_BASED_GIDS) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1117
 *          e.IBV_PORT_CLIENT_REG_SUP: 'IBV_PORT_CLIENT_REG_SUP',
 *          e.IBV_PORT_IP_BASED_GIDS: 'IBV_PORT_IP_BASED_GIDS'}
 *     return str_from_flags(flags, l)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1117, __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[3] = {__pyx_t_2, __pyx_v_flags, __pyx_v_l};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__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, 1117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1092
 * 
 * 
 * def translate_port_cap_flags(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_PORT_SM: 'IBV_PORT_SM',
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyverbs.device.translate_port_cap_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1120
 * 
 * 
 * def translate_port_cap_flags2(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_PORT_SET_NODE_DESC_SUP: 'IBV_PORT_SET_NODE_DESC_SUP',
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_19translate_port_cap_flags2(PyObject *__pyx_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_7pyverbs_6device_19translate_port_cap_flags2 = {"translate_port_cap_flags2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_19translate_port_cap_flags2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_19translate_port_cap_flags2(PyObject *__pyx_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_flags = 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("translate_port_cap_flags2 (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_flags,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, 1120, __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, 1120, __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, "translate_port_cap_flags2", 0) < (0)) __PYX_ERR(0, 1120, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_port_cap_flags2", 1, 1, 1, i); __PYX_ERR(0, 1120, __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, 1120, __pyx_L3_error)
    }
    __pyx_v_flags = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_port_cap_flags2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1120, __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("pyverbs.device.translate_port_cap_flags2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_18translate_port_cap_flags2(__pyx_self, __pyx_v_flags);

  /* 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_7pyverbs_6device_18translate_port_cap_flags2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  PyObject *__pyx_v_l = NULL;
  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("translate_port_cap_flags2", 0);

  /* "pyverbs/device.pyx":1121
 * 
 * def translate_port_cap_flags2(flags):
 *     l = {e.IBV_PORT_SET_NODE_DESC_SUP: 'IBV_PORT_SET_NODE_DESC_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',
 *          e.IBV_PORT_VIRT_SUP: 'IBV_PORT_VIRT_SUP',
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_SET_NODE_DESC_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SET_NODE_DESC_SUP) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1122
 * def translate_port_cap_flags2(flags):
 *     l = {e.IBV_PORT_SET_NODE_DESC_SUP: 'IBV_PORT_SET_NODE_DESC_SUP',
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_VIRT_SUP: 'IBV_PORT_VIRT_SUP',
 *          e.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP: 'IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_INFO_EXT_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_INFO_EXT_SUP) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1123
 *     l = {e.IBV_PORT_SET_NODE_DESC_SUP: 'IBV_PORT_SET_NODE_DESC_SUP',
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',
 *          e.IBV_PORT_VIRT_SUP: 'IBV_PORT_VIRT_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP: 'IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP',
 *          e.IBV_PORT_LINK_WIDTH_2X_SUP: 'IBV_PORT_LINK_WIDTH_2X_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_VIRT_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_VIRT_SUP) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1124
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',
 *          e.IBV_PORT_VIRT_SUP: 'IBV_PORT_VIRT_SUP',
 *          e.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP: 'IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_LINK_WIDTH_2X_SUP: 'IBV_PORT_LINK_WIDTH_2X_SUP',
 *          e.IBV_PORT_LINK_SPEED_HDR_SUP: 'IBV_PORT_LINK_SPEED_HDR_SUP',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_SWITCH_PORT_STATE_TABLE) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1125
 *          e.IBV_PORT_VIRT_SUP: 'IBV_PORT_VIRT_SUP',
 *          e.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP: 'IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP',
 *          e.IBV_PORT_LINK_WIDTH_2X_SUP: 'IBV_PORT_LINK_WIDTH_2X_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_LINK_SPEED_HDR_SUP: 'IBV_PORT_LINK_SPEED_HDR_SUP',
 *          e.IBV_PORT_LINK_SPEED_NDR_SUP: 'IBV_PORT_LINK_SPEED_NDR_SUP'}
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_LINK_WIDTH_2X_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_WIDTH_2X_SUP) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1126
 *          e.IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP: 'IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP',
 *          e.IBV_PORT_LINK_WIDTH_2X_SUP: 'IBV_PORT_LINK_WIDTH_2X_SUP',
 *          e.IBV_PORT_LINK_SPEED_HDR_SUP: 'IBV_PORT_LINK_SPEED_HDR_SUP',             # <<<<<<<<<<<<<<
 *          e.IBV_PORT_LINK_SPEED_NDR_SUP: 'IBV_PORT_LINK_SPEED_NDR_SUP'}
 *     return str_from_flags(flags, l)
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_LINK_SPEED_HDR_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_SPEED_HDR_SUP) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1127
 *          e.IBV_PORT_LINK_WIDTH_2X_SUP: 'IBV_PORT_LINK_WIDTH_2X_SUP',
 *          e.IBV_PORT_LINK_SPEED_HDR_SUP: 'IBV_PORT_LINK_SPEED_HDR_SUP',
 *          e.IBV_PORT_LINK_SPEED_NDR_SUP: 'IBV_PORT_LINK_SPEED_NDR_SUP'}             # <<<<<<<<<<<<<<
 *     return str_from_flags(flags, l)
 * 
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(IBV_PORT_LINK_SPEED_NDR_SUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_PORT_LINK_SPEED_NDR_SUP) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1128
 *          e.IBV_PORT_LINK_SPEED_HDR_SUP: 'IBV_PORT_LINK_SPEED_HDR_SUP',
 *          e.IBV_PORT_LINK_SPEED_NDR_SUP: 'IBV_PORT_LINK_SPEED_NDR_SUP'}
 *     return str_from_flags(flags, l)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __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[3] = {__pyx_t_2, __pyx_v_flags, __pyx_v_l};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__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, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1120
 * 
 * 
 * def translate_port_cap_flags2(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_PORT_SET_NODE_DESC_SUP: 'IBV_PORT_SET_NODE_DESC_SUP',
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyverbs.device.translate_port_cap_flags2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1131
 * 
 * 
 * def translate_device_caps(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_DEVICE_RESIZE_MAX_WR: 'IBV_DEVICE_RESIZE_MAX_WR',
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_21translate_device_caps(PyObject *__pyx_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_7pyverbs_6device_21translate_device_caps = {"translate_device_caps", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_21translate_device_caps, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_21translate_device_caps(PyObject *__pyx_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_flags = 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("translate_device_caps (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_flags,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, 1131, __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, 1131, __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, "translate_device_caps", 0) < (0)) __PYX_ERR(0, 1131, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_device_caps", 1, 1, 1, i); __PYX_ERR(0, 1131, __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, 1131, __pyx_L3_error)
    }
    __pyx_v_flags = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_device_caps", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1131, __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("pyverbs.device.translate_device_caps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_20translate_device_caps(__pyx_self, __pyx_v_flags);

  /* 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_7pyverbs_6device_20translate_device_caps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  PyObject *__pyx_v_l = NULL;
  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("translate_device_caps", 0);

  /* "pyverbs/device.pyx":1132
 * 
 * def translate_device_caps(flags):
 *     l = {e.IBV_DEVICE_RESIZE_MAX_WR: 'IBV_DEVICE_RESIZE_MAX_WR',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',
 *          e.IBV_DEVICE_BAD_QKEY_CNTR: 'IBV_DEVICE_BAD_QKEY_CNTR',
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_RESIZE_MAX_WR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RESIZE_MAX_WR) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1133
 * def translate_device_caps(flags):
 *     l = {e.IBV_DEVICE_RESIZE_MAX_WR: 'IBV_DEVICE_RESIZE_MAX_WR',
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_BAD_QKEY_CNTR: 'IBV_DEVICE_BAD_QKEY_CNTR',
 *          e.IBV_DEVICE_RAW_MULTI: 'IBV_DEVICE_RAW_MULTI',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_BAD_PKEY_CNTR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_BAD_PKEY_CNTR) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1134
 *     l = {e.IBV_DEVICE_RESIZE_MAX_WR: 'IBV_DEVICE_RESIZE_MAX_WR',
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',
 *          e.IBV_DEVICE_BAD_QKEY_CNTR: 'IBV_DEVICE_BAD_QKEY_CNTR',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_RAW_MULTI: 'IBV_DEVICE_RAW_MULTI',
 *          e.IBV_DEVICE_AUTO_PATH_MIG: 'IBV_DEVICE_AUTO_PATH_MIG',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_BAD_QKEY_CNTR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_BAD_QKEY_CNTR) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1135
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',
 *          e.IBV_DEVICE_BAD_QKEY_CNTR: 'IBV_DEVICE_BAD_QKEY_CNTR',
 *          e.IBV_DEVICE_RAW_MULTI: 'IBV_DEVICE_RAW_MULTI',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_AUTO_PATH_MIG: 'IBV_DEVICE_AUTO_PATH_MIG',
 *          e.IBV_DEVICE_CHANGE_PHY_PORT: 'IBV_DEVICE_CHANGE_PHY_PORT',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_RAW_MULTI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RAW_MULTI) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1136
 *          e.IBV_DEVICE_BAD_QKEY_CNTR: 'IBV_DEVICE_BAD_QKEY_CNTR',
 *          e.IBV_DEVICE_RAW_MULTI: 'IBV_DEVICE_RAW_MULTI',
 *          e.IBV_DEVICE_AUTO_PATH_MIG: 'IBV_DEVICE_AUTO_PATH_MIG',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_CHANGE_PHY_PORT: 'IBV_DEVICE_CHANGE_PHY_PORT',
 *          e.IBV_DEVICE_UD_AV_PORT_ENFORCE: 'IBV_DEVICE_UD_AV_PORT_ENFORCE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_AUTO_PATH_MIG); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_AUTO_PATH_MIG) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1137
 *          e.IBV_DEVICE_RAW_MULTI: 'IBV_DEVICE_RAW_MULTI',
 *          e.IBV_DEVICE_AUTO_PATH_MIG: 'IBV_DEVICE_AUTO_PATH_MIG',
 *          e.IBV_DEVICE_CHANGE_PHY_PORT: 'IBV_DEVICE_CHANGE_PHY_PORT',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_UD_AV_PORT_ENFORCE: 'IBV_DEVICE_UD_AV_PORT_ENFORCE',
 *          e.IBV_DEVICE_CURR_QP_STATE_MOD: 'IBV_DEVICE_CURR_QP_STATE_MOD',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_CHANGE_PHY_PORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_CHANGE_PHY_PORT) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1138
 *          e.IBV_DEVICE_AUTO_PATH_MIG: 'IBV_DEVICE_AUTO_PATH_MIG',
 *          e.IBV_DEVICE_CHANGE_PHY_PORT: 'IBV_DEVICE_CHANGE_PHY_PORT',
 *          e.IBV_DEVICE_UD_AV_PORT_ENFORCE: 'IBV_DEVICE_UD_AV_PORT_ENFORCE',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_CURR_QP_STATE_MOD: 'IBV_DEVICE_CURR_QP_STATE_MOD',
 *          e.IBV_DEVICE_SHUTDOWN_PORT: 'IBV_DEVICE_SHUTDOWN_PORT',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_UD_AV_PORT_ENFORCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_UD_AV_PORT_ENFORCE) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1139
 *          e.IBV_DEVICE_CHANGE_PHY_PORT: 'IBV_DEVICE_CHANGE_PHY_PORT',
 *          e.IBV_DEVICE_UD_AV_PORT_ENFORCE: 'IBV_DEVICE_UD_AV_PORT_ENFORCE',
 *          e.IBV_DEVICE_CURR_QP_STATE_MOD: 'IBV_DEVICE_CURR_QP_STATE_MOD',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_SHUTDOWN_PORT: 'IBV_DEVICE_SHUTDOWN_PORT',
 *          e.IBV_DEVICE_INIT_TYPE: 'IBV_DEVICE_INIT_TYPE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_CURR_QP_STATE_MOD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_CURR_QP_STATE_MOD) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1140
 *          e.IBV_DEVICE_UD_AV_PORT_ENFORCE: 'IBV_DEVICE_UD_AV_PORT_ENFORCE',
 *          e.IBV_DEVICE_CURR_QP_STATE_MOD: 'IBV_DEVICE_CURR_QP_STATE_MOD',
 *          e.IBV_DEVICE_SHUTDOWN_PORT: 'IBV_DEVICE_SHUTDOWN_PORT',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_INIT_TYPE: 'IBV_DEVICE_INIT_TYPE',
 *          e.IBV_DEVICE_PORT_ACTIVE_EVENT: 'IBV_DEVICE_PORT_ACTIVE_EVENT',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_SHUTDOWN_PORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_SHUTDOWN_PORT) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1141
 *          e.IBV_DEVICE_CURR_QP_STATE_MOD: 'IBV_DEVICE_CURR_QP_STATE_MOD',
 *          e.IBV_DEVICE_SHUTDOWN_PORT: 'IBV_DEVICE_SHUTDOWN_PORT',
 *          e.IBV_DEVICE_INIT_TYPE: 'IBV_DEVICE_INIT_TYPE',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_PORT_ACTIVE_EVENT: 'IBV_DEVICE_PORT_ACTIVE_EVENT',
 *          e.IBV_DEVICE_SYS_IMAGE_GUID: 'IBV_DEVICE_SYS_IMAGE_GUID',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_INIT_TYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_INIT_TYPE) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1142
 *          e.IBV_DEVICE_SHUTDOWN_PORT: 'IBV_DEVICE_SHUTDOWN_PORT',
 *          e.IBV_DEVICE_INIT_TYPE: 'IBV_DEVICE_INIT_TYPE',
 *          e.IBV_DEVICE_PORT_ACTIVE_EVENT: 'IBV_DEVICE_PORT_ACTIVE_EVENT',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_SYS_IMAGE_GUID: 'IBV_DEVICE_SYS_IMAGE_GUID',
 *          e.IBV_DEVICE_RC_RNR_NAK_GEN: 'IBV_DEVICE_RC_RNR_NAK_GEN',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_PORT_ACTIVE_EVENT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_PORT_ACTIVE_EVENT) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1143
 *          e.IBV_DEVICE_INIT_TYPE: 'IBV_DEVICE_INIT_TYPE',
 *          e.IBV_DEVICE_PORT_ACTIVE_EVENT: 'IBV_DEVICE_PORT_ACTIVE_EVENT',
 *          e.IBV_DEVICE_SYS_IMAGE_GUID: 'IBV_DEVICE_SYS_IMAGE_GUID',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_RC_RNR_NAK_GEN: 'IBV_DEVICE_RC_RNR_NAK_GEN',
 *          e.IBV_DEVICE_SRQ_RESIZE: 'IBV_DEVICE_SRQ_RESIZE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_SYS_IMAGE_GUID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_SYS_IMAGE_GUID) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1144
 *          e.IBV_DEVICE_PORT_ACTIVE_EVENT: 'IBV_DEVICE_PORT_ACTIVE_EVENT',
 *          e.IBV_DEVICE_SYS_IMAGE_GUID: 'IBV_DEVICE_SYS_IMAGE_GUID',
 *          e.IBV_DEVICE_RC_RNR_NAK_GEN: 'IBV_DEVICE_RC_RNR_NAK_GEN',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_SRQ_RESIZE: 'IBV_DEVICE_SRQ_RESIZE',
 *          e.IBV_DEVICE_N_NOTIFY_CQ: 'IBV_DEVICE_N_NOTIFY_CQ',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_RC_RNR_NAK_GEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RC_RNR_NAK_GEN) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1145
 *          e.IBV_DEVICE_SYS_IMAGE_GUID: 'IBV_DEVICE_SYS_IMAGE_GUID',
 *          e.IBV_DEVICE_RC_RNR_NAK_GEN: 'IBV_DEVICE_RC_RNR_NAK_GEN',
 *          e.IBV_DEVICE_SRQ_RESIZE: 'IBV_DEVICE_SRQ_RESIZE',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_N_NOTIFY_CQ: 'IBV_DEVICE_N_NOTIFY_CQ',
 *          e.IBV_DEVICE_MEM_WINDOW: 'IBV_DEVICE_MEM_WINDOW',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_SRQ_RESIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_SRQ_RESIZE) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1146
 *          e.IBV_DEVICE_RC_RNR_NAK_GEN: 'IBV_DEVICE_RC_RNR_NAK_GEN',
 *          e.IBV_DEVICE_SRQ_RESIZE: 'IBV_DEVICE_SRQ_RESIZE',
 *          e.IBV_DEVICE_N_NOTIFY_CQ: 'IBV_DEVICE_N_NOTIFY_CQ',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_MEM_WINDOW: 'IBV_DEVICE_MEM_WINDOW',
 *          e.IBV_DEVICE_UD_IP_CSUM: 'IBV_DEVICE_UD_IP_CSUM',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_N_NOTIFY_CQ); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_N_NOTIFY_CQ) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1147
 *          e.IBV_DEVICE_SRQ_RESIZE: 'IBV_DEVICE_SRQ_RESIZE',
 *          e.IBV_DEVICE_N_NOTIFY_CQ: 'IBV_DEVICE_N_NOTIFY_CQ',
 *          e.IBV_DEVICE_MEM_WINDOW: 'IBV_DEVICE_MEM_WINDOW',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_UD_IP_CSUM: 'IBV_DEVICE_UD_IP_CSUM',
 *          e.IBV_DEVICE_XRC: 'IBV_DEVICE_XRC',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_MEM_WINDOW); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_WINDOW) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1148
 *          e.IBV_DEVICE_N_NOTIFY_CQ: 'IBV_DEVICE_N_NOTIFY_CQ',
 *          e.IBV_DEVICE_MEM_WINDOW: 'IBV_DEVICE_MEM_WINDOW',
 *          e.IBV_DEVICE_UD_IP_CSUM: 'IBV_DEVICE_UD_IP_CSUM',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_XRC: 'IBV_DEVICE_XRC',
 *          e.IBV_DEVICE_MEM_MGT_EXTENSIONS: 'IBV_DEVICE_MEM_MGT_EXTENSIONS',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_UD_IP_CSUM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_UD_IP_CSUM) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1149
 *          e.IBV_DEVICE_MEM_WINDOW: 'IBV_DEVICE_MEM_WINDOW',
 *          e.IBV_DEVICE_UD_IP_CSUM: 'IBV_DEVICE_UD_IP_CSUM',
 *          e.IBV_DEVICE_XRC: 'IBV_DEVICE_XRC',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_MEM_MGT_EXTENSIONS: 'IBV_DEVICE_MEM_MGT_EXTENSIONS',
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2A: 'IBV_DEVICE_MEM_WINDOW_TYPE_2A',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_XRC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_XRC) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1150
 *          e.IBV_DEVICE_UD_IP_CSUM: 'IBV_DEVICE_UD_IP_CSUM',
 *          e.IBV_DEVICE_XRC: 'IBV_DEVICE_XRC',
 *          e.IBV_DEVICE_MEM_MGT_EXTENSIONS: 'IBV_DEVICE_MEM_MGT_EXTENSIONS',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2A: 'IBV_DEVICE_MEM_WINDOW_TYPE_2A',
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2B: 'IBV_DEVICE_MEM_WINDOW_TYPE_2B',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_MEM_MGT_EXTENSIONS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_MGT_EXTENSIONS) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1151
 *          e.IBV_DEVICE_XRC: 'IBV_DEVICE_XRC',
 *          e.IBV_DEVICE_MEM_MGT_EXTENSIONS: 'IBV_DEVICE_MEM_MGT_EXTENSIONS',
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2A: 'IBV_DEVICE_MEM_WINDOW_TYPE_2A',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2B: 'IBV_DEVICE_MEM_WINDOW_TYPE_2B',
 *          e.IBV_DEVICE_RC_IP_CSUM: 'IBV_DEVICE_RC_IP_CSUM',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_MEM_WINDOW_TYPE_2A); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_WINDOW_TYPE_2A) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1152
 *          e.IBV_DEVICE_MEM_MGT_EXTENSIONS: 'IBV_DEVICE_MEM_MGT_EXTENSIONS',
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2A: 'IBV_DEVICE_MEM_WINDOW_TYPE_2A',
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2B: 'IBV_DEVICE_MEM_WINDOW_TYPE_2B',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_RC_IP_CSUM: 'IBV_DEVICE_RC_IP_CSUM',
 *          e.IBV_DEVICE_RAW_IP_CSUM: 'IBV_DEVICE_RAW_IP_CSUM',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_MEM_WINDOW_TYPE_2B); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MEM_WINDOW_TYPE_2B) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1153
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2A: 'IBV_DEVICE_MEM_WINDOW_TYPE_2A',
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2B: 'IBV_DEVICE_MEM_WINDOW_TYPE_2B',
 *          e.IBV_DEVICE_RC_IP_CSUM: 'IBV_DEVICE_RC_IP_CSUM',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_RAW_IP_CSUM: 'IBV_DEVICE_RAW_IP_CSUM',
 *          e.IBV_DEVICE_MANAGED_FLOW_STEERING: 'IBV_DEVICE_MANAGED_FLOW_STEERING'}
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_RC_IP_CSUM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RC_IP_CSUM) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1154
 *          e.IBV_DEVICE_MEM_WINDOW_TYPE_2B: 'IBV_DEVICE_MEM_WINDOW_TYPE_2B',
 *          e.IBV_DEVICE_RC_IP_CSUM: 'IBV_DEVICE_RC_IP_CSUM',
 *          e.IBV_DEVICE_RAW_IP_CSUM: 'IBV_DEVICE_RAW_IP_CSUM',             # <<<<<<<<<<<<<<
 *          e.IBV_DEVICE_MANAGED_FLOW_STEERING: 'IBV_DEVICE_MANAGED_FLOW_STEERING'}
 *     return str_from_flags(flags, l)
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_RAW_IP_CSUM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_RAW_IP_CSUM) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1155
 *          e.IBV_DEVICE_RC_IP_CSUM: 'IBV_DEVICE_RC_IP_CSUM',
 *          e.IBV_DEVICE_RAW_IP_CSUM: 'IBV_DEVICE_RAW_IP_CSUM',
 *          e.IBV_DEVICE_MANAGED_FLOW_STEERING: 'IBV_DEVICE_MANAGED_FLOW_STEERING'}             # <<<<<<<<<<<<<<
 *     return str_from_flags(flags, l)
 * 
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py(IBV_DEVICE_MANAGED_FLOW_STEERING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_DEVICE_MANAGED_FLOW_STEERING) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1156
 *          e.IBV_DEVICE_RAW_IP_CSUM: 'IBV_DEVICE_RAW_IP_CSUM',
 *          e.IBV_DEVICE_MANAGED_FLOW_STEERING: 'IBV_DEVICE_MANAGED_FLOW_STEERING'}
 *     return str_from_flags(flags, l)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_str_from_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __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[3] = {__pyx_t_2, __pyx_v_flags, __pyx_v_l};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__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, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1131
 * 
 * 
 * def translate_device_caps(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_DEVICE_RESIZE_MAX_WR: 'IBV_DEVICE_RESIZE_MAX_WR',
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyverbs.device.translate_device_caps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1159
 * 
 * 
 * def str_from_flags(flags, dictionary):             # <<<<<<<<<<<<<<
 *     str_flags = "\n  "
 *     for bit in dictionary:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_23str_from_flags(PyObject *__pyx_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_7pyverbs_6device_23str_from_flags = {"str_from_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_23str_from_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_23str_from_flags(PyObject *__pyx_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_flags = 0;
  PyObject *__pyx_v_dictionary = 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("str_from_flags (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_flags,&__pyx_mstate_global->__pyx_n_u_dictionary,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, 1159, __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, 1159, __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, 1159, __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, "str_from_flags", 0) < (0)) __PYX_ERR(0, 1159, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("str_from_flags", 1, 2, 2, i); __PYX_ERR(0, 1159, __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, 1159, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1159, __pyx_L3_error)
    }
    __pyx_v_flags = values[0];
    __pyx_v_dictionary = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("str_from_flags", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1159, __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("pyverbs.device.str_from_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_22str_from_flags(__pyx_self, __pyx_v_flags, __pyx_v_dictionary);

  /* 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_7pyverbs_6device_22str_from_flags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_dictionary) {
  PyObject *__pyx_v_str_flags = NULL;
  PyObject *__pyx_v_bit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("str_from_flags", 0);

  /* "pyverbs/device.pyx":1160
 * 
 * def str_from_flags(flags, dictionary):
 *     str_flags = "\n  "             # <<<<<<<<<<<<<<
 *     for bit in dictionary:
 *         if flags & bit:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
  __pyx_v_str_flags = __pyx_mstate_global->__pyx_kp_u__7;

  /* "pyverbs/device.pyx":1161
 * def str_from_flags(flags, dictionary):
 *     str_flags = "\n  "
 *     for bit in dictionary:             # <<<<<<<<<<<<<<
 *         if flags & bit:
 *             str_flags += dictionary[bit]
*/
  if (likely(PyList_CheckExact(__pyx_v_dictionary)) || PyTuple_CheckExact(__pyx_v_dictionary)) {
    __pyx_t_1 = __pyx_v_dictionary; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dictionary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1161, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1161, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1161, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
        #endif
        ++__pyx_t_2;
      }
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __pyx_L1_error)
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1161, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_bit, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyverbs/device.pyx":1162
 *     str_flags = "\n  "
 *     for bit in dictionary:
 *         if flags & bit:             # <<<<<<<<<<<<<<
 *             str_flags += dictionary[bit]
 *             str_flags += '\n  '
*/
    __pyx_t_4 = PyNumber_And(__pyx_v_flags, __pyx_v_bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "pyverbs/device.pyx":1163
 *     for bit in dictionary:
 *         if flags & bit:
 *             str_flags += dictionary[bit]             # <<<<<<<<<<<<<<
 *             str_flags += '\n  '
 *     return str_flags
*/
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_dictionary, __pyx_v_bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_str_flags, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_str_flags, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pyverbs/device.pyx":1164
 *         if flags & bit:
 *             str_flags += dictionary[bit]
 *             str_flags += '\n  '             # <<<<<<<<<<<<<<
 *     return str_flags
 * 
*/
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_str_flags, __pyx_mstate_global->__pyx_kp_u__7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_str_flags, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pyverbs/device.pyx":1162
 *     str_flags = "\n  "
 *     for bit in dictionary:
 *         if flags & bit:             # <<<<<<<<<<<<<<
 *             str_flags += dictionary[bit]
 *             str_flags += '\n  '
*/
    }

    /* "pyverbs/device.pyx":1161
 * def str_from_flags(flags, dictionary):
 *     str_flags = "\n  "
 *     for bit in dictionary:             # <<<<<<<<<<<<<<
 *         if flags & bit:
 *             str_flags += dictionary[bit]
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1165
 *             str_flags += dictionary[bit]
 *             str_flags += '\n  '
 *     return str_flags             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_str_flags);
  __pyx_r = __pyx_v_str_flags;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1159
 * 
 * 
 * def str_from_flags(flags, dictionary):             # <<<<<<<<<<<<<<
 *     str_flags = "\n  "
 *     for bit in dictionary:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyverbs.device.str_from_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_flags);
  __Pyx_XDECREF(__pyx_v_bit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1168
 * 
 * 
 * def phys_state_to_str(phys):             # <<<<<<<<<<<<<<
 *     l =  {1: 'Sleep', 2: 'Polling', 3: 'Disabled',
 *           4: 'Port configuration training', 5: 'Link up',
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_25phys_state_to_str(PyObject *__pyx_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_7pyverbs_6device_25phys_state_to_str = {"phys_state_to_str", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_25phys_state_to_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_25phys_state_to_str(PyObject *__pyx_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_phys = 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("phys_state_to_str (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_phys,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, 1168, __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, 1168, __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, "phys_state_to_str", 0) < (0)) __PYX_ERR(0, 1168, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("phys_state_to_str", 1, 1, 1, i); __PYX_ERR(0, 1168, __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, 1168, __pyx_L3_error)
    }
    __pyx_v_phys = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("phys_state_to_str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1168, __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("pyverbs.device.phys_state_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_24phys_state_to_str(__pyx_self, __pyx_v_phys);

  /* 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_7pyverbs_6device_24phys_state_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phys) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("phys_state_to_str", 0);

  /* "pyverbs/device.pyx":1169
 * 
 * def phys_state_to_str(phys):
 *     l =  {1: 'Sleep', 2: 'Polling', 3: 'Disabled',             # <<<<<<<<<<<<<<
 *           4: 'Port configuration training', 5: 'Link up',
 *           6: 'Link error recovery', 7: 'Phy test'}
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_n_u_Sleep) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_n_u_Polling) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_n_u_Disabled) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_kp_u_Port_configuration_training) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_kp_u_Link_up) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_6, __pyx_mstate_global->__pyx_kp_u_Link_error_recovery) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_7, __pyx_mstate_global->__pyx_kp_u_Phy_test) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1172
 *           4: 'Port configuration training', 5: 'Link up',
 *           6: 'Link error recovery', 7: 'Phy test'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[phys], n=phys)
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1173
 *           6: 'Link error recovery', 7: 'Phy test'}
 *     try:
 *         return '{s} ({n})'.format(s=l[phys], n=phys)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Invalid physical state'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_s_n;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_phys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1173, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_s, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1173, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_n, __pyx_v_phys, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1173, __pyx_L3_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1172
 *           4: 'Port configuration training', 5: 'Link up',
 *           6: 'Link error recovery', 7: 'Phy test'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[phys], n=phys)
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;

    /* "pyverbs/device.pyx":1174
 *     try:
 *         return '{s} ({n})'.format(s=l[phys], n=phys)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Invalid physical state'
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyverbs/device.pyx":1175
 *         return '{s} ({n})'.format(s=l[phys], n=phys)
 *     except KeyError:
 *         return 'Invalid physical state'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Invalid_physical_state);
      __pyx_r = __pyx_mstate_global->__pyx_kp_u_Invalid_physical_state;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1172
 *           4: 'Port configuration training', 5: 'Link up',
 *           6: 'Link error recovery', 7: 'Phy test'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[phys], n=phys)
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1168
 * 
 * 
 * def phys_state_to_str(phys):             # <<<<<<<<<<<<<<
 *     l =  {1: 'Sleep', 2: 'Polling', 3: 'Disabled',
 *           4: 'Port configuration training', 5: 'Link up',
*/

  /* 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_8);
  __Pyx_AddTraceback("pyverbs.device.phys_state_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1178
 * 
 * 
 * def width_to_str(width):             # <<<<<<<<<<<<<<
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_27width_to_str(PyObject *__pyx_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_7pyverbs_6device_27width_to_str = {"width_to_str", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_27width_to_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_27width_to_str(PyObject *__pyx_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_width = 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("width_to_str (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_width,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, 1178, __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, 1178, __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, "width_to_str", 0) < (0)) __PYX_ERR(0, 1178, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("width_to_str", 1, 1, 1, i); __PYX_ERR(0, 1178, __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, 1178, __pyx_L3_error)
    }
    __pyx_v_width = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("width_to_str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1178, __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("pyverbs.device.width_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_26width_to_str(__pyx_self, __pyx_v_width);

  /* 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_7pyverbs_6device_26width_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("width_to_str", 0);

  /* "pyverbs/device.pyx":1179
 * 
 * def width_to_str(width):
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}             # <<<<<<<<<<<<<<
 *     try:
 *         return '{s} ({n})'.format(s=l[width], n=width)
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_kp_u_1X) < (0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_kp_u_4X) < (0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_kp_u_8X) < (0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_8, __pyx_mstate_global->__pyx_kp_u_12X) < (0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_16, __pyx_mstate_global->__pyx_kp_u_2X) < (0)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1180
 * def width_to_str(width):
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[width], n=width)
 *     except KeyError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pyverbs/device.pyx":1181
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:
 *         return '{s} ({n})'.format(s=l[width], n=width)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Invalid width'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_s_n;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_width); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1181, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1181, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_s, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1181, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_n, __pyx_v_width, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1181, __pyx_L3_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1180
 * def width_to_str(width):
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[width], n=width)
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;

    /* "pyverbs/device.pyx":1182
 *     try:
 *         return '{s} ({n})'.format(s=l[width], n=width)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Invalid width'
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyverbs/device.pyx":1183
 *         return '{s} ({n})'.format(s=l[width], n=width)
 *     except KeyError:
 *         return 'Invalid width'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Invalid_width);
      __pyx_r = __pyx_mstate_global->__pyx_kp_u_Invalid_width;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1180
 * def width_to_str(width):
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[width], n=width)
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "pyverbs/device.pyx":1178
 * 
 * 
 * def width_to_str(width):             # <<<<<<<<<<<<<<
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:
*/

  /* 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_8);
  __Pyx_AddTraceback("pyverbs.device.width_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1186
 * 
 * 
 * def speed_to_str(active_speed, active_speed_ex):             # <<<<<<<<<<<<<<
 *     real_speed = active_speed if not active_speed_ex else active_speed_ex
 *     l = {0: '0.0 Gbps', 1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps',
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_29speed_to_str(PyObject *__pyx_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_7pyverbs_6device_29speed_to_str = {"speed_to_str", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_29speed_to_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_29speed_to_str(PyObject *__pyx_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_active_speed = 0;
  PyObject *__pyx_v_active_speed_ex = 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("speed_to_str (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_active_speed,&__pyx_mstate_global->__pyx_n_u_active_speed_ex,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, 1186, __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, 1186, __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, 1186, __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, "speed_to_str", 0) < (0)) __PYX_ERR(0, 1186, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("speed_to_str", 1, 2, 2, i); __PYX_ERR(0, 1186, __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, 1186, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1186, __pyx_L3_error)
    }
    __pyx_v_active_speed = values[0];
    __pyx_v_active_speed_ex = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("speed_to_str", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1186, __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("pyverbs.device.speed_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_28speed_to_str(__pyx_self, __pyx_v_active_speed, __pyx_v_active_speed_ex);

  /* 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_7pyverbs_6device_28speed_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_active_speed, PyObject *__pyx_v_active_speed_ex) {
  PyObject *__pyx_v_real_speed = NULL;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("speed_to_str", 0);

  /* "pyverbs/device.pyx":1187
 * 
 * def speed_to_str(active_speed, active_speed_ex):
 *     real_speed = active_speed if not active_speed_ex else active_speed_ex             # <<<<<<<<<<<<<<
 *     l = {0: '0.0 Gbps', 1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps',
 *          8: '10.0 Gbps', 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps',
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_active_speed_ex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1187, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_v_active_speed);
    __pyx_t_1 = __pyx_v_active_speed;
  } else {
    __Pyx_INCREF(__pyx_v_active_speed_ex);
    __pyx_t_1 = __pyx_v_active_speed_ex;
  }
  __pyx_v_real_speed = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1188
 * def speed_to_str(active_speed, active_speed_ex):
 *     real_speed = active_speed if not active_speed_ex else active_speed_ex
 *     l = {0: '0.0 Gbps', 1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps',             # <<<<<<<<<<<<<<
 *          8: '10.0 Gbps', 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps',
 *          128: '100.0 Gbps', 256: '200.0 Gbps'}
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_kp_u_0_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_kp_u_2_5_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_kp_u_5_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_kp_u_5_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_8, __pyx_mstate_global->__pyx_kp_u_10_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_16, __pyx_mstate_global->__pyx_kp_u_14_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_32, __pyx_mstate_global->__pyx_kp_u_25_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_64, __pyx_mstate_global->__pyx_kp_u_50_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_128, __pyx_mstate_global->__pyx_kp_u_100_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_int_256, __pyx_mstate_global->__pyx_kp_u_200_0_Gbps) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1191
 *          8: '10.0 Gbps', 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps',
 *          128: '100.0 Gbps', 256: '200.0 Gbps'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[real_speed], n=real_speed)
 *     except KeyError:
*/
  {
    __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:*/ {

      /* "pyverbs/device.pyx":1192
 *          128: '100.0 Gbps', 256: '200.0 Gbps'}
 *     try:
 *         return '{s} ({n})'.format(s=l[real_speed], n=real_speed)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return 'Invalid speed'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_s_n;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_l, __pyx_v_real_speed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1192, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, NULL};
        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1192, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_s, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1192, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_n, __pyx_v_real_speed, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1192, __pyx_L3_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1191
 *          8: '10.0 Gbps', 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps',
 *          128: '100.0 Gbps', 256: '200.0 Gbps'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[real_speed], n=real_speed)
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyverbs/device.pyx":1193
 *     try:
 *         return '{s} ({n})'.format(s=l[real_speed], n=real_speed)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return 'Invalid speed'
 * 
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_11) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyverbs/device.pyx":1194
 *         return '{s} ({n})'.format(s=l[real_speed], n=real_speed)
 *     except KeyError:
 *         return 'Invalid speed'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Invalid_speed);
      __pyx_r = __pyx_mstate_global->__pyx_kp_u_Invalid_speed;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1191
 *          8: '10.0 Gbps', 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps',
 *          128: '100.0 Gbps', 256: '200.0 Gbps'}
 *     try:             # <<<<<<<<<<<<<<
 *         return '{s} ({n})'.format(s=l[real_speed], n=real_speed)
 *     except KeyError:
*/
    __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_L7_try_return:;
    __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_L0;
    __pyx_L6_except_return:;
    __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_L0;
  }

  /* "pyverbs/device.pyx":1186
 * 
 * 
 * def speed_to_str(active_speed, active_speed_ex):             # <<<<<<<<<<<<<<
 *     real_speed = active_speed if not active_speed_ex else active_speed_ex
 *     l = {0: '0.0 Gbps', 1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps',
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyverbs.device.speed_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_real_speed);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1197
 * 
 * 
 * def get_device_list():             # <<<<<<<<<<<<<<
 *     """
 *     :return: list of IB_devices on current node
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_31get_device_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_30get_device_list, "\n    :return: list of IB_devices on current node\n             each list element contains a Device with:\n                 device name\n                 device node type\n                 device transport type\n                 device guid\n                 device index\n    ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_31get_device_list = {"get_device_list", (PyCFunction)__pyx_pw_7pyverbs_6device_31get_device_list, METH_NOARGS, __pyx_doc_7pyverbs_6device_30get_device_list};
static PyObject *__pyx_pw_7pyverbs_6device_31get_device_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_device_list (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_30get_device_list(__pyx_self);

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

static PyObject *__pyx_pf_7pyverbs_6device_30get_device_list(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_count;
  struct ibv_device **__pyx_v_dev_list;
  PyObject *__pyx_v_devices = NULL;
  int __pyx_v_i;
  char *__pyx_v_name;
  int __pyx_v_node;
  int __pyx_v_transport;
  unsigned long __pyx_v_guid;
  int __pyx_v_index;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char *__pyx_t_9;
  int __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;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_device_list", 0);

  /* "pyverbs/device.pyx":1207
 *                  device index
 *     """
 *     cdef int count = 0;             # <<<<<<<<<<<<<<
 *     cdef v.ibv_device **dev_list;
 *     dev_list = v.ibv_get_device_list(&count)
*/
  __pyx_v_count = 0;

  /* "pyverbs/device.pyx":1209
 *     cdef int count = 0;
 *     cdef v.ibv_device **dev_list;
 *     dev_list = v.ibv_get_device_list(&count)             # <<<<<<<<<<<<<<
 *     if dev_list == NULL:
 *             raise PyverbsRDMAError('Failed to get devices list')
*/
  __pyx_v_dev_list = ibv_get_device_list((&__pyx_v_count));

  /* "pyverbs/device.pyx":1210
 *     cdef v.ibv_device **dev_list;
 *     dev_list = v.ibv_get_device_list(&count)
 *     if dev_list == NULL:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to get devices list')
 *     devices = []
*/
  __pyx_t_1 = (__pyx_v_dev_list == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":1211
 *     dev_list = v.ibv_get_device_list(&count)
 *     if dev_list == NULL:
 *             raise PyverbsRDMAError('Failed to get devices list')             # <<<<<<<<<<<<<<
 *     devices = []
 *     try:
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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, __pyx_mstate_global->__pyx_kp_u_Failed_to_get_devices_list};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__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, 1211, __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, 1211, __pyx_L1_error)

    /* "pyverbs/device.pyx":1210
 *     cdef v.ibv_device **dev_list;
 *     dev_list = v.ibv_get_device_list(&count)
 *     if dev_list == NULL:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAError('Failed to get devices list')
 *     devices = []
*/
  }

  /* "pyverbs/device.pyx":1212
 *     if dev_list == NULL:
 *             raise PyverbsRDMAError('Failed to get devices list')
 *     devices = []             # <<<<<<<<<<<<<<
 *     try:
 *         for i in range(count):
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_devices = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1213
 *             raise PyverbsRDMAError('Failed to get devices list')
 *     devices = []
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             name = dev_list[i].name
*/
  /*try:*/ {

    /* "pyverbs/device.pyx":1214
 *     devices = []
 *     try:
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             name = dev_list[i].name
 *             node = dev_list[i].node_type
*/
    __pyx_t_6 = __pyx_v_count;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_i = __pyx_t_8;

      /* "pyverbs/device.pyx":1215
 *     try:
 *         for i in range(count):
 *             name = dev_list[i].name             # <<<<<<<<<<<<<<
 *             node = dev_list[i].node_type
 *             transport = dev_list[i].transport_type
*/
      __pyx_t_9 = (__pyx_v_dev_list[__pyx_v_i])->name;
      __pyx_v_name = __pyx_t_9;

      /* "pyverbs/device.pyx":1216
 *         for i in range(count):
 *             name = dev_list[i].name
 *             node = dev_list[i].node_type             # <<<<<<<<<<<<<<
 *             transport = dev_list[i].transport_type
 *             guid = be64toh(v.ibv_get_device_guid(dev_list[i]))
*/
      __pyx_t_10 = (__pyx_v_dev_list[__pyx_v_i])->node_type;
      __pyx_v_node = __pyx_t_10;

      /* "pyverbs/device.pyx":1217
 *             name = dev_list[i].name
 *             node = dev_list[i].node_type
 *             transport = dev_list[i].transport_type             # <<<<<<<<<<<<<<
 *             guid = be64toh(v.ibv_get_device_guid(dev_list[i]))
 *             index = v.ibv_get_device_index(dev_list[i])
*/
      __pyx_t_10 = (__pyx_v_dev_list[__pyx_v_i])->transport_type;
      __pyx_v_transport = __pyx_t_10;

      /* "pyverbs/device.pyx":1218
 *             node = dev_list[i].node_type
 *             transport = dev_list[i].transport_type
 *             guid = be64toh(v.ibv_get_device_guid(dev_list[i]))             # <<<<<<<<<<<<<<
 *             index = v.ibv_get_device_index(dev_list[i])
 *             devices.append(Device(name, guid, node, transport, index))
*/
      __pyx_v_guid = be64toh(ibv_get_device_guid((__pyx_v_dev_list[__pyx_v_i])));

      /* "pyverbs/device.pyx":1219
 *             transport = dev_list[i].transport_type
 *             guid = be64toh(v.ibv_get_device_guid(dev_list[i]))
 *             index = v.ibv_get_device_index(dev_list[i])             # <<<<<<<<<<<<<<
 *             devices.append(Device(name, guid, node, transport, index))
 *     finally:
*/
      __pyx_v_index = ibv_get_device_index((__pyx_v_dev_list[__pyx_v_i]));

      /* "pyverbs/device.pyx":1220
 *             guid = be64toh(v.ibv_get_device_guid(dev_list[i]))
 *             index = v.ibv_get_device_index(dev_list[i])
 *             devices.append(Device(name, guid, node, transport, index))             # <<<<<<<<<<<<<<
 *     finally:
 *         v.ibv_free_device_list(dev_list)
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyLong_From_unsigned_long(__pyx_v_guid); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_node); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_transport); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_devices, __pyx_t_2); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1220, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "pyverbs/device.pyx":1222
 *             devices.append(Device(name, guid, node, transport, index))
 *     finally:
 *         v.ibv_free_device_list(dev_list)             # <<<<<<<<<<<<<<
 *     return devices
 * 
*/
  /*finally:*/ {
    /*normal exit:*/{
      ibv_free_device_list(__pyx_v_dev_list);
      goto __pyx_L6;
    }
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __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_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__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_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
      if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
      {
        ibv_free_device_list(__pyx_v_dev_list);
      }
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_17;
      goto __pyx_L1_error;
    }
    __pyx_L6:;
  }

  /* "pyverbs/device.pyx":1223
 *     finally:
 *         v.ibv_free_device_list(dev_list)
 *     return devices             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_devices);
  __pyx_r = __pyx_v_devices;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1197
 * 
 * 
 * def get_device_list():             # <<<<<<<<<<<<<<
 *     """
 *     :return: list of IB_devices on current node
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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_AddTraceback("pyverbs.device.get_device_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_devices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1226
 * 
 * 
 * def rdma_get_devices():             # <<<<<<<<<<<<<<
 *     """
 *     Get the RDMA devices.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_33rdma_get_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyverbs_6device_32rdma_get_devices, "\n    Get the RDMA devices.\n    :return: list of Device objects.\n    ");
static PyMethodDef __pyx_mdef_7pyverbs_6device_33rdma_get_devices = {"rdma_get_devices", (PyCFunction)__pyx_pw_7pyverbs_6device_33rdma_get_devices, METH_NOARGS, __pyx_doc_7pyverbs_6device_32rdma_get_devices};
static PyObject *__pyx_pw_7pyverbs_6device_33rdma_get_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rdma_get_devices (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_32rdma_get_devices(__pyx_self);

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

static PyObject *__pyx_pf_7pyverbs_6device_32rdma_get_devices(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_count;
  struct ibv_context **__pyx_v_ctx_list;
  PyObject *__pyx_v_devices = NULL;
  int __pyx_v_i;
  char *__pyx_v_name;
  int __pyx_v_node;
  int __pyx_v_transport;
  unsigned long __pyx_v_guid;
  int __pyx_v_index;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char *__pyx_t_9;
  int __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;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rdma_get_devices", 0);

  /* "pyverbs/device.pyx":1233
 *     cdef int count
 *     cdef v.ibv_context **ctx_list
 *     ctx_list = cm.rdma_get_devices(&count)             # <<<<<<<<<<<<<<
 *     if ctx_list == NULL:
 *         raise PyverbsRDMAErrno('Failed to get device list')
*/
  __pyx_v_ctx_list = rdma_get_devices((&__pyx_v_count));

  /* "pyverbs/device.pyx":1234
 *     cdef v.ibv_context **ctx_list
 *     ctx_list = cm.rdma_get_devices(&count)
 *     if ctx_list == NULL:             # <<<<<<<<<<<<<<
 *         raise PyverbsRDMAErrno('Failed to get device list')
 *     devices = []
*/
  __pyx_t_1 = (__pyx_v_ctx_list == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pyverbs/device.pyx":1235
 *     ctx_list = cm.rdma_get_devices(&count)
 *     if ctx_list == NULL:
 *         raise PyverbsRDMAErrno('Failed to get device list')             # <<<<<<<<<<<<<<
 *     devices = []
 *     for i in range(count):
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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, __pyx_mstate_global->__pyx_kp_u_Failed_to_get_device_list};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__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, 1235, __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, 1235, __pyx_L1_error)

    /* "pyverbs/device.pyx":1234
 *     cdef v.ibv_context **ctx_list
 *     ctx_list = cm.rdma_get_devices(&count)
 *     if ctx_list == NULL:             # <<<<<<<<<<<<<<
 *         raise PyverbsRDMAErrno('Failed to get device list')
 *     devices = []
*/
  }

  /* "pyverbs/device.pyx":1236
 *     if ctx_list == NULL:
 *         raise PyverbsRDMAErrno('Failed to get device list')
 *     devices = []             # <<<<<<<<<<<<<<
 *     for i in range(count):
 *         name = ctx_list[i].device.name
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_devices = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1237
 *         raise PyverbsRDMAErrno('Failed to get device list')
 *     devices = []
 *     for i in range(count):             # <<<<<<<<<<<<<<
 *         name = ctx_list[i].device.name
 *         node = ctx_list[i].device.node_type
*/
  __pyx_t_6 = __pyx_v_count;
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyverbs/device.pyx":1238
 *     devices = []
 *     for i in range(count):
 *         name = ctx_list[i].device.name             # <<<<<<<<<<<<<<
 *         node = ctx_list[i].device.node_type
 *         transport = ctx_list[i].device.transport_type
*/
    __pyx_t_9 = (__pyx_v_ctx_list[__pyx_v_i])->device->name;
    __pyx_v_name = __pyx_t_9;

    /* "pyverbs/device.pyx":1239
 *     for i in range(count):
 *         name = ctx_list[i].device.name
 *         node = ctx_list[i].device.node_type             # <<<<<<<<<<<<<<
 *         transport = ctx_list[i].device.transport_type
 *         guid = be64toh(v.ibv_get_device_guid(ctx_list[i].device))
*/
    __pyx_t_10 = (__pyx_v_ctx_list[__pyx_v_i])->device->node_type;
    __pyx_v_node = __pyx_t_10;

    /* "pyverbs/device.pyx":1240
 *         name = ctx_list[i].device.name
 *         node = ctx_list[i].device.node_type
 *         transport = ctx_list[i].device.transport_type             # <<<<<<<<<<<<<<
 *         guid = be64toh(v.ibv_get_device_guid(ctx_list[i].device))
 *         index = v.ibv_get_device_index(ctx_list[i].device)
*/
    __pyx_t_10 = (__pyx_v_ctx_list[__pyx_v_i])->device->transport_type;
    __pyx_v_transport = __pyx_t_10;

    /* "pyverbs/device.pyx":1241
 *         node = ctx_list[i].device.node_type
 *         transport = ctx_list[i].device.transport_type
 *         guid = be64toh(v.ibv_get_device_guid(ctx_list[i].device))             # <<<<<<<<<<<<<<
 *         index = v.ibv_get_device_index(ctx_list[i].device)
 *         devices.append(Device(name, guid, node, transport, index))
*/
    __pyx_v_guid = be64toh(ibv_get_device_guid((__pyx_v_ctx_list[__pyx_v_i])->device));

    /* "pyverbs/device.pyx":1242
 *         transport = ctx_list[i].device.transport_type
 *         guid = be64toh(v.ibv_get_device_guid(ctx_list[i].device))
 *         index = v.ibv_get_device_index(ctx_list[i].device)             # <<<<<<<<<<<<<<
 *         devices.append(Device(name, guid, node, transport, index))
 *     cm.rdma_free_devices(ctx_list)
*/
    __pyx_v_index = ibv_get_device_index((__pyx_v_ctx_list[__pyx_v_i])->device);

    /* "pyverbs/device.pyx":1243
 *         guid = be64toh(v.ibv_get_device_guid(ctx_list[i].device))
 *         index = v.ibv_get_device_index(ctx_list[i].device)
 *         devices.append(Device(name, guid, node, transport, index))             # <<<<<<<<<<<<<<
 *     cm.rdma_free_devices(ctx_list)
 *     return devices
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyLong_From_unsigned_long(__pyx_v_guid); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_node); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_transport); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_devices, __pyx_t_2); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "pyverbs/device.pyx":1244
 *         index = v.ibv_get_device_index(ctx_list[i].device)
 *         devices.append(Device(name, guid, node, transport, index))
 *     cm.rdma_free_devices(ctx_list)             # <<<<<<<<<<<<<<
 *     return devices
 * 
*/
  rdma_free_devices(__pyx_v_ctx_list);

  /* "pyverbs/device.pyx":1245
 *         devices.append(Device(name, guid, node, transport, index))
 *     cm.rdma_free_devices(ctx_list)
 *     return devices             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_devices);
  __pyx_r = __pyx_v_devices;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1226
 * 
 * 
 * def rdma_get_devices():             # <<<<<<<<<<<<<<
 *     """
 *     Get the RDMA devices.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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_AddTraceback("pyverbs.device.rdma_get_devices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_devices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1248
 * 
 * 
 * def translate_event_type(event_type):             # <<<<<<<<<<<<<<
 *     types = {
 *         e.IBV_EVENT_CQ_ERR: 'IBV_EVENT_CQ_ERR',
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_35translate_event_type(PyObject *__pyx_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_7pyverbs_6device_35translate_event_type = {"translate_event_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_35translate_event_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_35translate_event_type(PyObject *__pyx_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_event_type = 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("translate_event_type (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_event_type,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, 1248, __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, 1248, __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, "translate_event_type", 0) < (0)) __PYX_ERR(0, 1248, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_event_type", 1, 1, 1, i); __PYX_ERR(0, 1248, __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, 1248, __pyx_L3_error)
    }
    __pyx_v_event_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate_event_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1248, __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("pyverbs.device.translate_event_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_34translate_event_type(__pyx_self, __pyx_v_event_type);

  /* 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_7pyverbs_6device_34translate_event_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type) {
  PyObject *__pyx_v_types = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[3];
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("translate_event_type", 0);

  /* "pyverbs/device.pyx":1250
 * def translate_event_type(event_type):
 *     types = {
 *         e.IBV_EVENT_CQ_ERR: 'IBV_EVENT_CQ_ERR',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_QP_FATAL: 'IBV_EVENT_QP_FATAL',
 *         e.IBV_EVENT_QP_REQ_ERR: 'IBV_EVENT_QP_REQ_ERR',
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_CQ_ERR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_CQ_ERR) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1251
 *     types = {
 *         e.IBV_EVENT_CQ_ERR: 'IBV_EVENT_CQ_ERR',
 *         e.IBV_EVENT_QP_FATAL: 'IBV_EVENT_QP_FATAL',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_QP_REQ_ERR: 'IBV_EVENT_QP_REQ_ERR',
 *         e.IBV_EVENT_QP_ACCESS_ERR: 'IBV_EVENT_QP_ACCESS_ERR',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_QP_FATAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_FATAL) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1252
 *         e.IBV_EVENT_CQ_ERR: 'IBV_EVENT_CQ_ERR',
 *         e.IBV_EVENT_QP_FATAL: 'IBV_EVENT_QP_FATAL',
 *         e.IBV_EVENT_QP_REQ_ERR: 'IBV_EVENT_QP_REQ_ERR',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_QP_ACCESS_ERR: 'IBV_EVENT_QP_ACCESS_ERR',
 *         e.IBV_EVENT_COMM_EST: 'IBV_EVENT_COMM_EST',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_QP_REQ_ERR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_REQ_ERR) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1253
 *         e.IBV_EVENT_QP_FATAL: 'IBV_EVENT_QP_FATAL',
 *         e.IBV_EVENT_QP_REQ_ERR: 'IBV_EVENT_QP_REQ_ERR',
 *         e.IBV_EVENT_QP_ACCESS_ERR: 'IBV_EVENT_QP_ACCESS_ERR',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_COMM_EST: 'IBV_EVENT_COMM_EST',
 *         e.IBV_EVENT_SQ_DRAINED: 'IBV_EVENT_SQ_DRAINED',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_QP_ACCESS_ERR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_QP_ACCESS_ERR) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1254
 *         e.IBV_EVENT_QP_REQ_ERR: 'IBV_EVENT_QP_REQ_ERR',
 *         e.IBV_EVENT_QP_ACCESS_ERR: 'IBV_EVENT_QP_ACCESS_ERR',
 *         e.IBV_EVENT_COMM_EST: 'IBV_EVENT_COMM_EST',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_SQ_DRAINED: 'IBV_EVENT_SQ_DRAINED',
 *         e.IBV_EVENT_PATH_MIG: 'IBV_EVENT_PATH_MIG',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_COMM_EST); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_COMM_EST) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1255
 *         e.IBV_EVENT_QP_ACCESS_ERR: 'IBV_EVENT_QP_ACCESS_ERR',
 *         e.IBV_EVENT_COMM_EST: 'IBV_EVENT_COMM_EST',
 *         e.IBV_EVENT_SQ_DRAINED: 'IBV_EVENT_SQ_DRAINED',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_PATH_MIG: 'IBV_EVENT_PATH_MIG',
 *         e.IBV_EVENT_PATH_MIG_ERR: 'IBV_EVENT_PATH_MIG_ERR',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_SQ_DRAINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SQ_DRAINED) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1256
 *         e.IBV_EVENT_COMM_EST: 'IBV_EVENT_COMM_EST',
 *         e.IBV_EVENT_SQ_DRAINED: 'IBV_EVENT_SQ_DRAINED',
 *         e.IBV_EVENT_PATH_MIG: 'IBV_EVENT_PATH_MIG',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_PATH_MIG_ERR: 'IBV_EVENT_PATH_MIG_ERR',
 *         e.IBV_EVENT_DEVICE_FATAL: 'IBV_EVENT_DEVICE_FATAL',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_PATH_MIG); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PATH_MIG) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1257
 *         e.IBV_EVENT_SQ_DRAINED: 'IBV_EVENT_SQ_DRAINED',
 *         e.IBV_EVENT_PATH_MIG: 'IBV_EVENT_PATH_MIG',
 *         e.IBV_EVENT_PATH_MIG_ERR: 'IBV_EVENT_PATH_MIG_ERR',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_DEVICE_FATAL: 'IBV_EVENT_DEVICE_FATAL',
 *         e.IBV_EVENT_PORT_ACTIVE: 'IBV_EVENT_PORT_ACTIVE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_PATH_MIG_ERR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PATH_MIG_ERR) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1258
 *         e.IBV_EVENT_PATH_MIG: 'IBV_EVENT_PATH_MIG',
 *         e.IBV_EVENT_PATH_MIG_ERR: 'IBV_EVENT_PATH_MIG_ERR',
 *         e.IBV_EVENT_DEVICE_FATAL: 'IBV_EVENT_DEVICE_FATAL',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_PORT_ACTIVE: 'IBV_EVENT_PORT_ACTIVE',
 *         e.IBV_EVENT_PORT_ERR: 'IBV_EVENT_PORT_ERR',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_DEVICE_FATAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_DEVICE_FATAL) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1259
 *         e.IBV_EVENT_PATH_MIG_ERR: 'IBV_EVENT_PATH_MIG_ERR',
 *         e.IBV_EVENT_DEVICE_FATAL: 'IBV_EVENT_DEVICE_FATAL',
 *         e.IBV_EVENT_PORT_ACTIVE: 'IBV_EVENT_PORT_ACTIVE',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_PORT_ERR: 'IBV_EVENT_PORT_ERR',
 *         e.IBV_EVENT_LID_CHANGE: 'IBV_EVENT_LID_CHANGE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_PORT_ACTIVE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PORT_ACTIVE) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1260
 *         e.IBV_EVENT_DEVICE_FATAL: 'IBV_EVENT_DEVICE_FATAL',
 *         e.IBV_EVENT_PORT_ACTIVE: 'IBV_EVENT_PORT_ACTIVE',
 *         e.IBV_EVENT_PORT_ERR: 'IBV_EVENT_PORT_ERR',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_LID_CHANGE: 'IBV_EVENT_LID_CHANGE',
 *         e.IBV_EVENT_PKEY_CHANGE: 'IBV_EVENT_PKEY_CHANGE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_PORT_ERR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PORT_ERR) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1261
 *         e.IBV_EVENT_PORT_ACTIVE: 'IBV_EVENT_PORT_ACTIVE',
 *         e.IBV_EVENT_PORT_ERR: 'IBV_EVENT_PORT_ERR',
 *         e.IBV_EVENT_LID_CHANGE: 'IBV_EVENT_LID_CHANGE',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_PKEY_CHANGE: 'IBV_EVENT_PKEY_CHANGE',
 *         e.IBV_EVENT_SM_CHANGE: 'IBV_EVENT_SM_CHANGE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_LID_CHANGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_LID_CHANGE) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1262
 *         e.IBV_EVENT_PORT_ERR: 'IBV_EVENT_PORT_ERR',
 *         e.IBV_EVENT_LID_CHANGE: 'IBV_EVENT_LID_CHANGE',
 *         e.IBV_EVENT_PKEY_CHANGE: 'IBV_EVENT_PKEY_CHANGE',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_SM_CHANGE: 'IBV_EVENT_SM_CHANGE',
 *         e.IBV_EVENT_SRQ_ERR: 'IBV_EVENT_SRQ_ERR',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_PKEY_CHANGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_PKEY_CHANGE) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1263
 *         e.IBV_EVENT_LID_CHANGE: 'IBV_EVENT_LID_CHANGE',
 *         e.IBV_EVENT_PKEY_CHANGE: 'IBV_EVENT_PKEY_CHANGE',
 *         e.IBV_EVENT_SM_CHANGE: 'IBV_EVENT_SM_CHANGE',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_SRQ_ERR: 'IBV_EVENT_SRQ_ERR',
 *         e.IBV_EVENT_SRQ_LIMIT_REACHED: 'IBV_EVENT_SRQ_LIMIT_REACHED',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_SM_CHANGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SM_CHANGE) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1264
 *         e.IBV_EVENT_PKEY_CHANGE: 'IBV_EVENT_PKEY_CHANGE',
 *         e.IBV_EVENT_SM_CHANGE: 'IBV_EVENT_SM_CHANGE',
 *         e.IBV_EVENT_SRQ_ERR: 'IBV_EVENT_SRQ_ERR',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_SRQ_LIMIT_REACHED: 'IBV_EVENT_SRQ_LIMIT_REACHED',
 *         e.IBV_EVENT_QP_LAST_WQE_REACHED: '.IBV_EVENT_QP_LAST_WQE_REACHED',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_SRQ_ERR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SRQ_ERR) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1265
 *         e.IBV_EVENT_SM_CHANGE: 'IBV_EVENT_SM_CHANGE',
 *         e.IBV_EVENT_SRQ_ERR: 'IBV_EVENT_SRQ_ERR',
 *         e.IBV_EVENT_SRQ_LIMIT_REACHED: 'IBV_EVENT_SRQ_LIMIT_REACHED',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_QP_LAST_WQE_REACHED: '.IBV_EVENT_QP_LAST_WQE_REACHED',
 *         e.IBV_EVENT_CLIENT_REREGISTER: 'IBV_EVENT_CLIENT_REREGISTER',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_SRQ_LIMIT_REACHED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_SRQ_LIMIT_REACHED) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1266
 *         e.IBV_EVENT_SRQ_ERR: 'IBV_EVENT_SRQ_ERR',
 *         e.IBV_EVENT_SRQ_LIMIT_REACHED: 'IBV_EVENT_SRQ_LIMIT_REACHED',
 *         e.IBV_EVENT_QP_LAST_WQE_REACHED: '.IBV_EVENT_QP_LAST_WQE_REACHED',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_CLIENT_REREGISTER: 'IBV_EVENT_CLIENT_REREGISTER',
 *         e.IBV_EVENT_GID_CHANGE: 'IBV_EVENT_GID_CHANGE',
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_QP_LAST_WQE_REACHED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_kp_u_IBV_EVENT_QP_LAST_WQE_REACHED_2) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1267
 *         e.IBV_EVENT_SRQ_LIMIT_REACHED: 'IBV_EVENT_SRQ_LIMIT_REACHED',
 *         e.IBV_EVENT_QP_LAST_WQE_REACHED: '.IBV_EVENT_QP_LAST_WQE_REACHED',
 *         e.IBV_EVENT_CLIENT_REREGISTER: 'IBV_EVENT_CLIENT_REREGISTER',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_GID_CHANGE: 'IBV_EVENT_GID_CHANGE',
 *         e.IBV_EVENT_WQ_FATAL: 'IBV_EVENT_WQ_FATAL'
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_CLIENT_REREGISTER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_CLIENT_REREGISTER) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1268
 *         e.IBV_EVENT_QP_LAST_WQE_REACHED: '.IBV_EVENT_QP_LAST_WQE_REACHED',
 *         e.IBV_EVENT_CLIENT_REREGISTER: 'IBV_EVENT_CLIENT_REREGISTER',
 *         e.IBV_EVENT_GID_CHANGE: 'IBV_EVENT_GID_CHANGE',             # <<<<<<<<<<<<<<
 *         e.IBV_EVENT_WQ_FATAL: 'IBV_EVENT_WQ_FATAL'
 *     }
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_GID_CHANGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_GID_CHANGE) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1269
 *         e.IBV_EVENT_CLIENT_REREGISTER: 'IBV_EVENT_CLIENT_REREGISTER',
 *         e.IBV_EVENT_GID_CHANGE: 'IBV_EVENT_GID_CHANGE',
 *         e.IBV_EVENT_WQ_FATAL: 'IBV_EVENT_WQ_FATAL'             # <<<<<<<<<<<<<<
 *     }
 *     try:
*/
  __pyx_t_2 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py(IBV_EVENT_WQ_FATAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IBV_EVENT_WQ_FATAL) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1271
 *         e.IBV_EVENT_WQ_FATAL: 'IBV_EVENT_WQ_FATAL'
 *     }
 *     try:             # <<<<<<<<<<<<<<
 *         return types[event_type]
 *     except KeyError:
*/
  {
    __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:*/ {

      /* "pyverbs/device.pyx":1272
 *     }
 *     try:
 *         return types[event_type]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return f'Unknown event_type ({event_type})'
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_types, __pyx_v_event_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyverbs/device.pyx":1271
 *         e.IBV_EVENT_WQ_FATAL: 'IBV_EVENT_WQ_FATAL'
 *     }
 *     try:             # <<<<<<<<<<<<<<
 *         return types[event_type]
 *     except KeyError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyverbs/device.pyx":1273
 *     try:
 *         return types[event_type]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return f'Unknown event_type ({event_type})'
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pyverbs.device.translate_event_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 1273, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "pyverbs/device.pyx":1274
 *         return types[event_type]
 *     except KeyError:
 *         return f'Unknown event_type ({event_type})'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_event_type, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1274, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Unknown_event_type;
      __pyx_t_9[1] = __pyx_t_8;
      __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1274, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyverbs/device.pyx":1271
 *         e.IBV_EVENT_WQ_FATAL: 'IBV_EVENT_WQ_FATAL'
 *     }
 *     try:             # <<<<<<<<<<<<<<
 *         return types[event_type]
 *     except KeyError:
*/
    __pyx_L5_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_L7_try_return:;
    __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_L0;
    __pyx_L6_except_return:;
    __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_L0;
  }

  /* "pyverbs/device.pyx":1248
 * 
 * 
 * def translate_event_type(event_type):             # <<<<<<<<<<<<<<
 *     types = {
 *         e.IBV_EVENT_CQ_ERR: 'IBV_EVENT_CQ_ERR',
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyverbs.device.translate_event_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_types);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1281
 *     Represent ibv_fd_arr struct. This class is used a pointer to the file descriptor array
 *     """
 *     def __init__(self, arr=[], count=0):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         cdef int *dst
*/

/* Python wrapper */
static int __pyx_pw_7pyverbs_6device_5FdArr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyverbs_6device_5FdArr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_count = 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_arr,&__pyx_mstate_global->__pyx_n_u_count,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, 1281, __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, 1281, __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, 1281, __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, 1281, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__8);
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1281, __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, 1281, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__8);
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_arr = values[0];
    __pyx_v_count = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1281, __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("pyverbs.device.FdArr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_5FdArr___init__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self), __pyx_v_arr, __pyx_v_count);

  /* 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_7pyverbs_6device_5FdArr___init__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_count) {
  int *__pyx_v_dst;
  PyObject *__pyx_v_i = NULL;
  int __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;
  int __pyx_t_6;
  int *__pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  uint32_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyverbs/device.pyx":1282
 *     """
 *     def __init__(self, arr=[], count=0):
 *         super().__init__()             # <<<<<<<<<<<<<<
 *         cdef int *dst
 *         self.attr.arr = <int*>malloc(count * sizeof(int))
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_FdArr), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__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, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __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_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1284
 *         super().__init__()
 *         cdef int *dst
 *         self.attr.arr = <int*>malloc(count * sizeof(int))             # <<<<<<<<<<<<<<
 *         if self.attr.arr == NULL:
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')
*/
  __pyx_t_1 = __Pyx_PyLong_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_count, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->attr.arr = ((int *)malloc(__pyx_t_5));

  /* "pyverbs/device.pyx":1285
 *         cdef int *dst
 *         self.attr.arr = <int*>malloc(count * sizeof(int))
 *         if self.attr.arr == NULL:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')
 *         dst = self.attr.arr
*/
  __pyx_t_6 = (__pyx_v_self->attr.arr == NULL);
  if (unlikely(__pyx_t_6)) {

    /* "pyverbs/device.pyx":1286
 *         self.attr.arr = <int*>malloc(count * sizeof(int))
 *         if self.attr.arr == NULL:
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')             # <<<<<<<<<<<<<<
 *         dst = self.attr.arr
 *         for i in range(count):
*/
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Failed_to_malloc_FD_list};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __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, 1286, __pyx_L1_error)

    /* "pyverbs/device.pyx":1285
 *         cdef int *dst
 *         self.attr.arr = <int*>malloc(count * sizeof(int))
 *         if self.attr.arr == NULL:             # <<<<<<<<<<<<<<
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')
 *         dst = self.attr.arr
*/
  }

  /* "pyverbs/device.pyx":1287
 *         if self.attr.arr == NULL:
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')
 *         dst = self.attr.arr             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             dst[i]= arr[i]
*/
  __pyx_t_7 = __pyx_v_self->attr.arr;
  __pyx_v_dst = __pyx_t_7;

  /* "pyverbs/device.pyx":1288
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')
 *         dst = self.attr.arr
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             dst[i]= arr[i]
 *         self.attr.count = count
*/
  __pyx_t_2 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_count};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    {
      __pyx_t_3 = __pyx_t_8(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1288, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyverbs/device.pyx":1289
 *         dst = self.attr.arr
 *         for i in range(count):
 *             dst[i]= arr[i]             # <<<<<<<<<<<<<<
 *         self.attr.count = count
 * 
*/
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
    (__pyx_v_dst[__pyx_t_10]) = __pyx_t_9;

    /* "pyverbs/device.pyx":1288
 *             raise PyverbsRDMAErrno('Failed to malloc FD list')
 *         dst = self.attr.arr
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             dst[i]= arr[i]
 *         self.attr.count = count
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":1290
 *         for i in range(count):
 *             dst[i]= arr[i]
 *         self.attr.count = count             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __pyx_t_11 = __Pyx_PyLong_As_uint32_t(__pyx_v_count); if (unlikely((__pyx_t_11 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1290, __pyx_L1_error)
  __pyx_v_self->attr.count = __pyx_t_11;

  /* "pyverbs/device.pyx":1281
 *     Represent ibv_fd_arr struct. This class is used a pointer to the file descriptor array
 *     """
 *     def __init__(self, arr=[], count=0):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         cdef int *dst
*/

  /* function exit code */
  __pyx_r = 0;
  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("pyverbs.device.FdArr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1292
 *         self.attr.count = count
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

/* Python wrapper */
static void __pyx_pw_7pyverbs_6device_5FdArr_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7pyverbs_6device_5FdArr_3__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_7pyverbs_6device_5FdArr_2__dealloc__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self));

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

static void __pyx_pf_7pyverbs_6device_5FdArr_2__dealloc__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyverbs/device.pyx":1293
 * 
 *     def __dealloc__(self):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     cpdef close(self):
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7pyverbs_6device_FdArr *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1292
 *         self.attr.count = count
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("pyverbs.device.FdArr.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyverbs/device.pyx":1295
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         free(self.attr.arr)
 * 
*/

static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_5close(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_7pyverbs_6device_5FdArr_close(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self, 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 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_7pyverbs_6device_FdArr &&
  __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_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyverbs_6device_5FdArr_5close)) {
        __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[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, 1295, __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
  }

  /* "pyverbs/device.pyx":1296
 * 
 *     cpdef close(self):
 *         free(self.attr.arr)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  free(__pyx_v_self->attr.arr);

  /* "pyverbs/device.pyx":1295
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         free(self.attr.arr)
 * 
*/

  /* 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("pyverbs.device.FdArr.close", __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_7pyverbs_6device_5FdArr_5close(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_7pyverbs_6device_5FdArr_5close = {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_5FdArr_5close, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_5close(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("close", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_5FdArr_4close(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_4close(struct __pyx_obj_7pyverbs_6device_FdArr *__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("close", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyverbs_6device_5FdArr_close(__pyx_v_self, 1); 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("pyverbs.device.FdArr.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1298
 *         free(self.attr.arr)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:20}: {:<20}\n'
 *         return print_format.format('Number of fd in arr', self.attr.count) +\
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_7__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyverbs_6device_5FdArr_6__str__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_6__str__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self) {
  PyObject *__pyx_v_print_format = NULL;
  uint32_t __pyx_8genexpr2__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint32_t __pyx_t_3;
  uint32_t __pyx_t_4;
  uint32_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyverbs/device.pyx":1299
 * 
 *     def __str__(self):
 *         print_format = '{:20}: {:<20}\n'             # <<<<<<<<<<<<<<
 *         return print_format.format('Number of fd in arr', self.attr.count) +\
 *                print_format.format('FDs in arr', [self.attr.arr[i] for i in range(self.attr.count)])
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_20_20);
  __pyx_v_print_format = __pyx_mstate_global->__pyx_kp_u_20_20;

  /* "pyverbs/device.pyx":1300
 *     def __str__(self):
 *         print_format = '{:20}: {:<20}\n'
 *         return print_format.format('Number of fd in arr', self.attr.count) +\             # <<<<<<<<<<<<<<
 *                print_format.format('FDs in arr', [self.attr.arr[i] for i in range(self.attr.count)])
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->attr.count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_Number_of_fd_in_arr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1301
 *         print_format = '{:20}: {:<20}\n'
 *         return print_format.format('Number of fd in arr', self.attr.count) +\
 *                print_format.format('FDs in arr', [self.attr.arr[i] for i in range(self.attr.count)])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_v_self->attr.count;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_8genexpr2__pyx_v_i = __pyx_t_5;
      __pyx_t_6 = __Pyx_PyLong_From_int((__pyx_v_self->attr.arr[__pyx_8genexpr2__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__format, __pyx_v_print_format, __pyx_mstate_global->__pyx_kp_u_FDs_in_arr, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyverbs/device.pyx":1300
 *     def __str__(self):
 *         print_format = '{:20}: {:<20}\n'
 *         return print_format.format('Number of fd in arr', self.attr.count) +\             # <<<<<<<<<<<<<<
 *                print_format.format('FDs in arr', [self.attr.arr[i] for i in range(self.attr.count)])
 * 
*/
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1298
 *         free(self.attr.arr)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         print_format = '{:20}: {:<20}\n'
 *         return print_format.format('Number of fd in arr', self.attr.count) +\
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyverbs.device.FdArr.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_print_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1303
 *                print_format.format('FDs in arr', [self.attr.arr[i] for i in range(self.attr.count)])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def arr(self):
 *         return [self.attr.arr[i] for i in range(self.attr.count)]
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_3arr_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_7pyverbs_6device_5FdArr_3arr___get__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_3arr___get__(struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self) {
  uint32_t __pyx_8genexpr3__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  uint32_t __pyx_t_3;
  uint32_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyverbs/device.pyx":1305
 *     @property
 *     def arr(self):
 *         return [self.attr.arr[i] for i in range(self.attr.count)]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->attr.count;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_8genexpr3__pyx_v_i = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyLong_From_int((__pyx_v_self->attr.arr[__pyx_8genexpr3__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1305, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1303
 *                print_format.format('FDs in arr', [self.attr.arr[i] for i in range(self.attr.count)])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def arr(self):
 *         return [self.attr.arr[i] for i in range(self.attr.count)]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyverbs.device.FdArr.arr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyverbs/device.pyx":1307
 *         return [self.attr.arr[i] for i in range(self.attr.count)]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def count(self):
 *         return self.attr.count
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_5count_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_7pyverbs_6device_5FdArr_5count___get__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_5count___get__(struct __pyx_obj_7pyverbs_6device_FdArr *__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);

  /* "pyverbs/device.pyx":1309
 *     @property
 *     def count(self):
 *         return self.attr.count             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_uint32_t(__pyx_v_self->attr.count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyverbs/device.pyx":1307
 *         return [self.attr.arr[i] for i in range(self.attr.count)]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def count(self):
 *         return self.attr.count
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyverbs.device.FdArr.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_9__reduce_cython__(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_7pyverbs_6device_5FdArr_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_5FdArr_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_9__reduce_cython__(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
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyverbs_6device_5FdArr_8__reduce_cython__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyverbs_6device_5FdArr_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_attr_cannot_be_converted_to, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.FdArr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_11__setstate_cython__(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_7pyverbs_6device_5FdArr_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_5FdArr_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7pyverbs_6device_5FdArr_11__setstate_cython__(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___pyx_state = 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("__setstate_cython__ (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_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __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(1, 3, __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, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __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(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __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("pyverbs.device.FdArr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyverbs_6device_5FdArr_10__setstate_cython__(((struct __pyx_obj_7pyverbs_6device_FdArr *)__pyx_v_self), __pyx_v___pyx_state);

  /* 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_7pyverbs_6device_5FdArr_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyverbs_6device_FdArr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_attr_cannot_be_converted_to, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyverbs.device.FdArr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */
static struct __pyx_vtabstruct_7pyverbs_6device_Context __pyx_vtable_7pyverbs_6device_Context;

static PyObject *__pyx_tp_new_7pyverbs_6device_Context(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyverbs_6device_Context *p;
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyverbs_6device_Context *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM*)__pyx_vtabptr_7pyverbs_6device_Context;
  p->name = Py_None; Py_INCREF(Py_None);
  p->pds = Py_None; Py_INCREF(Py_None);
  p->dms = Py_None; Py_INCREF(Py_None);
  p->ccs = Py_None; Py_INCREF(Py_None);
  p->cqs = Py_None; Py_INCREF(Py_None);
  p->qps = Py_None; Py_INCREF(Py_None);
  p->xrcds = Py_None; Py_INCREF(Py_None);
  p->vars = Py_None; Py_INCREF(Py_None);
  p->uars = Py_None; Py_INCREF(Py_None);
  p->pps = Py_None; Py_INCREF(Py_None);
  p->sched_nodes = Py_None; Py_INCREF(Py_None);
  p->sched_leafs = Py_None; Py_INCREF(Py_None);
  p->dr_domains = Py_None; Py_INCREF(Py_None);
  p->wqs = Py_None; Py_INCREF(Py_None);
  p->rwq_ind_tbls = Py_None; Py_INCREF(Py_None);
  p->crypto_logins = Py_None; Py_INCREF(Py_None);
  p->event_channels = Py_None; Py_INCREF(Py_None);
  p->dmahs = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_Context(PyObject *o) {
  struct __pyx_obj_7pyverbs_6device_Context *p = (struct __pyx_obj_7pyverbs_6device_Context *)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_7pyverbs_6device_Context) {
      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_7pyverbs_6device_7Context_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->name);
  Py_CLEAR(p->pds);
  Py_CLEAR(p->dms);
  Py_CLEAR(p->ccs);
  Py_CLEAR(p->cqs);
  Py_CLEAR(p->qps);
  Py_CLEAR(p->xrcds);
  Py_CLEAR(p->vars);
  Py_CLEAR(p->uars);
  Py_CLEAR(p->pps);
  Py_CLEAR(p->sched_nodes);
  Py_CLEAR(p->sched_leafs);
  Py_CLEAR(p->dr_domains);
  Py_CLEAR(p->wqs);
  Py_CLEAR(p->rwq_ind_tbls);
  Py_CLEAR(p->crypto_logins);
  Py_CLEAR(p->event_channels);
  Py_CLEAR(p->dmahs);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_Context);
}

static int __pyx_tp_traverse_7pyverbs_6device_Context(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7pyverbs_6device_Context *p = (struct __pyx_obj_7pyverbs_6device_Context *)o;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_Context); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  if (p->pds) {
    e = (*v)(p->pds, a); if (e) return e;
  }
  if (p->dms) {
    e = (*v)(p->dms, a); if (e) return e;
  }
  if (p->ccs) {
    e = (*v)(p->ccs, a); if (e) return e;
  }
  if (p->cqs) {
    e = (*v)(p->cqs, a); if (e) return e;
  }
  if (p->qps) {
    e = (*v)(p->qps, a); if (e) return e;
  }
  if (p->xrcds) {
    e = (*v)(p->xrcds, a); if (e) return e;
  }
  if (p->vars) {
    e = (*v)(p->vars, a); if (e) return e;
  }
  if (p->uars) {
    e = (*v)(p->uars, a); if (e) return e;
  }
  if (p->pps) {
    e = (*v)(p->pps, a); if (e) return e;
  }
  if (p->sched_nodes) {
    e = (*v)(p->sched_nodes, a); if (e) return e;
  }
  if (p->sched_leafs) {
    e = (*v)(p->sched_leafs, a); if (e) return e;
  }
  if (p->dr_domains) {
    e = (*v)(p->dr_domains, a); if (e) return e;
  }
  if (p->wqs) {
    e = (*v)(p->wqs, a); if (e) return e;
  }
  if (p->rwq_ind_tbls) {
    e = (*v)(p->rwq_ind_tbls, a); if (e) return e;
  }
  if (p->crypto_logins) {
    e = (*v)(p->crypto_logins, a); if (e) return e;
  }
  if (p->event_channels) {
    e = (*v)(p->event_channels, a); if (e) return e;
  }
  if (p->dmahs) {
    e = (*v)(p->dmahs, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_Context(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7pyverbs_6device_Context *p = (struct __pyx_obj_7pyverbs_6device_Context *)o;
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_Context); }
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pds);
  p->pds = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dms);
  p->dms = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->ccs);
  p->ccs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->cqs);
  p->cqs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->qps);
  p->qps = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->xrcds);
  p->xrcds = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->vars);
  p->vars = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->uars);
  p->uars = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pps);
  p->pps = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sched_nodes);
  p->sched_nodes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sched_leafs);
  p->sched_leafs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dr_domains);
  p->dr_domains = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->wqs);
  p->wqs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->rwq_ind_tbls);
  p->rwq_ind_tbls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->crypto_logins);
  p->crypto_logins = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->event_channels);
  p->event_channels = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dmahs);
  p->dmahs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_7Context_context(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7Context_7context_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7Context_num_comp_vectors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7Context_16num_comp_vectors_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7Context_cmd_fd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7Context_6cmd_fd_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7Context_4name_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_Context[] = {
  {"query_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_7query_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_6query_device},
  {"query_device_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_9query_device_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_8query_device_ex},
  {"query_pkey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_11query_pkey, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"get_pkey_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_13get_pkey_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"query_gid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_15query_gid, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"query_gid_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_17query_gid_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"query_port", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_19query_port, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_18query_port},
  {"query_gid_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_21query_gid_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_20query_gid_table},
  {"query_gid_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_23query_gid_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_22query_gid_ex},
  {"query_rt_values_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_25query_rt_values_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyverbs_6device_7Context_24query_rt_values_ex},
  {"get_async_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_27get_async_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7Context_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_Context[] = {
  {"context", __pyx_getprop_7pyverbs_6device_7Context_context, 0, 0, 0},
  {"num_comp_vectors", __pyx_getprop_7pyverbs_6device_7Context_num_comp_vectors, 0, 0, 0},
  {"cmd_fd", __pyx_getprop_7pyverbs_6device_7Context_cmd_fd, 0, 0, 0},
  {"name", __pyx_getprop_7pyverbs_6device_7Context_name, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_Context_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_Context},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Context class represents the C ibv_context.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_Context},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_Context},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_Context},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_Context},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_7Context_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_Context},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_Context_spec = {
  "pyverbs.device.Context",
  sizeof(struct __pyx_obj_7pyverbs_6device_Context),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_Context_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_Context = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""Context", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_Context), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_Context, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Context class represents the C ibv_context.\n    "), /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_Context, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_Context, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_Context, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_Context, /*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_7pyverbs_6device_7Context_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_Context, /*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_7pyverbs_6device_DeviceAttr(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_DeviceAttr(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_7pyverbs_6device_DeviceAttr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_DeviceAttr);
}

static int __pyx_tp_traverse_7pyverbs_6device_DeviceAttr(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_DeviceAttr); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_DeviceAttr(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_DeviceAttr); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_fw_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_10fw_version_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_node_guid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_9node_guid_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_sys_image_guid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_14sys_image_guid_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mr_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_11max_mr_size_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_page_size_cap(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_13page_size_cap_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_vendor_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_9vendor_id_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_vendor_part_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_14vendor_part_id_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_hw_ver(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6hw_ver_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_qp_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp_wr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_9max_qp_wr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_device_cap_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_16device_cap_flags_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_sge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_7max_sge_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_sge_rd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_10max_sge_rd_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_cq(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_cq_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_cqe(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_7max_cqe_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_mr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_pd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_pd_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp_rd_atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_14max_qp_rd_atom_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ee_rd_atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_14max_ee_rd_atom_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_res_rd_atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_15max_res_rd_atom_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp_init_rd_atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_19max_qp_init_rd_atom_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ee_init_rd_atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_19max_ee_init_rd_atom_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_atomic_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_11atomic_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ee(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_ee_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_rdd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_7max_rdd_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_mw_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_raw_ipv6_qps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_16max_raw_ipv6_qps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_raw_ethy_qp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_15max_raw_ethy_qp_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mcast_grp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_13max_mcast_grp_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mcast_qp_attach(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_19max_mcast_qp_attach_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ah(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_6max_ah_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_fmr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_7max_fmr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_map_per_fmr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_15max_map_per_fmr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_srq(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_7max_srq_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_srq_wr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_10max_srq_wr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_srq_sge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_11max_srq_sge_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_max_pkeys(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_9max_pkeys_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_local_ca_ack_delay(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_18local_ca_ack_delay_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_10DeviceAttr_phys_port_cnt(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10DeviceAttr_13phys_port_cnt_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_DeviceAttr[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10DeviceAttr_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10DeviceAttr_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_DeviceAttr[] = {
  {"fw_version", __pyx_getprop_7pyverbs_6device_10DeviceAttr_fw_version, 0, 0, 0},
  {"node_guid", __pyx_getprop_7pyverbs_6device_10DeviceAttr_node_guid, 0, 0, 0},
  {"sys_image_guid", __pyx_getprop_7pyverbs_6device_10DeviceAttr_sys_image_guid, 0, 0, 0},
  {"max_mr_size", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mr_size, 0, 0, 0},
  {"page_size_cap", __pyx_getprop_7pyverbs_6device_10DeviceAttr_page_size_cap, 0, 0, 0},
  {"vendor_id", __pyx_getprop_7pyverbs_6device_10DeviceAttr_vendor_id, 0, 0, 0},
  {"vendor_part_id", __pyx_getprop_7pyverbs_6device_10DeviceAttr_vendor_part_id, 0, 0, 0},
  {"hw_ver", __pyx_getprop_7pyverbs_6device_10DeviceAttr_hw_ver, 0, 0, 0},
  {"max_qp", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp, 0, 0, 0},
  {"max_qp_wr", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp_wr, 0, 0, 0},
  {"device_cap_flags", __pyx_getprop_7pyverbs_6device_10DeviceAttr_device_cap_flags, 0, 0, 0},
  {"max_sge", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_sge, 0, 0, 0},
  {"max_sge_rd", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_sge_rd, 0, 0, 0},
  {"max_cq", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_cq, 0, 0, 0},
  {"max_cqe", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_cqe, 0, 0, 0},
  {"max_mr", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mr, 0, 0, 0},
  {"max_pd", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_pd, 0, 0, 0},
  {"max_qp_rd_atom", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp_rd_atom, 0, 0, 0},
  {"max_ee_rd_atom", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ee_rd_atom, 0, 0, 0},
  {"max_res_rd_atom", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_res_rd_atom, 0, 0, 0},
  {"max_qp_init_rd_atom", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_qp_init_rd_atom, 0, 0, 0},
  {"max_ee_init_rd_atom", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ee_init_rd_atom, 0, 0, 0},
  {"atomic_caps", __pyx_getprop_7pyverbs_6device_10DeviceAttr_atomic_caps, 0, 0, 0},
  {"max_ee", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ee, 0, 0, 0},
  {"max_rdd", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_rdd, 0, 0, 0},
  {"max_mw", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mw, 0, 0, 0},
  {"max_raw_ipv6_qps", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_raw_ipv6_qps, 0, 0, 0},
  {"max_raw_ethy_qp", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_raw_ethy_qp, 0, 0, 0},
  {"max_mcast_grp", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mcast_grp, 0, 0, 0},
  {"max_mcast_qp_attach", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_mcast_qp_attach, 0, 0, 0},
  {"max_ah", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_ah, 0, 0, 0},
  {"max_fmr", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_fmr, 0, 0, 0},
  {"max_map_per_fmr", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_map_per_fmr, 0, 0, 0},
  {"max_srq", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_srq, 0, 0, 0},
  {"max_srq_wr", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_srq_wr, 0, 0, 0},
  {"max_srq_sge", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_srq_sge, 0, 0, 0},
  {"max_pkeys", __pyx_getprop_7pyverbs_6device_10DeviceAttr_max_pkeys, 0, 0, 0},
  {"local_ca_ack_delay", __pyx_getprop_7pyverbs_6device_10DeviceAttr_local_ca_ack_delay, 0, 0, 0},
  {"phys_port_cnt", __pyx_getprop_7pyverbs_6device_10DeviceAttr_phys_port_cnt, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_DeviceAttr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_DeviceAttr},
  {Py_tp_str, (void *)__pyx_pw_7pyverbs_6device_10DeviceAttr_1__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    DeviceAttr represents ibv_device_attr C class. It exposes the same\n    properties (read only) and also provides an __str__() function for\n    readability.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_DeviceAttr},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_DeviceAttr},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_DeviceAttr},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_DeviceAttr},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_DeviceAttr},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_DeviceAttr_spec = {
  "pyverbs.device.DeviceAttr",
  sizeof(struct __pyx_obj_7pyverbs_6device_DeviceAttr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_DeviceAttr_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_DeviceAttr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""DeviceAttr", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_DeviceAttr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_DeviceAttr, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyverbs_6device_10DeviceAttr_1__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    DeviceAttr represents ibv_device_attr C class. It exposes the same\n    properties (read only) and also provides an __str__() function for\n    readability.\n    "), /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_DeviceAttr, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_DeviceAttr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_DeviceAttr, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_DeviceAttr, /*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_7pyverbs_6device_DeviceAttr, /*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_7pyverbs_6device_QueryDeviceExInput(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_QueryDeviceExInput(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_7pyverbs_6device_QueryDeviceExInput) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_QueryDeviceExInput);
}

static int __pyx_tp_traverse_7pyverbs_6device_QueryDeviceExInput(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_QueryDeviceExInput); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_QueryDeviceExInput(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_QueryDeviceExInput); }
  return 0;
}

static PyMethodDef __pyx_methods_7pyverbs_6device_QueryDeviceExInput[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_QueryDeviceExInput_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_QueryDeviceExInput},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_QueryDeviceExInput},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_QueryDeviceExInput},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_QueryDeviceExInput},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_18QueryDeviceExInput_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_QueryDeviceExInput},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_QueryDeviceExInput_spec = {
  "pyverbs.device.QueryDeviceExInput",
  sizeof(struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_QueryDeviceExInput_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_QueryDeviceExInput = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""QueryDeviceExInput", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_QueryDeviceExInput, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_QueryDeviceExInput, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_QueryDeviceExInput, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_QueryDeviceExInput, /*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_7pyverbs_6device_18QueryDeviceExInput_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_QueryDeviceExInput, /*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_7pyverbs_6device_ODPCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyverbs_6device_ODPCaps *p;
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyverbs_6device_ODPCaps *)o);
  p->xrc_odp_caps = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_ODPCaps(PyObject *o) {
  struct __pyx_obj_7pyverbs_6device_ODPCaps *p = (struct __pyx_obj_7pyverbs_6device_ODPCaps *)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_7pyverbs_6device_ODPCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->xrc_odp_caps);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_ODPCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_ODPCaps(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7pyverbs_6device_ODPCaps *p = (struct __pyx_obj_7pyverbs_6device_ODPCaps *)o;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_ODPCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  if (p->xrc_odp_caps) {
    e = (*v)(p->xrc_odp_caps, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_ODPCaps(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7pyverbs_6device_ODPCaps *p = (struct __pyx_obj_7pyverbs_6device_ODPCaps *)o;
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_ODPCaps); }
  tmp = ((PyObject*)p->xrc_odp_caps);
  p->xrc_odp_caps = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_7ODPCaps_general_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7ODPCaps_12general_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7ODPCaps_rc_odp_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7ODPCaps_11rc_odp_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7ODPCaps_uc_odp_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7ODPCaps_11uc_odp_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7ODPCaps_ud_odp_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7ODPCaps_11ud_odp_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7ODPCaps_xrc_odp_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_1__get__(o);
}

static int __pyx_setprop_7pyverbs_6device_7ODPCaps_xrc_odp_caps(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyverbs_6device_7ODPCaps_12xrc_odp_caps_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7pyverbs_6device_ODPCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7ODPCaps_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7ODPCaps_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_ODPCaps[] = {
  {"general_caps", __pyx_getprop_7pyverbs_6device_7ODPCaps_general_caps, 0, 0, 0},
  {"rc_odp_caps", __pyx_getprop_7pyverbs_6device_7ODPCaps_rc_odp_caps, 0, 0, 0},
  {"uc_odp_caps", __pyx_getprop_7pyverbs_6device_7ODPCaps_uc_odp_caps, 0, 0, 0},
  {"ud_odp_caps", __pyx_getprop_7pyverbs_6device_7ODPCaps_ud_odp_caps, 0, 0, 0},
  {"xrc_odp_caps", __pyx_getprop_7pyverbs_6device_7ODPCaps_xrc_odp_caps, __pyx_setprop_7pyverbs_6device_7ODPCaps_xrc_odp_caps, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_ODPCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_ODPCaps},
  {Py_tp_str, (void *)__pyx_pw_7pyverbs_6device_7ODPCaps_1__str__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_ODPCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_ODPCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_ODPCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_ODPCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_ODPCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_ODPCaps_spec = {
  "pyverbs.device.ODPCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_ODPCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_ODPCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_ODPCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""ODPCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_ODPCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_ODPCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyverbs_6device_7ODPCaps_1__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_ODPCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_ODPCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_ODPCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_ODPCaps, /*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_7pyverbs_6device_ODPCaps, /*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_7pyverbs_6device_RSSCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_RSSCaps(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_7pyverbs_6device_RSSCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_RSSCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_RSSCaps(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_RSSCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_RSSCaps(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_RSSCaps); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_7RSSCaps_supported_qpts(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7RSSCaps_14supported_qpts_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7RSSCaps_max_rwq_indirection_tables(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7RSSCaps_26max_rwq_indirection_tables_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7RSSCaps_rx_hash_fields_mask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7RSSCaps_19rx_hash_fields_mask_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7RSSCaps_rx_hash_function(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7RSSCaps_16rx_hash_function_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7RSSCaps_max_rwq_indirection_table_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7RSSCaps_30max_rwq_indirection_table_size_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_RSSCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7RSSCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7RSSCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_RSSCaps[] = {
  {"supported_qpts", __pyx_getprop_7pyverbs_6device_7RSSCaps_supported_qpts, 0, 0, 0},
  {"max_rwq_indirection_tables", __pyx_getprop_7pyverbs_6device_7RSSCaps_max_rwq_indirection_tables, 0, 0, 0},
  {"rx_hash_fields_mask", __pyx_getprop_7pyverbs_6device_7RSSCaps_rx_hash_fields_mask, 0, 0, 0},
  {"rx_hash_function", __pyx_getprop_7pyverbs_6device_7RSSCaps_rx_hash_function, 0, 0, 0},
  {"max_rwq_indirection_table_size", __pyx_getprop_7pyverbs_6device_7RSSCaps_max_rwq_indirection_table_size, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_RSSCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_RSSCaps},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_RSSCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_RSSCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_RSSCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_RSSCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_RSSCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_RSSCaps_spec = {
  "pyverbs.device.RSSCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_RSSCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_RSSCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_RSSCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""RSSCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_RSSCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_RSSCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_RSSCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_RSSCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_RSSCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_RSSCaps, /*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_7pyverbs_6device_RSSCaps, /*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_7pyverbs_6device_PacketPacingCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_PacketPacingCaps(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_7pyverbs_6device_PacketPacingCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_PacketPacingCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_PacketPacingCaps(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_PacketPacingCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_PacketPacingCaps(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_PacketPacingCaps); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_16PacketPacingCaps_qp_rate_limit_min(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_min_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_16PacketPacingCaps_qp_rate_limit_max(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_16PacketPacingCaps_17qp_rate_limit_max_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_16PacketPacingCaps_supported_qpts(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_16PacketPacingCaps_14supported_qpts_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_PacketPacingCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16PacketPacingCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16PacketPacingCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_PacketPacingCaps[] = {
  {"qp_rate_limit_min", __pyx_getprop_7pyverbs_6device_16PacketPacingCaps_qp_rate_limit_min, 0, 0, 0},
  {"qp_rate_limit_max", __pyx_getprop_7pyverbs_6device_16PacketPacingCaps_qp_rate_limit_max, 0, 0, 0},
  {"supported_qpts", __pyx_getprop_7pyverbs_6device_16PacketPacingCaps_supported_qpts, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_PacketPacingCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_PacketPacingCaps},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_PacketPacingCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_PacketPacingCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_PacketPacingCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_PacketPacingCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_PacketPacingCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_PacketPacingCaps_spec = {
  "pyverbs.device.PacketPacingCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_PacketPacingCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_PacketPacingCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""PacketPacingCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_PacketPacingCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_PacketPacingCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_PacketPacingCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_PacketPacingCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_PacketPacingCaps, /*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_7pyverbs_6device_PacketPacingCaps, /*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_7pyverbs_6device_PCIAtomicCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_PCIAtomicCaps(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_7pyverbs_6device_PCIAtomicCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_PCIAtomicCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_PCIAtomicCaps(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_PCIAtomicCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_PCIAtomicCaps(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_PCIAtomicCaps); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_13PCIAtomicCaps_fetch_add(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_13PCIAtomicCaps_9fetch_add_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_13PCIAtomicCaps_swap(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_13PCIAtomicCaps_4swap_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_13PCIAtomicCaps_compare_swap(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_13PCIAtomicCaps_12compare_swap_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_PCIAtomicCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_13PCIAtomicCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_PCIAtomicCaps[] = {
  {"fetch_add", __pyx_getprop_7pyverbs_6device_13PCIAtomicCaps_fetch_add, 0, 0, 0},
  {"swap", __pyx_getprop_7pyverbs_6device_13PCIAtomicCaps_swap, 0, 0, 0},
  {"compare_swap", __pyx_getprop_7pyverbs_6device_13PCIAtomicCaps_compare_swap, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_PCIAtomicCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_PCIAtomicCaps},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_PCIAtomicCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_PCIAtomicCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_PCIAtomicCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_PCIAtomicCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_PCIAtomicCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_PCIAtomicCaps_spec = {
  "pyverbs.device.PCIAtomicCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_PCIAtomicCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_PCIAtomicCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""PCIAtomicCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_PCIAtomicCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_PCIAtomicCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_PCIAtomicCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_PCIAtomicCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_PCIAtomicCaps, /*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_7pyverbs_6device_PCIAtomicCaps, /*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_7pyverbs_6device_TMCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_TMCaps(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_7pyverbs_6device_TMCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_TMCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_TMCaps(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_TMCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_TMCaps(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_TMCaps); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_6TMCaps_max_rndv_hdr_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_6TMCaps_17max_rndv_hdr_size_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_6TMCaps_max_num_tags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_6TMCaps_12max_num_tags_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_6TMCaps_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_6TMCaps_5flags_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_6TMCaps_max_ops(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_6TMCaps_7max_ops_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_6TMCaps_max_sge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_6TMCaps_7max_sge_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_TMCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6TMCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_6TMCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_TMCaps[] = {
  {"max_rndv_hdr_size", __pyx_getprop_7pyverbs_6device_6TMCaps_max_rndv_hdr_size, 0, 0, 0},
  {"max_num_tags", __pyx_getprop_7pyverbs_6device_6TMCaps_max_num_tags, 0, 0, 0},
  {"flags", __pyx_getprop_7pyverbs_6device_6TMCaps_flags, 0, 0, 0},
  {"max_ops", __pyx_getprop_7pyverbs_6device_6TMCaps_max_ops, 0, 0, 0},
  {"max_sge", __pyx_getprop_7pyverbs_6device_6TMCaps_max_sge, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_TMCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_TMCaps},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_TMCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_TMCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_TMCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_TMCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_TMCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_TMCaps_spec = {
  "pyverbs.device.TMCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_TMCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_TMCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_TMCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""TMCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_TMCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_TMCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_TMCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_TMCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_TMCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_TMCaps, /*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_7pyverbs_6device_TMCaps, /*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_7pyverbs_6device_CQModerationCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_CQModerationCaps(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_7pyverbs_6device_CQModerationCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_CQModerationCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_CQModerationCaps(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_CQModerationCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_CQModerationCaps(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_CQModerationCaps); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_16CQModerationCaps_max_cq_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_16CQModerationCaps_12max_cq_count_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_16CQModerationCaps_max_cq_period(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_16CQModerationCaps_13max_cq_period_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_CQModerationCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16CQModerationCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_16CQModerationCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_CQModerationCaps[] = {
  {"max_cq_count", __pyx_getprop_7pyverbs_6device_16CQModerationCaps_max_cq_count, 0, 0, 0},
  {"max_cq_period", __pyx_getprop_7pyverbs_6device_16CQModerationCaps_max_cq_period, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_CQModerationCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_CQModerationCaps},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_CQModerationCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_CQModerationCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_CQModerationCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_CQModerationCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_CQModerationCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_CQModerationCaps_spec = {
  "pyverbs.device.CQModerationCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_CQModerationCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_CQModerationCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_CQModerationCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""CQModerationCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_CQModerationCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_CQModerationCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_CQModerationCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_CQModerationCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_CQModerationCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_CQModerationCaps, /*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_7pyverbs_6device_CQModerationCaps, /*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_7pyverbs_6device_TSOCaps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_TSOCaps(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_7pyverbs_6device_TSOCaps) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_TSOCaps);
}

static int __pyx_tp_traverse_7pyverbs_6device_TSOCaps(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_TSOCaps); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_TSOCaps(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_TSOCaps); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_7TSOCaps_max_tso(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7TSOCaps_7max_tso_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_7TSOCaps_supported_qpts(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_7TSOCaps_14supported_qpts_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_TSOCaps[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7TSOCaps_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_7TSOCaps_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_TSOCaps[] = {
  {"max_tso", __pyx_getprop_7pyverbs_6device_7TSOCaps_max_tso, 0, 0, 0},
  {"supported_qpts", __pyx_getprop_7pyverbs_6device_7TSOCaps_supported_qpts, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_TSOCaps_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_TSOCaps},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_TSOCaps},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_TSOCaps},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_TSOCaps},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_TSOCaps},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_TSOCaps},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_TSOCaps_spec = {
  "pyverbs.device.TSOCaps",
  sizeof(struct __pyx_obj_7pyverbs_6device_TSOCaps),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_TSOCaps_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_TSOCaps = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""TSOCaps", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_TSOCaps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_TSOCaps, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_TSOCaps, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_TSOCaps, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_TSOCaps, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_TSOCaps, /*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_7pyverbs_6device_TSOCaps, /*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_7pyverbs_6device_DeviceAttrEx(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_DeviceAttrEx(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_7pyverbs_6device_DeviceAttrEx) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_DeviceAttrEx);
}

static int __pyx_tp_traverse_7pyverbs_6device_DeviceAttrEx(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_DeviceAttrEx); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_DeviceAttrEx(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_DeviceAttrEx); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_orig_attr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_9orig_attr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_comp_mask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_9comp_mask_1__get__(o);
}

static int __pyx_setprop_7pyverbs_6device_12DeviceAttrEx_comp_mask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_9comp_mask_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_odp_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_8odp_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_completion_timestamp_mask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_25completion_timestamp_mask_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_hca_core_clock(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_14hca_core_clock_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_device_cap_flags_ex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_19device_cap_flags_ex_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_tso_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_8tso_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_pci_atomic_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_15pci_atomic_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_rss_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_8rss_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_max_wq_type_rq(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_14max_wq_type_rq_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_packet_pacing_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_18packet_pacing_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_raw_packet_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_15raw_packet_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_tm_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_7tm_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_cq_mod_caps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_11cq_mod_caps_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_max_dm_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_11max_dm_size_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_12DeviceAttrEx_phys_port_cnt_ex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_12DeviceAttrEx_16phys_port_cnt_ex_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_DeviceAttrEx[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_12DeviceAttrEx_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_12DeviceAttrEx_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_DeviceAttrEx[] = {
  {"orig_attr", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_orig_attr, 0, 0, 0},
  {"comp_mask", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_comp_mask, __pyx_setprop_7pyverbs_6device_12DeviceAttrEx_comp_mask, 0, 0},
  {"odp_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_odp_caps, 0, 0, 0},
  {"completion_timestamp_mask", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_completion_timestamp_mask, 0, 0, 0},
  {"hca_core_clock", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_hca_core_clock, 0, 0, 0},
  {"device_cap_flags_ex", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_device_cap_flags_ex, 0, 0, 0},
  {"tso_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_tso_caps, 0, 0, 0},
  {"pci_atomic_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_pci_atomic_caps, 0, 0, 0},
  {"rss_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_rss_caps, 0, 0, 0},
  {"max_wq_type_rq", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_max_wq_type_rq, 0, 0, 0},
  {"packet_pacing_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_packet_pacing_caps, 0, 0, 0},
  {"raw_packet_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_raw_packet_caps, 0, 0, 0},
  {"tm_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_tm_caps, 0, 0, 0},
  {"cq_mod_caps", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_cq_mod_caps, 0, 0, 0},
  {"max_dm_size", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_max_dm_size, 0, 0, 0},
  {"phys_port_cnt_ex", __pyx_getprop_7pyverbs_6device_12DeviceAttrEx_phys_port_cnt_ex, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_DeviceAttrEx_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_DeviceAttrEx},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_DeviceAttrEx},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_DeviceAttrEx},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_DeviceAttrEx},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_DeviceAttrEx},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_DeviceAttrEx},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_DeviceAttrEx_spec = {
  "pyverbs.device.DeviceAttrEx",
  sizeof(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_DeviceAttrEx_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_DeviceAttrEx = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""DeviceAttrEx", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_DeviceAttrEx, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_DeviceAttrEx, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_DeviceAttrEx, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_DeviceAttrEx, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_DeviceAttrEx, /*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_7pyverbs_6device_DeviceAttrEx, /*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_7pyverbs_6device_AllocDmAttr(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_AllocDmAttr(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_7pyverbs_6device_AllocDmAttr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_AllocDmAttr);
}

static int __pyx_tp_traverse_7pyverbs_6device_AllocDmAttr(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_AllocDmAttr); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_AllocDmAttr(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_AllocDmAttr); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_11AllocDmAttr_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_11AllocDmAttr_6length_1__get__(o);
}

static int __pyx_setprop_7pyverbs_6device_11AllocDmAttr_length(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyverbs_6device_11AllocDmAttr_6length_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyverbs_6device_11AllocDmAttr_log_align_req(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_11AllocDmAttr_13log_align_req_1__get__(o);
}

static int __pyx_setprop_7pyverbs_6device_11AllocDmAttr_log_align_req(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyverbs_6device_11AllocDmAttr_13log_align_req_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyverbs_6device_11AllocDmAttr_comp_mask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_11AllocDmAttr_9comp_mask_1__get__(o);
}

static int __pyx_setprop_7pyverbs_6device_11AllocDmAttr_comp_mask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyverbs_6device_11AllocDmAttr_9comp_mask_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7pyverbs_6device_AllocDmAttr[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_11AllocDmAttr_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_11AllocDmAttr_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_AllocDmAttr[] = {
  {"length", __pyx_getprop_7pyverbs_6device_11AllocDmAttr_length, __pyx_setprop_7pyverbs_6device_11AllocDmAttr_length, 0, 0},
  {"log_align_req", __pyx_getprop_7pyverbs_6device_11AllocDmAttr_log_align_req, __pyx_setprop_7pyverbs_6device_11AllocDmAttr_log_align_req, 0, 0},
  {"comp_mask", __pyx_getprop_7pyverbs_6device_11AllocDmAttr_comp_mask, __pyx_setprop_7pyverbs_6device_11AllocDmAttr_comp_mask, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_AllocDmAttr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_AllocDmAttr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_AllocDmAttr},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_AllocDmAttr},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_AllocDmAttr},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_AllocDmAttr},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_11AllocDmAttr_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_AllocDmAttr},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_AllocDmAttr_spec = {
  "pyverbs.device.AllocDmAttr",
  sizeof(struct __pyx_obj_7pyverbs_6device_AllocDmAttr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_AllocDmAttr_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_AllocDmAttr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""AllocDmAttr", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_AllocDmAttr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_AllocDmAttr, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_AllocDmAttr, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_AllocDmAttr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_AllocDmAttr, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_AllocDmAttr, /*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_7pyverbs_6device_11AllocDmAttr_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_AllocDmAttr, /*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_7pyverbs_6device_DM __pyx_vtable_7pyverbs_6device_DM;

static PyObject *__pyx_tp_new_7pyverbs_6device_DM(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyverbs_6device_DM *p;
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyverbs_6device_DM *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM*)__pyx_vtabptr_7pyverbs_6device_DM;
  p->dm_mrs = Py_None; Py_INCREF(Py_None);
  p->context = Py_None; Py_INCREF(Py_None);
  p->_is_imported = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_DM(PyObject *o) {
  struct __pyx_obj_7pyverbs_6device_DM *p = (struct __pyx_obj_7pyverbs_6device_DM *)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_7pyverbs_6device_DM) {
      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_7pyverbs_6device_2DM_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->dm_mrs);
  Py_CLEAR(p->context);
  Py_CLEAR(p->_is_imported);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_DM);
}

static int __pyx_tp_traverse_7pyverbs_6device_DM(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7pyverbs_6device_DM *p = (struct __pyx_obj_7pyverbs_6device_DM *)o;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_DM); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  if (p->dm_mrs) {
    e = (*v)(p->dm_mrs, a); if (e) return e;
  }
  if (p->context) {
    e = (*v)(p->context, a); if (e) return e;
  }
  if (p->_is_imported) {
    e = (*v)(p->_is_imported, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_DM(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7pyverbs_6device_DM *p = (struct __pyx_obj_7pyverbs_6device_DM *)o;
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_DM); }
  tmp = ((PyObject*)p->dm_mrs);
  p->dm_mrs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->context);
  p->context = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_is_imported);
  p->_is_imported = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_2DM_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_2DM_6handle_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_DM[] = {
  {"unimport", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_3unimport, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy_to_dm", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_9copy_to_dm, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy_from_dm", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_11copy_from_dm, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_2DM_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_DM[] = {
  {"handle", __pyx_getprop_7pyverbs_6device_2DM_handle, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_DM_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_DM},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_DM},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_DM},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_DM},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_DM},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_2DM_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_DM},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_DM_spec = {
  "pyverbs.device.DM",
  sizeof(struct __pyx_obj_7pyverbs_6device_DM),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_DM_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_DM = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""DM", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_DM), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_DM, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_DM, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_DM, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_DM, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_DM, /*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_7pyverbs_6device_2DM_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_DM, /*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_7pyverbs_6device_PortAttr(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_PortAttr(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_7pyverbs_6device_PortAttr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_PortAttr);
}

static int __pyx_tp_traverse_7pyverbs_6device_PortAttr(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_PortAttr); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_PortAttr(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_PortAttr); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_5state_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_max_mtu(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_7max_mtu_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_active_mtu(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_10active_mtu_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_gid_tbl_len(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_11gid_tbl_len_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_port_cap_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_14port_cap_flags_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_max_msg_sz(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_10max_msg_sz_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_bad_pkey_cntr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_13bad_pkey_cntr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_qkey_viol_cntr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_14qkey_viol_cntr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_pkey_tbl_len(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_12pkey_tbl_len_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_lid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_3lid_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_sm_lid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_6sm_lid_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_lmc(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_3lmc_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_max_vl_num(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_10max_vl_num_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_sm_sl(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_5sm_sl_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_subnet_timeout(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_14subnet_timeout_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_init_type_reply(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_15init_type_reply_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_active_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_12active_width_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_active_speed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_12active_speed_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_phys_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_10phys_state_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_link_layer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_10link_layer_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_5flags_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_port_cap_flags2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_15port_cap_flags2_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8PortAttr_active_speed_ex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8PortAttr_15active_speed_ex_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_PortAttr[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8PortAttr_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8PortAttr_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_PortAttr[] = {
  {"state", __pyx_getprop_7pyverbs_6device_8PortAttr_state, 0, 0, 0},
  {"max_mtu", __pyx_getprop_7pyverbs_6device_8PortAttr_max_mtu, 0, 0, 0},
  {"active_mtu", __pyx_getprop_7pyverbs_6device_8PortAttr_active_mtu, 0, 0, 0},
  {"gid_tbl_len", __pyx_getprop_7pyverbs_6device_8PortAttr_gid_tbl_len, 0, 0, 0},
  {"port_cap_flags", __pyx_getprop_7pyverbs_6device_8PortAttr_port_cap_flags, 0, 0, 0},
  {"max_msg_sz", __pyx_getprop_7pyverbs_6device_8PortAttr_max_msg_sz, 0, 0, 0},
  {"bad_pkey_cntr", __pyx_getprop_7pyverbs_6device_8PortAttr_bad_pkey_cntr, 0, 0, 0},
  {"qkey_viol_cntr", __pyx_getprop_7pyverbs_6device_8PortAttr_qkey_viol_cntr, 0, 0, 0},
  {"pkey_tbl_len", __pyx_getprop_7pyverbs_6device_8PortAttr_pkey_tbl_len, 0, 0, 0},
  {"lid", __pyx_getprop_7pyverbs_6device_8PortAttr_lid, 0, 0, 0},
  {"sm_lid", __pyx_getprop_7pyverbs_6device_8PortAttr_sm_lid, 0, 0, 0},
  {"lmc", __pyx_getprop_7pyverbs_6device_8PortAttr_lmc, 0, 0, 0},
  {"max_vl_num", __pyx_getprop_7pyverbs_6device_8PortAttr_max_vl_num, 0, 0, 0},
  {"sm_sl", __pyx_getprop_7pyverbs_6device_8PortAttr_sm_sl, 0, 0, 0},
  {"subnet_timeout", __pyx_getprop_7pyverbs_6device_8PortAttr_subnet_timeout, 0, 0, 0},
  {"init_type_reply", __pyx_getprop_7pyverbs_6device_8PortAttr_init_type_reply, 0, 0, 0},
  {"active_width", __pyx_getprop_7pyverbs_6device_8PortAttr_active_width, 0, 0, 0},
  {"active_speed", __pyx_getprop_7pyverbs_6device_8PortAttr_active_speed, 0, 0, 0},
  {"phys_state", __pyx_getprop_7pyverbs_6device_8PortAttr_phys_state, 0, 0, 0},
  {"link_layer", __pyx_getprop_7pyverbs_6device_8PortAttr_link_layer, 0, 0, 0},
  {"flags", __pyx_getprop_7pyverbs_6device_8PortAttr_flags, 0, 0, 0},
  {"port_cap_flags2", __pyx_getprop_7pyverbs_6device_8PortAttr_port_cap_flags2, 0, 0, 0},
  {"active_speed_ex", __pyx_getprop_7pyverbs_6device_8PortAttr_active_speed_ex, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_PortAttr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_PortAttr},
  {Py_tp_str, (void *)__pyx_pw_7pyverbs_6device_8PortAttr_1__str__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_PortAttr},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_PortAttr},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_PortAttr},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_PortAttr},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_PortAttr},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_PortAttr_spec = {
  "pyverbs.device.PortAttr",
  sizeof(struct __pyx_obj_7pyverbs_6device_PortAttr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_PortAttr_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_PortAttr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""PortAttr", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_PortAttr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_PortAttr, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyverbs_6device_8PortAttr_1__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_PortAttr, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_PortAttr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_PortAttr, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_PortAttr, /*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_7pyverbs_6device_PortAttr, /*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_7pyverbs_6device_GIDEntry(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_GIDEntry(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_7pyverbs_6device_GIDEntry) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_GIDEntry);
}

static int __pyx_tp_traverse_7pyverbs_6device_GIDEntry(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_GIDEntry); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_GIDEntry(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_GIDEntry); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_8GIDEntry_gid_subnet_prefix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8GIDEntry_17gid_subnet_prefix_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8GIDEntry_gid_interface_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8GIDEntry_16gid_interface_id_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8GIDEntry_gid_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8GIDEntry_9gid_index_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8GIDEntry_port_num(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8GIDEntry_8port_num_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8GIDEntry_gid_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8GIDEntry_8gid_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_8GIDEntry_ndev_ifindex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_8GIDEntry_12ndev_ifindex_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_GIDEntry[] = {
  {"gid_str", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8GIDEntry_3gid_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8GIDEntry_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_8GIDEntry_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_GIDEntry[] = {
  {"gid_subnet_prefix", __pyx_getprop_7pyverbs_6device_8GIDEntry_gid_subnet_prefix, 0, 0, 0},
  {"gid_interface_id", __pyx_getprop_7pyverbs_6device_8GIDEntry_gid_interface_id, 0, 0, 0},
  {"gid_index", __pyx_getprop_7pyverbs_6device_8GIDEntry_gid_index, 0, 0, 0},
  {"port_num", __pyx_getprop_7pyverbs_6device_8GIDEntry_port_num, 0, 0, 0},
  {"gid_type", __pyx_getprop_7pyverbs_6device_8GIDEntry_gid_type, 0, 0, 0},
  {"ndev_ifindex", __pyx_getprop_7pyverbs_6device_8GIDEntry_ndev_ifindex, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_GIDEntry_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_GIDEntry},
  {Py_tp_str, (void *)__pyx_pw_7pyverbs_6device_8GIDEntry_5__str__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_GIDEntry},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_GIDEntry},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_GIDEntry},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_GIDEntry},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_8GIDEntry_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_GIDEntry},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_GIDEntry_spec = {
  "pyverbs.device.GIDEntry",
  sizeof(struct __pyx_obj_7pyverbs_6device_GIDEntry),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_GIDEntry_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_GIDEntry = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""GIDEntry", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_GIDEntry), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_GIDEntry, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyverbs_6device_8GIDEntry_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_GIDEntry, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_GIDEntry, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_GIDEntry, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_GIDEntry, /*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_7pyverbs_6device_8GIDEntry_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_GIDEntry, /*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_7pyverbs_6device_AsyncEvent(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_AsyncEvent(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_7pyverbs_6device_AsyncEvent) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_AsyncEvent);
}

static int __pyx_tp_traverse_7pyverbs_6device_AsyncEvent(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_AsyncEvent); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_AsyncEvent(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_AsyncEvent); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_10AsyncEvent_event_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_10AsyncEvent_10event_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_AsyncEvent[] = {
  {"ack", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10AsyncEvent_3ack, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10AsyncEvent_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_10AsyncEvent_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_AsyncEvent[] = {
  {"event_type", __pyx_getprop_7pyverbs_6device_10AsyncEvent_event_type, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_AsyncEvent_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_AsyncEvent},
  {Py_tp_str, (void *)__pyx_pw_7pyverbs_6device_10AsyncEvent_5__str__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_AsyncEvent},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_AsyncEvent},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_AsyncEvent},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_AsyncEvent},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_10AsyncEvent_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_AsyncEvent},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_AsyncEvent_spec = {
  "pyverbs.device.AsyncEvent",
  sizeof(struct __pyx_obj_7pyverbs_6device_AsyncEvent),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_AsyncEvent_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_AsyncEvent = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""AsyncEvent", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_AsyncEvent), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_AsyncEvent, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyverbs_6device_10AsyncEvent_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_AsyncEvent, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_AsyncEvent, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_AsyncEvent, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_AsyncEvent, /*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_7pyverbs_6device_10AsyncEvent_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_AsyncEvent, /*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_7pyverbs_6device_FdArr __pyx_vtable_7pyverbs_6device_FdArr;

static PyObject *__pyx_tp_new_7pyverbs_6device_FdArr(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyverbs_6device_FdArr *p;
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyverbs_6device_FdArr *)o);
  p->__pyx_vtab = __pyx_vtabptr_7pyverbs_6device_FdArr;
  return o;
}

static void __pyx_tp_dealloc_7pyverbs_6device_FdArr(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_7pyverbs_6device_FdArr) {
      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_7pyverbs_6device_5FdArr_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7pyverbs_6device_FdArr);
}

static int __pyx_tp_traverse_7pyverbs_6device_FdArr(PyObject *o, visitproc v, void *a) {
  int e;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyverbs_6device_FdArr); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyverbs_6device_FdArr(PyObject *o) {
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyverbs_6device_FdArr); }
  return 0;
}

static PyObject *__pyx_getprop_7pyverbs_6device_5FdArr_arr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_5FdArr_3arr_1__get__(o);
}

static PyObject *__pyx_getprop_7pyverbs_6device_5FdArr_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyverbs_6device_5FdArr_5count_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyverbs_6device_FdArr[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_5FdArr_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyverbs_6device_5FdArr_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyverbs_6device_FdArr[] = {
  {"arr", __pyx_getprop_7pyverbs_6device_5FdArr_arr, 0, 0, 0},
  {"count", __pyx_getprop_7pyverbs_6device_5FdArr_count, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyverbs_6device_FdArr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyverbs_6device_FdArr},
  {Py_tp_str, (void *)__pyx_pw_7pyverbs_6device_5FdArr_7__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Represent ibv_fd_arr struct. This class is used a pointer to the file descriptor array\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyverbs_6device_FdArr},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyverbs_6device_FdArr},
  {Py_tp_methods, (void *)__pyx_methods_7pyverbs_6device_FdArr},
  {Py_tp_getset, (void *)__pyx_getsets_7pyverbs_6device_FdArr},
  {Py_tp_init, (void *)__pyx_pw_7pyverbs_6device_5FdArr_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyverbs_6device_FdArr},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyverbs_6device_FdArr_spec = {
  "pyverbs.device.FdArr",
  sizeof(struct __pyx_obj_7pyverbs_6device_FdArr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyverbs_6device_FdArr_slots,
};
#else

static PyTypeObject __pyx_type_7pyverbs_6device_FdArr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyverbs.device.""FdArr", /*tp_name*/
  sizeof(struct __pyx_obj_7pyverbs_6device_FdArr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyverbs_6device_FdArr, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyverbs_6device_5FdArr_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Represent ibv_fd_arr struct. This class is used a pointer to the file descriptor array\n    "), /*tp_doc*/
  __pyx_tp_traverse_7pyverbs_6device_FdArr, /*tp_traverse*/
  __pyx_tp_clear_7pyverbs_6device_FdArr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyverbs_6device_FdArr, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyverbs_6device_FdArr, /*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_7pyverbs_6device_5FdArr_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyverbs_6device_FdArr, /*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 ---*/
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = Py_None; Py_INCREF(Py_None);
  __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py = 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;
  PyObject *__pyx_t_2 = 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 ---*/
  __pyx_t_1 = PyImport_ImportModule("pyverbs.base"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_4base_PyverbsCM = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.base", "PyverbsCM",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4base_PyverbsCM), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4base_PyverbsCM),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4base_PyverbsCM), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4base_PyverbsCM),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4base_PyverbsCM), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4base_PyverbsCM),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4base_PyverbsCM) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4base_PyverbsCM = (struct __pyx_vtabstruct_7pyverbs_4base_PyverbsCM*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4base_PyverbsCM); if (unlikely(!__pyx_vtabptr_7pyverbs_4base_PyverbsCM)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_6device_Context = &__pyx_vtable_7pyverbs_6device_Context;
  __pyx_vtable_7pyverbs_6device_Context.__pyx_base = *__pyx_vtabptr_7pyverbs_4base_PyverbsCM;
  __pyx_vtable_7pyverbs_6device_Context.__pyx_base.close = (PyObject *(*)(struct __pyx_obj_7pyverbs_4base_PyverbsCM *, int __pyx_skip_dispatch))__pyx_f_7pyverbs_6device_7Context_close;
  __pyx_vtable_7pyverbs_6device_Context.add_ref = (PyObject *(*)(struct __pyx_obj_7pyverbs_6device_Context *, PyObject *))__pyx_f_7pyverbs_6device_7Context_add_ref;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_Context_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context)) __PYX_ERR(0, 79, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_Context_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context) < (0)) __PYX_ERR(0, 79, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context = &__pyx_type_7pyverbs_6device_Context;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context) < (0)) __PYX_ERR(0, 79, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 79, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyverbs_6device_7Context___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyverbs_6device_7Context___init__.doc = __pyx_doc_7pyverbs_6device_7Context___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyverbs_6device_7Context___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context, __pyx_vtabptr_7pyverbs_6device_Context) < (0)) __PYX_ERR(0, 79, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context) < (0)) __PYX_ERR(0, 79, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Context, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context) < (0)) __PYX_ERR(0, 79, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_Context->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_Context, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_Context) < (0)) __PYX_ERR(0, 79, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4base_PyverbsObject = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.base", "PyverbsObject",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4base_PyverbsObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4base_PyverbsObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4base_PyverbsObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4base_PyverbsObject),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4base_PyverbsObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4base_PyverbsObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4base_PyverbsObject) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_DeviceAttr_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr)) __PYX_ERR(0, 372, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_DeviceAttr_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr) < (0)) __PYX_ERR(0, 372, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr = &__pyx_type_7pyverbs_6device_DeviceAttr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DeviceAttr->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr) < (0)) __PYX_ERR(0, 372, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DeviceAttr, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr) < (0)) __PYX_ERR(0, 372, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_DeviceAttr, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttr) < (0)) __PYX_ERR(0, 372, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_QueryDeviceExInput_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput)) __PYX_ERR(0, 540, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_QueryDeviceExInput_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput = &__pyx_type_7pyverbs_6device_QueryDeviceExInput;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_QueryDeviceExInput, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_QueryDeviceExInput, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_QueryDeviceExInput) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_ODPCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps)) __PYX_ERR(0, 546, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_ODPCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps) < (0)) __PYX_ERR(0, 546, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps = &__pyx_type_7pyverbs_6device_ODPCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_ODPCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps) < (0)) __PYX_ERR(0, 546, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ODPCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps) < (0)) __PYX_ERR(0, 546, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_ODPCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_ODPCaps) < (0)) __PYX_ERR(0, 546, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_RSSCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps)) __PYX_ERR(0, 608, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_RSSCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps) < (0)) __PYX_ERR(0, 608, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps = &__pyx_type_7pyverbs_6device_RSSCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_RSSCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps) < (0)) __PYX_ERR(0, 608, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RSSCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps) < (0)) __PYX_ERR(0, 608, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_RSSCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_RSSCaps) < (0)) __PYX_ERR(0, 608, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_PacketPacingCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps)) __PYX_ERR(0, 626, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_PacketPacingCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps) < (0)) __PYX_ERR(0, 626, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps = &__pyx_type_7pyverbs_6device_PacketPacingCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_PacketPacingCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps) < (0)) __PYX_ERR(0, 626, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PacketPacingCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps) < (0)) __PYX_ERR(0, 626, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_PacketPacingCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PacketPacingCaps) < (0)) __PYX_ERR(0, 626, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_PCIAtomicCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps)) __PYX_ERR(0, 587, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_PCIAtomicCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps) < (0)) __PYX_ERR(0, 587, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps = &__pyx_type_7pyverbs_6device_PCIAtomicCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps) < (0)) __PYX_ERR(0, 587, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PCIAtomicCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps) < (0)) __PYX_ERR(0, 587, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_PCIAtomicCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PCIAtomicCaps) < (0)) __PYX_ERR(0, 587, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_TMCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps)) __PYX_ERR(0, 638, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_TMCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps = &__pyx_type_7pyverbs_6device_TMCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_TMCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TMCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_TMCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_TMCaps) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_CQModerationCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps)) __PYX_ERR(0, 656, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_CQModerationCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps) < (0)) __PYX_ERR(0, 656, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps = &__pyx_type_7pyverbs_6device_CQModerationCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_CQModerationCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps) < (0)) __PYX_ERR(0, 656, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CQModerationCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps) < (0)) __PYX_ERR(0, 656, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_CQModerationCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_CQModerationCaps) < (0)) __PYX_ERR(0, 656, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_TSOCaps_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps)) __PYX_ERR(0, 599, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_TSOCaps_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps) < (0)) __PYX_ERR(0, 599, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps = &__pyx_type_7pyverbs_6device_TSOCaps;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_TSOCaps->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps) < (0)) __PYX_ERR(0, 599, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TSOCaps, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps) < (0)) __PYX_ERR(0, 599, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_TSOCaps, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_TSOCaps) < (0)) __PYX_ERR(0, 599, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_DeviceAttrEx_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx)) __PYX_ERR(0, 665, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_DeviceAttrEx_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx) < (0)) __PYX_ERR(0, 665, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx = &__pyx_type_7pyverbs_6device_DeviceAttrEx;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DeviceAttrEx->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx) < (0)) __PYX_ERR(0, 665, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DeviceAttrEx, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx) < (0)) __PYX_ERR(0, 665, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_DeviceAttrEx, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DeviceAttrEx) < (0)) __PYX_ERR(0, 665, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_AllocDmAttr_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr)) __PYX_ERR(0, 736, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_AllocDmAttr_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr) < (0)) __PYX_ERR(0, 736, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr = &__pyx_type_7pyverbs_6device_AllocDmAttr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_AllocDmAttr->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr) < (0)) __PYX_ERR(0, 736, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 736, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyverbs_6device_11AllocDmAttr___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyverbs_6device_11AllocDmAttr___init__.doc = __pyx_doc_7pyverbs_6device_11AllocDmAttr___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyverbs_6device_11AllocDmAttr___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AllocDmAttr, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr) < (0)) __PYX_ERR(0, 736, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_AllocDmAttr, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_AllocDmAttr) < (0)) __PYX_ERR(0, 736, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_6device_DM = &__pyx_vtable_7pyverbs_6device_DM;
  __pyx_vtable_7pyverbs_6device_DM.__pyx_base = *__pyx_vtabptr_7pyverbs_4base_PyverbsCM;
  __pyx_vtable_7pyverbs_6device_DM.__pyx_base.close = (PyObject *(*)(struct __pyx_obj_7pyverbs_4base_PyverbsCM *, int __pyx_skip_dispatch))__pyx_f_7pyverbs_6device_2DM_close;
  __pyx_vtable_7pyverbs_6device_DM.add_ref = (PyObject *(*)(struct __pyx_obj_7pyverbs_6device_DM *, PyObject *))__pyx_f_7pyverbs_6device_2DM_add_ref;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_DM_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM)) __PYX_ERR(0, 776, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_DM_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM = &__pyx_type_7pyverbs_6device_DM;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsCM;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 776, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyverbs_6device_2DM___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyverbs_6device_2DM___init__.doc = __pyx_doc_7pyverbs_6device_2DM___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyverbs_6device_2DM___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM, __pyx_vtabptr_7pyverbs_6device_DM) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DM, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_DM->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_DM, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_DM) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_PortAttr_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr)) __PYX_ERR(0, 862, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_PortAttr_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr) < (0)) __PYX_ERR(0, 862, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr = &__pyx_type_7pyverbs_6device_PortAttr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_PortAttr->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr) < (0)) __PYX_ERR(0, 862, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PortAttr, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr) < (0)) __PYX_ERR(0, 862, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_PortAttr, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_PortAttr) < (0)) __PYX_ERR(0, 862, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_GIDEntry_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry)) __PYX_ERR(0, 959, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_GIDEntry_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry) < (0)) __PYX_ERR(0, 959, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry = &__pyx_type_7pyverbs_6device_GIDEntry;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_GIDEntry->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry) < (0)) __PYX_ERR(0, 959, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_GIDEntry, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry) < (0)) __PYX_ERR(0, 959, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_GIDEntry, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_GIDEntry) < (0)) __PYX_ERR(0, 959, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_AsyncEvent_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent)) __PYX_ERR(0, 1007, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_AsyncEvent_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent) < (0)) __PYX_ERR(0, 1007, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent = &__pyx_type_7pyverbs_6device_AsyncEvent;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_AsyncEvent->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent) < (0)) __PYX_ERR(0, 1007, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AsyncEvent, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent) < (0)) __PYX_ERR(0, 1007, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_AsyncEvent, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_AsyncEvent) < (0)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_6device_FdArr = &__pyx_vtable_7pyverbs_6device_FdArr;
  __pyx_vtable_7pyverbs_6device_FdArr.close = (PyObject *(*)(struct __pyx_obj_7pyverbs_6device_FdArr *, int __pyx_skip_dispatch))__pyx_f_7pyverbs_6device_5FdArr_close;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyverbs_6device_FdArr_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr)) __PYX_ERR(0, 1277, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyverbs_6device_FdArr_spec, __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr) < (0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr = &__pyx_type_7pyverbs_6device_FdArr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyverbs_6device_FdArr->tp_base = __pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr) < (0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr, __pyx_vtabptr_7pyverbs_6device_FdArr) < (0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr) < (0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FdArr, (PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr) < (0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyverbs_6device_FdArr, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyverbs_6device_FdArr) < (0)) __PYX_ERR(0, 1277, __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_XDECREF(__pyx_t_2);
  __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("pyverbs.cq"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_CompChannel = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "CompChannel",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_CompChannel), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CompChannel),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_CompChannel), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CompChannel),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_CompChannel), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CompChannel),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CompChannel) __PYX_ERR(2, 9, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2cq_CompChannel = (struct __pyx_vtabstruct_7pyverbs_2cq_CompChannel*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CompChannel); if (unlikely(!__pyx_vtabptr_7pyverbs_2cq_CompChannel)) __PYX_ERR(2, 9, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_CQ = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "CQ",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_CQ), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CQ),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_CQ), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CQ),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_CQ), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CQ),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CQ) __PYX_ERR(2, 16, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2cq_CQ = (struct __pyx_vtabstruct_7pyverbs_2cq_CQ*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CQ); if (unlikely(!__pyx_vtabptr_7pyverbs_2cq_CQ)) __PYX_ERR(2, 16, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_CqInitAttrEx = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "CqInitAttrEx",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CqInitAttrEx),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CqInitAttrEx) __PYX_ERR(2, 27, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_CQEX = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "CQEX",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_CQEX), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CQEX),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_CQEX), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CQEX),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_CQEX), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_CQEX),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CQEX) __PYX_ERR(2, 32, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2cq_CQEX = (struct __pyx_vtabstruct_7pyverbs_2cq_CQEX*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2cq_CQEX); if (unlikely(!__pyx_vtabptr_7pyverbs_2cq_CQEX)) __PYX_ERR(2, 32, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_WC = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "WC",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_WC), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_WC),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_WC), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_WC),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_WC), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_WC),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_WC) __PYX_ERR(2, 42, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_PollCqAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "PollCqAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_PollCqAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_PollCqAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_PollCqAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_PollCqAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_PollCqAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_PollCqAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_PollCqAttr) __PYX_ERR(2, 45, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2cq_WcTmInfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cq", "WcTmInfo",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2cq_WcTmInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_WcTmInfo),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2cq_WcTmInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_WcTmInfo),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2cq_WcTmInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2cq_WcTmInfo),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2cq_WcTmInfo) __PYX_ERR(2, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyverbs.pd"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_2pd_PD = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.pd", "PD",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2pd_PD), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_PD),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2pd_PD), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_PD),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2pd_PD), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_PD),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2pd_PD) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2pd_PD = (struct __pyx_vtabstruct_7pyverbs_2pd_PD*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2pd_PD); if (unlikely(!__pyx_vtabptr_7pyverbs_2pd_PD)) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomainInitAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.pd", "ParentDomainInitAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomainInitAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomainInitAttr) __PYX_ERR(3, 28, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomain = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.pd", "ParentDomain",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomain), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomain),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomain), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomain),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomain), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomain),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomain) __PYX_ERR(3, 34, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2pd_ParentDomain = (struct __pyx_vtabstruct_7pyverbs_2pd_ParentDomain*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomain); if (unlikely(!__pyx_vtabptr_7pyverbs_2pd_ParentDomain)) __PYX_ERR(3, 34, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomainContext = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.pd", "ParentDomainContext",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomainContext), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomainContext),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomainContext), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomainContext),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2pd_ParentDomainContext), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2pd_ParentDomainContext),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2pd_ParentDomainContext) __PYX_ERR(3, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyverbs.wq"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQInitAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.wq", "WQInitAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQInitAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQInitAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQInitAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQInitAttr) __PYX_ERR(4, 13, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.wq", "WQAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQAttr) __PYX_ERR(4, 18, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQ = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.wq", "WQ",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQ), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQ),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQ), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQ),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2wq_WQ), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_WQ),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQ) __PYX_ERR(4, 21, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2wq_WQ = (struct __pyx_vtabstruct_7pyverbs_2wq_WQ*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2wq_WQ); if (unlikely(!__pyx_vtabptr_7pyverbs_2wq_WQ)) __PYX_ERR(4, 21, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2wq_RwqIndTableInitAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.wq", "RwqIndTableInitAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RwqIndTableInitAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2wq_RwqIndTableInitAttr) __PYX_ERR(4, 29, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2wq_RwqIndTable = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.wq", "RwqIndTable",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2wq_RwqIndTable), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RwqIndTable),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2wq_RwqIndTable), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RwqIndTable),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2wq_RwqIndTable), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RwqIndTable),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2wq_RwqIndTable) __PYX_ERR(4, 33, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2wq_RwqIndTable = (struct __pyx_vtabstruct_7pyverbs_2wq_RwqIndTable*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2wq_RwqIndTable); if (unlikely(!__pyx_vtabptr_7pyverbs_2wq_RwqIndTable)) __PYX_ERR(4, 33, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2wq_RxHashConf = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.wq", "RxHashConf",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2wq_RxHashConf), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RxHashConf),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2wq_RxHashConf), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RxHashConf),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2wq_RxHashConf), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2wq_RxHashConf),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2wq_RxHashConf) __PYX_ERR(4, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyverbs.cmid"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMID = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "CMID",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMID), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMID),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMID), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMID),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMID), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMID),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMID) __PYX_ERR(5, 10, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4cmid_CMID = (struct __pyx_vtabstruct_7pyverbs_4cmid_CMID*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMID); if (unlikely(!__pyx_vtabptr_7pyverbs_4cmid_CMID)) __PYX_ERR(5, 10, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMEventChannel = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "CMEventChannel",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMEventChannel),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMEventChannel) __PYX_ERR(5, 20, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4cmid_CMEventChannel = (struct __pyx_vtabstruct_7pyverbs_4cmid_CMEventChannel*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMEventChannel); if (unlikely(!__pyx_vtabptr_7pyverbs_4cmid_CMEventChannel)) __PYX_ERR(5, 20, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMEvent = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "CMEvent",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMEvent), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMEvent),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMEvent), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMEvent),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_CMEvent), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_CMEvent),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMEvent) __PYX_ERR(5, 25, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4cmid_CMEvent = (struct __pyx_vtabstruct_7pyverbs_4cmid_CMEvent*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_CMEvent); if (unlikely(!__pyx_vtabptr_7pyverbs_4cmid_CMEvent)) __PYX_ERR(5, 25, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_AddrInfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "AddrInfo",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_AddrInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_AddrInfo),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_AddrInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_AddrInfo),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_AddrInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_AddrInfo),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_AddrInfo) __PYX_ERR(5, 30, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4cmid_AddrInfo = (struct __pyx_vtabstruct_7pyverbs_4cmid_AddrInfo*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_AddrInfo); if (unlikely(!__pyx_vtabptr_7pyverbs_4cmid_AddrInfo)) __PYX_ERR(5, 30, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_ConnParam = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "ConnParam",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_ConnParam), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_ConnParam),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_ConnParam), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_ConnParam),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_ConnParam), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_ConnParam),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_ConnParam) __PYX_ERR(5, 35, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_UDParam = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "UDParam",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_UDParam), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_UDParam),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_UDParam), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_UDParam),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_UDParam), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_UDParam),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_UDParam) __PYX_ERR(5, 40, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4cmid_JoinMCAttrEx = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.cmid", "JoinMCAttrEx",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4cmid_JoinMCAttrEx),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4cmid_JoinMCAttrEx) __PYX_ERR(5, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyverbs.xrcd"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_4xrcd_XRCDInitAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.xrcd", "XRCDInitAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4xrcd_XRCDInitAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4xrcd_XRCDInitAttr) __PYX_ERR(6, 11, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4xrcd_XRCD = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.xrcd", "XRCD",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4xrcd_XRCD), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4xrcd_XRCD),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4xrcd_XRCD), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4xrcd_XRCD),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4xrcd_XRCD), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4xrcd_XRCD),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4xrcd_XRCD) __PYX_ERR(6, 15, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4xrcd_XRCD = (struct __pyx_vtabstruct_7pyverbs_4xrcd_XRCD*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4xrcd_XRCD); if (unlikely(!__pyx_vtabptr_7pyverbs_4xrcd_XRCD)) __PYX_ERR(6, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyverbs.addr"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_4addr_GID = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.addr", "GID",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4addr_GID), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GID),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4addr_GID), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GID),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4addr_GID), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GID),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4addr_GID) __PYX_ERR(7, 11, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4addr_GRH = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.addr", "GRH",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4addr_GRH), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GRH),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4addr_GRH), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GRH),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4addr_GRH), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GRH),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4addr_GRH) __PYX_ERR(7, 14, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4addr_GlobalRoute = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.addr", "GlobalRoute",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4addr_GlobalRoute), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GlobalRoute),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4addr_GlobalRoute), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GlobalRoute),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4addr_GlobalRoute), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_GlobalRoute),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4addr_GlobalRoute) __PYX_ERR(7, 17, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4addr_AHAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.addr", "AHAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4addr_AHAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_AHAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4addr_AHAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_AHAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4addr_AHAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_AHAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4addr_AHAttr) __PYX_ERR(7, 20, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4addr_AHAttr = (struct __pyx_vtabstruct_7pyverbs_4addr_AHAttr*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4addr_AHAttr); if (unlikely(!__pyx_vtabptr_7pyverbs_4addr_AHAttr)) __PYX_ERR(7, 20, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_4addr_AH = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.addr", "AH",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_4addr_AH), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_AH),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_4addr_AH), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_AH),
  #else
  sizeof(struct __pyx_obj_7pyverbs_4addr_AH), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_4addr_AH),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_4addr_AH) __PYX_ERR(7, 24, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_4addr_AH = (struct __pyx_vtabstruct_7pyverbs_4addr_AH*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_4addr_AH); if (unlikely(!__pyx_vtabptr_7pyverbs_4addr_AH)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyverbs.qp"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPCap = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "QPCap",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPCap), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPCap),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPCap), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPCap),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPCap), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPCap),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPCap) __PYX_ERR(8, 9, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPInitAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "QPInitAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPInitAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPInitAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPInitAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPInitAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPInitAttr) __PYX_ERR(8, 12, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPInitAttrEx = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "QPInitAttrEx",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPInitAttrEx),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPInitAttrEx) __PYX_ERR(8, 18, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPAttr = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "QPAttr",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPAttr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPAttr),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPAttr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPAttr),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPAttr) __PYX_ERR(8, 27, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_QP = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "QP",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_QP), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QP),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_QP), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QP),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_QP), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QP),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QP) __PYX_ERR(8, 30, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2qp_QP = (struct __pyx_vtabstruct_7pyverbs_2qp_QP*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QP); if (unlikely(!__pyx_vtabptr_7pyverbs_2qp_QP)) __PYX_ERR(8, 30, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_DataBuffer = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "DataBuffer",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_DataBuffer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_DataBuffer),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_DataBuffer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_DataBuffer),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_DataBuffer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_DataBuffer),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_DataBuffer) __PYX_ERR(8, 47, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2qp_DataBuffer = (struct __pyx_vtabstruct_7pyverbs_2qp_DataBuffer*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2qp_DataBuffer); if (unlikely(!__pyx_vtabptr_7pyverbs_2qp_DataBuffer)) __PYX_ERR(8, 47, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPEx = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "QPEx",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPEx),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPEx),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_QPEx), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_QPEx),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPEx) __PYX_ERR(8, 50, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2qp_QPEx = (struct __pyx_vtabstruct_7pyverbs_2qp_QPEx*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2qp_QPEx); if (unlikely(!__pyx_vtabptr_7pyverbs_2qp_QPEx)) __PYX_ERR(8, 50, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyverbs_2qp_ECE = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyverbs.qp", "ECE",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7pyverbs_2qp_ECE), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_ECE),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7pyverbs_2qp_ECE), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_ECE),
  #else
  sizeof(struct __pyx_obj_7pyverbs_2qp_ECE), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_7pyverbs_2qp_ECE),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7pyverbs_2qp_ECE) __PYX_ERR(8, 54, __pyx_L1_error)
  __pyx_vtabptr_7pyverbs_2qp_ECE = (struct __pyx_vtabstruct_7pyverbs_2qp_ECE*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7pyverbs_2qp_ECE); if (unlikely(!__pyx_vtabptr_7pyverbs_2qp_ECE)) __PYX_ERR(8, 54, __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);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("pyverbs.base"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject_close_weakrefs);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 23;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7pyverbs_4base_close_weakrefs, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __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;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_device(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_device},
  #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,
      "device",
      __pyx_k_Device_module_introduces_the_Co, /* 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_device(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_device(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_device(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;
  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_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 'device' 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 "device" 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_device", 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_pyverbs__device) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_3, __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, "pyverbs.device")) {
      if (unlikely((PyDict_SetItemString(modules, "pyverbs.device", __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);
  if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/

  /* "EnumTypeToPy":1
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = None             # <<<<<<<<<<<<<<
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py")
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(ibv_values_mask c_val):
 *     cdef object __pyx_enum
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_sysfs_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":1
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = None             # <<<<<<<<<<<<<<
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py")
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_atomic_cap_to_py(ibv_atomic_cap c_val):
 *     cdef object __pyx_enum
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_odp_general_caps_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":1
 * cdef object __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = None             # <<<<<<<<<<<<<<
 * 
 * @cname("__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py")
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py = None
 * 
 * @cname("__Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_47f114__7pyverbs_16libibverbs_enums_enum__space_ibv_od__etc_to_py(ibv_odp_transport_cap_bits c_val):
 *     cdef object __pyx_enum
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_state_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":1
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = None             # <<<<<<<<<<<<<<
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py")
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_mtu_to_py(ibv_mtu c_val):
 *     cdef object __pyx_enum
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_event_type_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":1
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = None             # <<<<<<<<<<<<<<
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py")
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_gid_type_to_py(ibv_gid_type c_val):
 *     cdef object __pyx_enum
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":1
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = None             # <<<<<<<<<<<<<<
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py")
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "EnumTypeToPy":3
 * cdef object __pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py = None
 * 
 * @cname("__Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_port_cap_flags2_to_py(ibv_port_cap_flags2 c_val):
 *     cdef object __pyx_enum
*/
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py);
  __Pyx_DECREF_SET(__pyx_imported_enum___Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_device_cap_flags_to_py, Py_None);
  __Pyx_GIVEREF(Py_None);

  /* "pyverbs/device.pyx":9
 * which returns a DeviceAttr object.
 * """
 * import weakref             # <<<<<<<<<<<<<<
 * 
 * from .pyverbs_error import PyverbsRDMAError, PyverbsError
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_weakref, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __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_weakref, __pyx_t_2) < (0)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":11
 * import weakref
 * 
 * from .pyverbs_error import PyverbsRDMAError, PyverbsError             # <<<<<<<<<<<<<<
 * from pyverbs.cq cimport CQEX, CQ, CompChannel
 * from .pyverbs_error import PyverbsUserError
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PyverbsRDMAError,__pyx_mstate_global->__pyx_n_u_PyverbsError};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_error, __pyx_imported_names, 2, __pyx_mstate_global->__pyx_kp_u_pyverbs_pyverbs_error, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __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_PyverbsRDMAError,__pyx_mstate_global->__pyx_n_u_PyverbsError};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __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, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":13
 * from .pyverbs_error import PyverbsRDMAError, PyverbsError
 * from pyverbs.cq cimport CQEX, CQ, CompChannel
 * from .pyverbs_error import PyverbsUserError             # <<<<<<<<<<<<<<
 * from pyverbs.base import PyverbsRDMAErrno
 * from pyverbs.base cimport close_weakrefs
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PyverbsUserError};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_error, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pyverbs_pyverbs_error, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __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_PyverbsUserError};
    __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, 13, __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, 13, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":14
 * from pyverbs.cq cimport CQEX, CQ, CompChannel
 * from .pyverbs_error import PyverbsUserError
 * from pyverbs.base import PyverbsRDMAErrno             # <<<<<<<<<<<<<<
 * from pyverbs.base cimport close_weakrefs
 * from pyverbs.wq cimport WQ, RwqIndTable
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PyverbsRDMAErrno};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_base, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __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_PyverbsRDMAErrno};
    __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, 14, __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, 14, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":23
 * from pyverbs.xrcd cimport XRCD
 * from pyverbs.addr cimport GID
 * from pyverbs.mr import DMMR, DMAHandle             # <<<<<<<<<<<<<<
 * from pyverbs.pd cimport PD
 * from pyverbs.qp cimport QP
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DMMR,__pyx_mstate_global->__pyx_n_u_DMAHandle};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_mr, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __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_DMMR,__pyx_mstate_global->__pyx_n_u_DMAHandle};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __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, 23, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":32
 * from libc.stdint cimport uint32_t
 * from libc.stdint cimport uintptr_t
 * from pyverbs.utils import gid_str             # <<<<<<<<<<<<<<
 * 
 * cdef extern from 'endian.h':
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_gid_str};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyverbs_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __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_gid_str};
    __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, 32, __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, 32, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":38
 * 
 * 
 * class Device(PyverbsObject):             # <<<<<<<<<<<<<<
 *     """
 *     Device class represents the C ibv_device. It stores device's properties.
*/
  __pyx_t_2 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyverbs_4base_PyverbsObject)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Device, __pyx_mstate_global->__pyx_n_u_Device, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_kp_u_Device_class_represents_the_C_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_4 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 38, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":44
 *     to create it for such purposes.
 *     """
 *     def __init__(self, name, guid, node_type, transport_type, index):             # <<<<<<<<<<<<<<
 *         self._node_type = node_type
 *         self._transport_type = transport_type
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Device___init, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __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 (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":51
 *         self._index = index
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self._name
*/
  __pyx_t_7 = NULL;
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_3name, 0, __pyx_mstate_global->__pyx_n_u_Device_name, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_name, __pyx_t_2) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":55
 *         return self._name
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def node_type(self):
 *         return self._node_type
*/
  __pyx_t_8 = NULL;
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_5node_type, 0, __pyx_mstate_global->__pyx_n_u_Device_node_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_node_type, __pyx_t_2) < (0)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":59
 *         return self._node_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def transport_type(self):
 *         return self._transport_type
*/
  __pyx_t_7 = NULL;
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_7transport_type, 0, __pyx_mstate_global->__pyx_n_u_Device_transport_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_transport_type, __pyx_t_2) < (0)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":63
 *         return self._transport_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def guid(self):
 *         return self._guid
*/
  __pyx_t_8 = NULL;
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_9guid, 0, __pyx_mstate_global->__pyx_n_u_Device_guid, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_guid, __pyx_t_2) < (0)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":67
 *         return self._guid
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index(self):
 *         return self._index
*/
  __pyx_t_7 = NULL;
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_11index, 0, __pyx_mstate_global->__pyx_n_u_Device_index, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_2) < (0)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":71
 *         return self._index
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'Device {dev}, node type {ntype}, transport type {ttype},' \
 *                ' guid {guid}, index {index}'.format(dev=self.name.decode(),
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6Device_13__str__, 0, __pyx_mstate_global->__pyx_n_u_Device___str, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __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 (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_2) < (0)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyverbs/device.pyx":38
 * 
 * 
 * class Device(PyverbsObject):             # <<<<<<<<<<<<<<
 *     """
 *     Device class represents the C ibv_device. It stores device's properties.
*/
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Device, __pyx_t_4, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __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_Device, __pyx_t_2) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":178
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         if self.context != NULL:
 *             if self.logger:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_5close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_close, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_4) < (0)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":198
 *         return self.context.num_comp_vectors
 * 
 *     def query_device(self):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's attributes.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_7query_device, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_device, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_device, __pyx_t_4) < (0)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":211
 *         return dev_attr
 * 
 *     def query_device_ex(self, QueryDeviceExInput ex_input = None):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's extended attributes.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_9query_device_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_device_ex, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_device_ex, __pyx_t_4) < (0)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":227
 *         return dev_attr_ex
 * 
 *     def query_pkey(self, unsigned int port_num, int index):             # <<<<<<<<<<<<<<
 *         cdef uint16_t pkey
 *         rc = v.ibv_query_pkey(self.context, port_num, index, &pkey)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_11query_pkey, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_pkey, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_pkey, __pyx_t_4) < (0)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":234
 *         return pkey
 * 
 *     def get_pkey_index(self, unsigned int port_num, int pkey):             # <<<<<<<<<<<<<<
 *         idx = v.ibv_get_pkey_index(self.context, port_num, pkey)
 *         if idx == -1:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_13get_pkey_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_get_pkey_index, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_get_pkey_index, __pyx_t_4) < (0)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":240
 *         return idx
 * 
 *     def query_gid(self, unsigned int port_num, int index):             # <<<<<<<<<<<<<<
 *         gid = GID()
 *         rc = v.ibv_query_gid(self.context, port_num, index, &gid.gid)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_15query_gid, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_gid, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_gid, __pyx_t_4) < (0)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":248
 *         return gid
 * 
 *     def query_gid_type(self, unsigned int port_num, unsigned int index):             # <<<<<<<<<<<<<<
 *         cdef v.ibv_gid_type_sysfs gid_type
 *         rc = v.ibv_query_gid_type(self.context, port_num, index, &gid_type)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_17query_gid_type, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_gid_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_gid_type, __pyx_t_4) < (0)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":256
 *         return gid_type
 * 
 *     def query_port(self, unsigned int port_num):             # <<<<<<<<<<<<<<
 *         """
 *         Query port <port_num> of the device and returns its attributes.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_19query_port, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_port, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_port, __pyx_t_4) < (0)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":269
 *         return port_attrs
 * 
 *     def query_gid_table(self, size_t max_entries, uint32_t flags=0):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the GID tables of the device for at most <max_entries> entries
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_21query_gid_table, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_gid_table, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_gid_table, __pyx_t_4) < (0)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":297
 *         return gid_entries
 * 
 *     def query_gid_ex(self, uint32_t port_num, uint32_t gid_index,             # <<<<<<<<<<<<<<
 *                      uint32_t flags=0):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_23query_gid_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_gid_ex, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_gid_ex, __pyx_t_4) < (0)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":316
 *         return entry
 * 
 *     def query_rt_values_ex(self, comp_mask=v.IBV_VALUES_MASK_RAW_CLOCK):             # <<<<<<<<<<<<<<
 *         """
 *         Query an RDMA device for some real time values.
*/
  __pyx_t_4 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(IBV_VALUES_MASK_RAW_CLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_mstate_global->__pyx_k__2 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Enum_7pyverbs_16libibverbs_enums_enum__space_ibv_values_mask_to_py(IBV_VALUES_MASK_RAW_CLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_25query_rt_values_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_query_rt_values_ex, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_query_rt_values_ex, __pyx_t_4) < (0)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":356
 *             raise PyverbsError('Unrecognized object type')
 * 
 *     def get_async_event(self):             # <<<<<<<<<<<<<<
 *         event = AsyncEvent()
 *         rc = v.ibv_get_async_event(self.context, &event.event)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_27get_async_event, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context_get_async_event, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_Context, __pyx_mstate_global->__pyx_n_u_get_async_event, __pyx_t_4) < (0)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_29__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.context,self.device cannot be converted to a Python object for pickling"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7Context_31__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Context___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_10DeviceAttr_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DeviceAttr___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_10DeviceAttr_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DeviceAttr___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_18QueryDeviceExInput_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QueryDeviceExInput___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_18QueryDeviceExInput_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QueryDeviceExInput___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7ODPCaps_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ODPCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7ODPCaps_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ODPCaps___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_13PCIAtomicCaps_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PCIAtomicCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_13PCIAtomicCaps_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PCIAtomicCaps___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7TSOCaps_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TSOCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7TSOCaps_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TSOCaps___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7RSSCaps_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RSSCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7RSSCaps_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RSSCaps___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_16PacketPacingCaps_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PacketPacingCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_16PacketPacingCaps_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PacketPacingCaps___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6TMCaps_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TMCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_6TMCaps_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TMCaps___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_16CQModerationCaps_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CQModerationCaps___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_16CQModerationCaps_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CQModerationCaps___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_12DeviceAttrEx_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DeviceAttrEx___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_12DeviceAttrEx_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DeviceAttrEx___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_11AllocDmAttr_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllocDmAttr___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_11AllocDmAttr_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllocDmAttr___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":812
 *         context.add_ref(self)
 * 
 *     def unimport(self):             # <<<<<<<<<<<<<<
 *         v.ibv_unimport_dm(self.dm)
 *         self.close()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_2DM_3unimport, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DM_unimport, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM, __pyx_mstate_global->__pyx_n_u_unimport, __pyx_t_4) < (0)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":819
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Closes the underlying C object of the DM.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_2DM_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DM_close, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_4) < (0)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":840
 *             self.dm_mrs.add(obj)
 * 
 *     def copy_to_dm(self, dm_offset, data, length):             # <<<<<<<<<<<<<<
 *         rc = v.ibv_memcpy_to_dm(<v.ibv_dm *>self.dm, <uint64_t>dm_offset,
 *                                 <char *>data, <size_t>length)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_2DM_9copy_to_dm, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DM_copy_to_dm, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM, __pyx_mstate_global->__pyx_n_u_copy_to_dm, __pyx_t_4) < (0)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":846
 *             raise PyverbsRDMAError('Failed to copy to dm', rc)
 * 
 *     def copy_from_dm(self, dm_offset, length):             # <<<<<<<<<<<<<<
 *         cdef char *data =<char*>malloc(length)
 *         memset(data, 0, length)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_2DM_11copy_from_dm, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DM_copy_from_dm, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_DM, __pyx_mstate_global->__pyx_n_u_copy_from_dm, __pyx_t_4) < (0)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_2DM_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DM___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dm cannot be converted to a Python object for pickling"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_2DM_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DM___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_8PortAttr_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PortAttr___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_8PortAttr_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PortAttr___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":994
 *         return self.entry.ndev_ifindex
 * 
 *     def gid_str(self):             # <<<<<<<<<<<<<<
 *         return gid_str(self.gid_subnet_prefix, self.gid_interface_id)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_8GIDEntry_3gid_str, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GIDEntry_gid_str, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_GIDEntry, __pyx_mstate_global->__pyx_n_u_gid_str, __pyx_t_4) < (0)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_8GIDEntry_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GIDEntry___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_8GIDEntry_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GIDEntry___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1012
 *         self.event.event_type = event_type
 * 
 *     def ack(self):             # <<<<<<<<<<<<<<
 *         v.ibv_ack_async_event(&self.event)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_10AsyncEvent_3ack, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AsyncEvent_ack, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_AsyncEvent, __pyx_mstate_global->__pyx_n_u_ack, __pyx_t_4) < (0)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_10AsyncEvent_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AsyncEvent___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.event cannot be converted to a Python object for pickling"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_10AsyncEvent_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AsyncEvent___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1025
 * 
 * 
 * def translate_gid_type(gid_type):             # <<<<<<<<<<<<<<
 *     types = {e.IBV_GID_TYPE_IB: 'IB', e.IBV_GID_TYPE_ROCE_V1: 'RoCEv1',
 *              e.IBV_GID_TYPE_ROCE_V2: 'RoCEv2'}
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_1translate_gid_type, 0, __pyx_mstate_global->__pyx_n_u_translate_gid_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_gid_type, __pyx_t_4) < (0)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1034
 * 
 * 
 * def guid_format(num):             # <<<<<<<<<<<<<<
 *     """
 *     Get GUID representation of the given number, including change of endianness.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_3guid_format, 0, __pyx_mstate_global->__pyx_n_u_guid_format, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_guid_format, __pyx_t_4) < (0)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1047
 * 
 * 
 * def translate_transport_type(transport_type):             # <<<<<<<<<<<<<<
 *     l = {0: 'IB', 1: 'IWARP', 2: 'USNIC', 3: 'USNIC UDP'}
 *     try:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_5translate_transport_type, 0, __pyx_mstate_global->__pyx_n_u_translate_transport_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_transport_type, __pyx_t_4) < (0)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1055
 * 
 * 
 * def translate_node_type(node_type):             # <<<<<<<<<<<<<<
 *     l = {1: 'CA', 2: 'Switch', 3: 'Router', 4: 'RNIC', 5: 'USNIC',
 *          6: 'USNIC UDP'}
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_7translate_node_type, 0, __pyx_mstate_global->__pyx_n_u_translate_node_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_node_type, __pyx_t_4) < (0)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1064
 * 
 * 
 * def guid_to_hex(node_guid):             # <<<<<<<<<<<<<<
 *     return hex(node_guid).replace('L', '').replace('0x', '')
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_9guid_to_hex, 0, __pyx_mstate_global->__pyx_n_u_guid_to_hex, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_guid_to_hex, __pyx_t_4) < (0)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1068
 * 
 * 
 * def port_state_to_str(port_state):             # <<<<<<<<<<<<<<
 *     l = {0: 'NOP', 1: 'Down', 2: 'Init', 3: 'Armed', 4: 'Active', 5: 'Defer'}
 *     try:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_11port_state_to_str, 0, __pyx_mstate_global->__pyx_n_u_port_state_to_str, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_port_state_to_str, __pyx_t_4) < (0)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1076
 * 
 * 
 * def translate_mtu(mtu):             # <<<<<<<<<<<<<<
 *     l = {1: 256, 2: 512, 3: 1024, 4: 2048, 5: 4096}
 *     try:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_13translate_mtu, 0, __pyx_mstate_global->__pyx_n_u_translate_mtu, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_mtu, __pyx_t_4) < (0)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1084
 * 
 * 
 * def translate_link_layer(ll):             # <<<<<<<<<<<<<<
 *     l = {0: 'Unspecified', 1:'InfiniBand', 2:'Ethernet'}
 *     try:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_15translate_link_layer, 0, __pyx_mstate_global->__pyx_n_u_translate_link_layer, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_link_layer, __pyx_t_4) < (0)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1092
 * 
 * 
 * def translate_port_cap_flags(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_PORT_SM: 'IBV_PORT_SM',
 *          e.IBV_PORT_NOTICE_SUP: 'IBV_PORT_NOTICE_SUP',
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_17translate_port_cap_flags, 0, __pyx_mstate_global->__pyx_n_u_translate_port_cap_flags, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_port_cap_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1120
 * 
 * 
 * def translate_port_cap_flags2(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_PORT_SET_NODE_DESC_SUP: 'IBV_PORT_SET_NODE_DESC_SUP',
 *          e.IBV_PORT_INFO_EXT_SUP: 'IBV_PORT_INFO_EXT_SUP',
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_19translate_port_cap_flags2, 0, __pyx_mstate_global->__pyx_n_u_translate_port_cap_flags2, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_port_cap_flags2, __pyx_t_4) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1131
 * 
 * 
 * def translate_device_caps(flags):             # <<<<<<<<<<<<<<
 *     l = {e.IBV_DEVICE_RESIZE_MAX_WR: 'IBV_DEVICE_RESIZE_MAX_WR',
 *          e.IBV_DEVICE_BAD_PKEY_CNTR: 'IBV_DEVICE_BAD_PKEY_CNTR',
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_21translate_device_caps, 0, __pyx_mstate_global->__pyx_n_u_translate_device_caps, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_device_caps, __pyx_t_4) < (0)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1159
 * 
 * 
 * def str_from_flags(flags, dictionary):             # <<<<<<<<<<<<<<
 *     str_flags = "\n  "
 *     for bit in dictionary:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_23str_from_flags, 0, __pyx_mstate_global->__pyx_n_u_str_from_flags, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_str_from_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1168
 * 
 * 
 * def phys_state_to_str(phys):             # <<<<<<<<<<<<<<
 *     l =  {1: 'Sleep', 2: 'Polling', 3: 'Disabled',
 *           4: 'Port configuration training', 5: 'Link up',
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_25phys_state_to_str, 0, __pyx_mstate_global->__pyx_n_u_phys_state_to_str, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_phys_state_to_str, __pyx_t_4) < (0)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1178
 * 
 * 
 * def width_to_str(width):             # <<<<<<<<<<<<<<
 *     l = {1: '1X', 2: '4X', 4: '8X', 8: '12X', 16: '2X'}
 *     try:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_27width_to_str, 0, __pyx_mstate_global->__pyx_n_u_width_to_str, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_width_to_str, __pyx_t_4) < (0)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1186
 * 
 * 
 * def speed_to_str(active_speed, active_speed_ex):             # <<<<<<<<<<<<<<
 *     real_speed = active_speed if not active_speed_ex else active_speed_ex
 *     l = {0: '0.0 Gbps', 1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps',
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_29speed_to_str, 0, __pyx_mstate_global->__pyx_n_u_speed_to_str, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_speed_to_str, __pyx_t_4) < (0)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1197
 * 
 * 
 * def get_device_list():             # <<<<<<<<<<<<<<
 *     """
 *     :return: list of IB_devices on current node
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_31get_device_list, 0, __pyx_mstate_global->__pyx_n_u_get_device_list, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_device_list, __pyx_t_4) < (0)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1226
 * 
 * 
 * def rdma_get_devices():             # <<<<<<<<<<<<<<
 *     """
 *     Get the RDMA devices.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_33rdma_get_devices, 0, __pyx_mstate_global->__pyx_n_u_rdma_get_devices, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rdma_get_devices, __pyx_t_4) < (0)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1248
 * 
 * 
 * def translate_event_type(event_type):             # <<<<<<<<<<<<<<
 *     types = {
 *         e.IBV_EVENT_CQ_ERR: 'IBV_EVENT_CQ_ERR',
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_35translate_event_type, 0, __pyx_mstate_global->__pyx_n_u_translate_event_type, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_translate_event_type, __pyx_t_4) < (0)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1281
 *     Represent ibv_fd_arr struct. This class is used a pointer to the file descriptor array
 *     """
 *     def __init__(self, arr=[], count=0):             # <<<<<<<<<<<<<<
 *         super().__init__()
 *         cdef int *dst
*/
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_mstate_global->__pyx_k__8 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1295
 *         self.close()
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         free(self.attr.arr)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_5FdArr_5close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FdArr_close, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyverbs_6device_FdArr, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_4) < (0)) __PYX_ERR(0, 1295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_5FdArr_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FdArr___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.attr cannot be converted to a Python object for pickling"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyverbs_6device_5FdArr_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FdArr___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyverbs_device, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyverbs/device.pyx":1
 * # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)             # <<<<<<<<<<<<<<
 * # Copyright (c) 2018, Mellanox Technologies. All rights reserved. See COPYING file
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pyverbs.device", __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 pyverbs.device");
  }
  __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_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 51, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 110, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1043, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get;
  __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;
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__format.type = (PyObject*)(&PyUnicode_Type);
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__format.method_name = &__pyx_mstate->__pyx_n_u_format;
  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);

  /* "pyverbs/device.pyx":1043
 *     hex_str = "%016x" % (num)
 *     hex_array = [hex_str[i:i+2] for i in range(0, len(hex_str), 2)]
 *     hex_array = [''.join(x) for x in zip(hex_array[0::2], hex_array[1::2])]             # <<<<<<<<<<<<<<
 *     return ':'.join(hex_array)
 * 
*/
  __pyx_mstate_global->__pyx_slice[0] = PySlice_New(__pyx_mstate_global->__pyx_int_0, Py_None, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
  __pyx_mstate_global->__pyx_slice[1] = PySlice_New(__pyx_mstate_global->__pyx_int_1, Py_None, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_slice[1])) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[1]);

  /* "pyverbs/device.pyx":211
 *         return dev_attr
 * 
 *     def query_device_ex(self, QueryDeviceExInput ex_input = None):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the device's extended attributes.
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "pyverbs/device.pyx":269
 *         return port_attrs
 * 
 *     def query_gid_table(self, size_t max_entries, uint32_t flags=0):             # <<<<<<<<<<<<<<
 *         """
 *         Queries the GID tables of the device for at most <max_entries> entries
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<2; ++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
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_slice;
    for (Py_ssize_t i=0; i<2; ++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},{5},{8},{2},{10},{9},{3},{9},{2},{10},{14},{15},{15},{9},{2},{8},{2},{9},{8},{2},{10},{12},{12},{11},{16},{15},{10},{28},{16},{196},{83},{36},{28},{10},{10},{10},{74},{23},{22},{20},{27},{17},{25},{25},{26},{35},{19},{23},{24},{27},{32},{29},{40},{34},{40},{54},{21},{24},{32},{57},{9},{13},{8},{10},{30},{15},{17},{25},{22},{13},{19},{13},{19},{10},{7},{6},{6},{7},{6},{14},{19},{7},{6},{11},{7},{6},{6},{9},{6},{14},{9},{19},{7},{7},{10},{7},{11},{10},{15},{19},{15},{16},{16},{15},{15},{12},{9},{179},{19},{16},{13},{8},{15},{10},{101},{106},{97},{98},{98},{101},{97},{101},{101},{111},{100},{104},{14},{14},{16},{27},{8},{11},{10},{23},{11},{6},{5},{14},{14},{11},{11},{9},{20},{18},{24},{9},{14},{12},{0},{7},{1},{1},{3},{1},{8},{7},{6},{171},{177},{171},{169},{175},{164},{177},{183},{176},{175},{171},{172},{2},{10},{9},{18},{10},{9},{18},{21},{9},{61},{76},{59},{62},{15},{6},{11},{29},{31},{5},{10},{28},{30},{14},{2},{16},{34},{36},{7},{25},{27},{13},{23},{22},{20},{23},{17},{20},{23},{22},{18},{18},{26},{2},{9},{4},{20},{22},{8},{15},{13},{11},{5},{6},{10},{12},{30},{32},{28},{30},{15},{14},{11},{12},{11},{16},{21},{8},{4},{8},{5},{23},{25},{11},{5},{3},{8},{26},{28},{16},{2},{15},{14},{15},{24},{24},{24},{26},{28},{20},{32},{29},{21},{29},{29},{22},{28},{22},{20},{21},{25},{24},{24},{21},{25},{29},{21},{14},{27},{18},{16},{22},{20},{20},{18},{22},{21},{21},{18},{23},{18},{29},{20},{19},{20},{17},{27},{18},{15},{20},{20},{29},{26},{12},{12},{11},{12},{11},{15},{22},{28},{21},{24},{20},{20},{20},{24},{21},{15},{21},{14},{22},{22},{22},{28},{23},{15},{24},{13},{22},{28},{21},{13},{22},{21},{25},{27},{27},{26},{19},{12},{19},{20},{19},{34},{19},{26},{19},{11},{24},{36},{27},{17},{25},{17},{25},{5},{10},{4},{1},{3},{7},{25},{27},{13},{31},{33},{16},{34},{36},{7},{8},{26},{28},{12},{16},{16},{16},{20},{18},{36},{38},{4},{7},{25},{27},{6},{6},{6},{5},{6},{6},{24},{26},{7},{25},{27},{5},{7},{11},{7},{3},{12},{15},{3},{3},{18},{11},{4},{3},{17},{18},{5},{6},{4},{9},{7},{12},{10},{5},{8},{4},{5},{6},{3},{8},{11},{8},{16},{7},{10},{7},{9},{7},{7},{5},{5},{10},{8},{5},{6},{8},{10},{1},{12},{3},{15},{15},{14},{12},{3},{11},{9},{16},{7},{17},{8},{4},{5},{11},{11},{6},{9},{7},{6},{1},{14},{20},{14},{12},{18},{7},{20},{26},{18},{19},{14},{15},{3},{5},{6},{8},{12},{13},{5},{1},{6},{2},{3},{18},{13},{1},{8},{3},{6},{6},{7},{11},{6},{19},{14},{11},{7},{15},{13},{19},{6},{11},{6},{6},{9},{6},{19},{14},{9},{15},{16},{7},{15},{7},{10},{7},{11},{10},{13},{10},{15},{3},{1},{4},{5},{8},{12},{4},{9},{9},{10},{4},{5},{3},{1},{13},{4},{13},{17},{4},{3},{4},{10},{8},{10},{17},{11},{8},{12},{14},{13},{24},{10},{13},{11},{14},{12},{12},{15},{9},{12},{15},{14},{10},{10},{18},{2},{11},{16},{10},{10},{17},{13},{3},{1},{3},{4},{12},{10},{12},{19},{4},{12},{7},{9},{14},{13},{5},{14},{8},{21},{20},{18},{20},{13},{19},{24},{25},{24},{9},{14},{15},{5},{5},{11},{11},{8},{3},{6},{9},{14},{4},{8},{7},{5},{12},{1},{3},{37},{159},{27},{100},{154},{53},{54},{13},{38},{67},{13},{147},{66},{130},{18},{94},{70},{59},{87},{54},{63},{51},{77},{121},{9},{18},{66},{57},{41},{50},{70},{92},{46},{9},{157},{136},{69},{135},{45},{105},{42},{51}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (5361 bytes) */
const char* const cstring = "(\265/\375`Q;=\247\000\332\270\\&G\000\221\350\001\374\277\253+Q\307\372\336S\211:\366[\307~\353x\377\036\261\2326\222\222_RDn\333\207[B1\217Pt\227\225/\037cD\271\002\220\346\316#\252i\271y\000\000\200o\016\267\271\276\233\353\211\344\234\230\003+\002<\002M\002\237\211\362\225\374m#\362t\256\242\016\367\346\006\361^\222\231D\377\024E7I\376\334g\324o\225\243yM[\371\344\321\362\233\345j2\255\236w\224\022(\037>\356\313h\347\177,\373\367\271e\362\277;7\225f\231\3214\365[Z\376;\3653\377\251\210\223\251\350Tf\221\347\255\324\347~\304\352\353\362\314\356\034\265\275\347\352\232vTj\334\377\357\357\367xv\256fu\237$\220[\t\301\227\217\344[\274e\373^@\017T\236\351\337y\0033\307\261d$-\303d\236\272\266\322\261\247\275\363\220\347\177\177?\226\276\225RM\263\363\3266\263\014Z\232&4N\232\222L\226h\3272\177\211v\033\307\242e\034\2509\322\213\026\303,\244?\222\026E\234\013\247]T\272\016\013\312\315.o\335\212\214\337\247V\317t\374>\365=_\315\275\312\374,\1776Q$\2723\r\377ih\260\310\022\005\303\361U\265\201\362\351mg\231B\365\2764y\036\321\226\337\371s\024\347\035-Og\332O\271\245\246c\207\006k\237\3344\355\325\316\254\355\345\016\215\031\245o\365\364\344''\271Yn\220\357|\225_@\275\357\3547\220\230W\034\311\311r\305M\371\373\365\314\374\334\350\230\232\346\316'\251~\022\324\363\224\244\311,N\242%M&\313\025\365\177OU\217\356\376Q\265\3653'=l>U\373\252\346\324\270\372_f\236\376\316\375\332\323\023Gs\377\220;'{\232\321\264\374\233\367q\3442Li>\245\371\367\255\346\235\177\212f_v</\177\357j\366$\351\367\371w\271\243W\2462k\231\247~\366\037\345\236w\225\367\354\3756\363\207Gm\363\2247\0324\231\217\345\212\223\231\344(W\323\234\342m\237\225j\031\205\226>5\265\316?\272\246cnq\231/\223[\305\253{\314cy\246?K}\262\234!9W}I\3642_\225\177\314`J\210\200A\021\321\371\300|D|P>\037(Rhr\n\215\223O\n\315\007\006\305\003\363\361\234xX'^5\255\344\223\316\tk\204\347DC'#/\003]D\036\314g\023\201\033\213\216\321ZD\241p\343\302O\354\272p\343\270/\334@o\205\323>-\341\227i\242'\216F*\340\306y \310\201D\\\350\242m""\241\317\353X\302R\010\304\211_i\033yD\2308A\031!\242\004\312\311\007\345s\342\321!\350\343q\031\201\235\330y\242.\0037M\362\3020\344\264\217\024\neb\006\0029M\022CN{\336\010\354V8\260\013i\234\006\216@\"\316%\323[I{\235\016cDb\211%|\3210.\272\220\023q+\272%\023iP\004j\235\030*y^)\324\364\327\351\227\014\344\\:Q\3134\t\324\211\"\225\354\243_F\233\250{\031u\241\210\023a8-\256x\332\343VD\035\310q/\243\020Ho\334J&\312\274/F\324b'\352\266\221\24791\023C\020,\211\340\350\3231,\237\346VD\031\213F\002E\221\246c\270\226Oo\231\312J\347i\0261\373\364H,e\232\323:\027n\343D#Q\246\261\214B+Z\353\274\221\230\251t\034\250\367\214\004}\216r\033\331\277gq\235\237\370\206\256\351?I\255[j\352y\0337It\263d\336\346m\277\253-\255\365\326\237\243:^\335\032'S\217\244eZF\362\263\177\356\265^\265\356d\347\226\231\234\250\315\373/9I\017\243\372\345\317My4\241\201j\0209\344\222Y\373l\355\234i\331\364\345\210\372\374\322\244Q\353?O\276\345\265\356\260z\232s\213\257v\312,O\231d\251\235\314;'\363\211\223\352\230\367\232[\246\276\363\232\306\350\2167u\276j\251Yo\224\373\222\344?E5I\356\0259\177\244\230|\320\240\201\331\272\334S\022\345.\231DQ%\032\235IQ\031\264\364m\245\254u\242p+\225\266\256\264r\226\331\267\302\277\246\237\243\24654\275\027f\r\364fZ\256H(Z\366\025U\236\320\364\223\177O?2=\265j<\277\376\\f\334\252\367=\365_\253d\372W\025-[\375\243\374$\265\t_\273X\302U\235\376u\263h\231\277\034KSe\361\256;'\223o\377\307\325\224\031\313\317\177\317\377\027/\342\027/\361\013)\026k\322\327\310+\205CL\272\004<\255\200\266u\300@,\253\341i\017l\226\000\273\000\306\242C\314y9L\210'\204\214\r\\\024\223}\260 \246bQ8\334\255\365\264\234v\002H\2143\242]aC\026|\227\002\220\330fC\260\337\205\342\002\361\000\000r#\253\261y\215\2009p\311\353]\r\356\306\215\320\316pmW\010\216\032\036\327\201\216\330\246\345h#\020\210y^\007\340\r/\310=\265\244v\305n\016\034\000V\275,w\273\0336\361\306@\214\343e\202I0\314\233\275\036\"\304&vf\2733-\330f-\013\033\262qI\332\000\255\212e\271\024p\330\222k\200\313@Gl\273\022t\304T""\355n/$\210\023\030\210yX\001l\253F\201\216X\346z\\\216\233a\0233\030\000 \301\r\216\032^\0030)\3410j}j9\203%\263\371\014\332\367\314_\221\353\352?\332\233\372{\376\265\366\253\327\337\\\367\211\223\336\263\27067\357^\353\261\217\335\334\253j\305jy\363\344~\233Z\274oU{5U\323\377Q\216\332\252z\256\350\310=\212jT\247\235\233+\231jU\367\234$\375\210\225Z\266R\237\353\231\335gHu\246kU\245v\224\356\\=\373y\";\237Qz\256\032S[\263\320R\237*\3365\212*\315\255Q\251\251\365x\232\246\231\372(\224\233\246\327\276\324,\262,S-\235b\361\224.O\274\357\023Jk\224\236\031\321\365\264\317\236\2364\213\267</\265\036S\222\373\323)m\365=\226\244_q\222\223\351\310I\324j\342\344\376\233\374\27645\353\217dy\216\344I\223\347h\342#Z\352\223\377\362s\2246\365\3579Z\366\264\354}\223\344&\271\336\237\2072\233\277\220\274<\225#W=Z\032\205\242'\246\306_\316\204*\347f\330\371_S\360\343YqZ\032\206\240\326\211\300\216\305\221N\034\374,.\322\177,7V\347\276\224\242\031g\232\351\327i_\210D\267J\211\226'\264\373\300\354\245k\321F!W\ne.]\250ip\264\205T2\221E\023\273\227\020'\022\225D\375y\"/\364tH\0137.\344\300/\003\305\227\360\333\276\260g3\241\225\300\200\035\341*\340a\271\n\246\301<0\223\027\t\207\220\360r\274\241;\240\201\010\226\201\014\330;x\271\260e\000aAG\212\303nX\022\327\201\001\tT\220\304\005\334\014\342-q\363G\007|Q#\036\020\304\0104\227B\214Kd\323\252 \275\037<-\205\217\217\330G\354#\376\360\260\241z\265\300\247\r\234\254\204\203\330\001\010\007|R!\316\320\222``\240\215\260[\225\022l\203=\322a\203\304>\030\300vp}\220`\021\222\227\303\347\215\321~\332\321\306\345^(\257\023F\033\322z\233\327\010{@\021\322\020\207\270\034\317\273\342\216\300\037\370$\301D`\037\257\020\356\336\006o\204\324\312\313k\276u\301\301\252H\257\310+\301\035\333\030\323\233\342\314\270Z\210\326\205\025\3116/\211\312{\312\334\014.M\010\021\027\304\261\r\032\270<@P\210?\207\310\2028k\033\2642\031\314!\305\003\005\233\227\211\r\361~S\256\003\227\223e\030`7\036\000Bnh\030y\235\200S/\201\267$\273\200\007\300\333\013\002\243""\300./\214\033\342r\270/X\007\373\355\354w\344\345\250\201\000\343^\035\257\r\366\300!<\304j85+^\234W\312~\221^(\033$\030G\372b\031\260\231W\311\342\252 xd/\024\035\361\253\303.\336\317\313\201m`$\257\017X\206;b\343\205\213\330E)F\325\214\324\264\350b\244\032/|e\257\0278\345\235\340\212(\233\201%U/\226\207\0141\016\220\022\227\243\r\331\225ko\010\255\004\016\013jG\332M+a\273$W\003\310\201\214]ml^\023\227\304#\266q9\0361\0167{\304\332\n\036\261\001*\270\345\315@z\245\330\300f\300\033n\361rp\311\324\005\303> \301\353\333\222\301\326\227\002\330\300\010\206\330\346\025\001\026\337\001\257\312e\315\260\020@b\031\010\267\331\007\006b#\"1\016\326\004\373\360\222\360\301C\350\365\274.\256\006\006q\003\017\000\021nt\304\036\367\267\333\202G\t\370\277\032^\016&1\016L\205\365\356\267\205\333\341\222\332\0246\244E\247j1\200\304 \242\315:`EW\346\002\331\300\262\r;\252`\r\360\206\323~\260\013T/\361\205\032\216\032\026\221\330\363\232\000\317\310\240 V@\202\205\300H\342\0071\211\025a\375\273\2110\210\031\200\304b`b\0301\026\265\370\277>\300\344\233\300S\363a\005`\333\213\005\356\310\025b'\036\363\035\357\205^\250\363w\252(f\025c##\"I\222\244\003\203p0\310H\311x2Vv=~\243#;1\324R<\207\0204\212 IFD\244\240\240\240\214\242j1v\nO7\377\322K\262\324\212\002\371/\200\013\n\221cx\031\004\255}\304\346\"]\247\242b\r\273\245\275\325\021\010\320t\200\234F\014&3_\330D)\2310\274\023\037W\"\024\261d\032\233\245\r\360\206\021:f\223\220\376\241\272\213*6)\371\200w\237zq\246\351otQ\207\244\334\366\347o\363\257\272/+5\004-\320\250\216\340\220NY\023b\035\265D\310}F\221\237\306*?H\005_~'\310\001[\216\377+B\306\030\232\013\264\300\261\326\230\361_\014\313Fd\367\332m\017=\333\365b#\234\214] U\314\212m7\017}\241\252\313\020\375\260\"\352\001\037',\346\357t\300\346\032\250\002\271\216\364\264;i\343\276\241\354D=H\307\213\373[\334@6\340X!\0207c\303\337BZ\2170R\372\233Dc\313\343\277_Z\n\320\243jA\031\001\341\237l\tz\257^\302m\224eAFR\340\236\244Pw)\307\336\\\326\206\322\033\315j\324+\232\226$|XF>\321\220""\302\314\022\000\364\330!\256\215f9\311\307\022\305(k\226\316Tx\310u\301\313g\030\213I\034\276r\200,\244\032\323`z\253`\014\353~\311\324\233\255\346\201\262\305\220\273\024\327\330>N\213\354\363\221\331r^q\366\027\223P(\264\232\242\247\177\023\270pT\361\211\314\310\\\2448#\321;\217\341\203\026w[\236\306B\233\242\361\275\340\004|\352c\347\201\345\272Q\0346\366\001\333\363\010\344\365\336\t\265\365Xqa=\36315\242\277& 3\323\277\205\300\000\370\375\212X\202Y\376`\016\271\301\000\024\337\007\031+\001\250\321\303\262\234\235\331\347\370+^\203\032\213\024;\222\2013\002Y\035\2620\013\357\024M\245\276\261\177\205\335mbS8\331\266\313\356\370\030\330\300\355dQ\017-\351\304\267(H\035gq\362\260\206\364\244gUe\342\370\346h\354\"\203H\024_\014\017\030\007\203\022\010\266\023\300\331R\330&}\263\264h\217\354\3003\263\353a\322f~G\357\013\376\361h\200\310\025\302\377\271\360j<\256\024\014\177\244\323G\014[\014_\211\t\277\204\252\240\204\037\202\210\006\215\034\3464__.\270\336w\323>\021\311J\023W\007\023\007\3064\rX6\377X>\265\277\203\r\277\373\301\r\270\331flA\307\256\313N\322d\353%\317-\322\371\001\344]\243\227%\244\315\037\210\251\013\225\257\231\241p\253\224\255\322\363\312\021\215\215\275\266S\375\3446\212-`sG\200\006Tu\323%\035N\326\005|\013\\\013iI\271f\223\320\r\303+(\221l\322\201\373\020\225:YdP\234o~\022\374@$\266\306\022\\\202P\256O\272\177KYf5\0209\303m\242Y\t\263\206\022\023%\021\227\034\226\005N\242\004{\235\031\024\\\356a\334\001/\306S\207:&\321\334\300J5!\261*M\257 <\0307\232\277\260B\375\006n\204;\275\3252B\216\316\331V\205\024\032\030=hY}\000^\014\204-\314*^\201h\2750p\323C\371\265\357R\323\312\375a\333!\331y\000\013)\nh\375A\217\373EP\213\014\362\022B\276O!\247c\310\343\365\031\350\002\252\310$bm\017\215\335\030sRN\362\211wj~\362\321\014\246Y\212\303\226r\2673.\244\225\013\313\213~^?\263B\212\265\224\0350G\357\251\312,\004\202\016\3136\004r\242\036v\017n7\376H\236\020\270\305\210\277zE\347o\355\341'0\2701m7\024\262\007_\004?\2141_\345\211\377'\224\020\375H4\024!M""\025<\224\033dJ\214'q\033U\345\205\027\304\305\267j\363\037\362\203\340\030\034(f\263\247-2\205*\237t#e\273G|$g\251\2172\347\223\326j\305\022>k\256F/\347\222\242\016\2072I\315\345\r\276\203\270\326\213/\0209\266WL\246\0047y\353}\031/q3\251\017s\236\231\332\226\232\362\242`\214A\245\300\206\\\351`\\\367o\212\032\355\223\274u\024\372\0050\305\204\267Xa\351j\350\317^\310\"\347P\224\365a\315!\342A$\262\010\022!%ED\347\212\r\302E9JFg[\222\235&\213\245w\026\033[\023n!o\320\233\231{\003z!$5\377VT\031k\3671a\344Y&So(^$\231\302;\305\347\223\360)\346?\244\260z*\251+\373{\211=\366j\"\263\372\370!\020b\335Iq{\267]%\373x~\023\211\247\363\2115\262:-\372k\274\372\177\206\220\222\311\206\001\203\267\250\247\225\031/@{\273Nl/b\341\353\006%\376C\366\3208\013#\251\025\355\206\242X\350\t\224\220\210H\316\236\26163\331\247(\035l\221\253\232n\306\331\371\336\2267\373v\003\002\326\220s\030<5\364\020F\263\237\312\206\227\303\322\353T\266\346\006\323\263\225\351\010N\216\277\031!\270L`\375Rp\006\247\024\273\312)\362\331-\306\253\317q\013?\007\010`\327\000\000\233\034\202\005\027_w\354} ;\035\020\214\266\017\211\330\301]H\034E\3503\021K\037\013\247\031\247x>s\0344\245\003\371\374\256(9\300C\232\304\005E9\225\230\340\200\024\243M\2629\224\277\246c\033G\330\376^DA\306\276\250*\322\020\001\361O\033\322\022\241\300\206\302_\345\021b\247\025O\217\311wi\231.\330X\032\254\257\027Gdio7<\206\0309\274#\212+\020\213\027\tY\335\336\246#\007,\002\266\327]\346\365\303+\355\225 \232\rfb\342\216\223\004\"\206\2458\314\334!\t\360w\334w\245\346\363\2025\300f\276\t\302\204;\302\016\006\262\361\276\211\323\277\031q\223S@\273\021\371\031\014\363D\212\302\352\350u\177\3764\230\206\301\360]\360A \211}\216\313\341*%\266hY\252bh<\341\343,f\210A\312\000\376\260\210)\316\262\003\032\304\221B\214\212\365P6d\314\30076l\202\234\345R\260\0205&\233\010(z|\r\270\267\375o\302>\005N\013\3529A\002\332\006\200\237\021a7\270{\321q\n'Ol\014\244f\231\373_\222\252\030!%U[\004]\020\370\221\355\336\305\205\376\373\034\007\332\336S""\342p0I\331F\212\377\027l\301\\C\240\360LQ\212\243\274\363e\023I\216\366J\203\234\327\251\212\332\246e:\253\252|\355\266\376\254\271\236\314\345\"\017\026dQ\321A\023om\343\354\260\240U\330\324X{\017\016\257\003\362\356\367\0230\366n\001\221\367a\021\013\317\036\332k\322\317\353\277\355\246C.\031A\022\217;\225a$G\025N}e\000\0303\260q\364Q\342\340A\361\337\274\022\270\375a+\257\367~\023\250\247H\363\315e\211\213\273b\362\276\334\020p\t;!\212\205_\241r\267\241\221\344\335+\022E\325\006\033\256Q\003\356\271\\)\354S\267j\014\307\3677\335\223\264\257\356iB/\266`\235\200\310\212\323t\326 ^\325[\346/|3 \361\034 \322\276J`oc\027Q\337\305\220-R(t9\030\301\303\324v\016X\372#W\334\321L\264\000\257\021\374\325\301\036\234\205\247\3261\336\375\300\246%h\034\262k\034\037\326`\277J\252\"\030\263\314,j&{1@\264 \214\"\032\315\331\374U\221i\260\222\330\344+r\010e\032O\333V\014\241=T\020\276\2611\204\217d0\007i\001\301\303\236H\321*0\030{hB?\304\326\007\270\033 \314\244>x3\273\330P\306\016\264\032(\302\003\274\261`\224\346O\0202\327:\031\212\003\\&\347\007\357\271-\300y\377\017\t\026\354\033\340\333#\232\037E\372g\330\260\325\212\000\344\364\004=\\9\010\361\331\334\363;\234,7\0038f\3628;\250v{\022\223\"\241\340 \366M\014s\253\274\226u\026\335\212#\341\014\264\221\350f\030\025W\03297\204\203t\007\262\016\207\321\343\245\r\016$\350Aa=.J\364\210\332h\272d\315\326\203\331\356\010\321\217\356z\202\024Y\306\"D\264:\300x\230f\007H\340yN\324\345\307\200uW\2547 \250y\\\240\322\271\357\241\235\"_\315\351\310\257\347\252\245\272\216\321E\341N}4 OyH\225\245\204\235\013u\330 /f\256]\313\256_\227D\315p$\252\232w\306\337\2762\324X\2213;\353\210;9\313\241\265\353\037\255\001V\205@pd.\251P\241\010i\266\223Z\013\337\237\346\223\007K\001\206%\323\227Po?\022Y\300\363\365#F\333J\243P\266o\276\230\246\007h\371\206\361\313\231K\332\350u{BLR\273\323\2634\353U\356\334X\325\312\357\244\240-\032\307B\210C\201\014\251\177\334\226\t>\276::\177.\375\313:,FS\022?.\377\311\\:\331\013E\367\257\002\312_y\021Z\372\302""\311\275\340[},\034\253Q+s\233\251\02114S\003H\265m\036=4u\nA|<\033L\263\345\237\265\274X\221\222E\270\343\377\200,\302\240B\200P\307\022\363\346]\365\326n\177\336\227q\205\266\340\374\304\276\275\355+TR\377R\261G8\014\242\223]7y\323z\245\211^\253O\342v\333w\272\252\ruKdD\327\347F\241\371\001\230@\273;\233>\213sO\346\342\360\261\223\230\214\310 V\301'\242\215\364\225>\027\370\323\206u\352m\312\016\261\311\356\224\"\277\370\274\210t\305s\365\320'.\223\330\363\333<\223\"\224Yk\027\r\0011\277MZ^N\334\215u\276@\025\213m\317\362\000h\270&\210Y<\243\272\337\252\000GW\226\363;\267Yc-\334?D\223\371T\227|\"\005\367\"\n\364\214f\361-$\024py\233Z\252gv\220\227\303Y\266\0135\274\274B\255\014\341\\\254\311\005\353\006\004\315\306\340\2204\370\263H\313\213\2077\0141.]\264\017\2341I-\374|6X\004\033+\261\245\000\350QM\r\206\204\361:\034\t^4\034%t(\225\240\252[\251\312\210\007\312\t\022\2162\377\336\027\2476\367\265\251\220\307\343\036[\001;R~d\216\315\270\200z\366\365%\026\375=\252\037\225\031\001~k\312\305\013<\323gAk\216lnv\252\027\325\311\267\017{\261\367Y%\265DE\005\304\375\251=\3227A\024|\276J\226\022\000\364N\324\230\245K\355\206\232\241sN\023\307;\310\372\236Ac\370\230Q\022\271\221\313$\335\220pPY\213P$cc(\030\252\005;\361\210=\327x\306 \025\372i\251?\253\253\025\311/GV\361\320\327\241\325;H\333\215x\275\rg$\230\210@-\222\245\001\"8\002\277t\330\273\362:z";
    PyObject *data = __Pyx_DecompressString(cstring, 5361, 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 (5582 bytes) */
const char* const cstring = "BZh91AY&SY\326\360Z\341\000\004\r\377\377\377\377\377\377\377\377\377\377\377\377\377\373\277\377\377\372@@@@@@@@@@@@@\000@\000`\027\253\357F^\260\026\307\267nT\3357m\036\271\006\275\355\351\354\304\2176\321\256\333[a\243\273:\032\000\006BB\235\330\273)I\0326\312\355\347\313!\227}\036\031\020\246DS\362h\325=M\372\247\210\364\ni\371SOD\375L\3224\247\250i\354T\311\246\231\345\004=G\224\032cH\006\236\243j\031\265\0235\r\004\222\000!\r\004\305#\302S\332\233S\325=M\242=FL\236H\000\000mA\2404\036\220\006\200\321\243A\240\310\032d\021\"&\221\247\242i\246\206\206!\355H\362h\236I\372Pi\210\000\006\206L\2323@\023!\223\020\310h4\004\232\222\"\223\364\364\251\274\212zh\231\352\200\323@{R\00651\250\032\003A\210\001\246\200\000\003M\000\323\324\000\006\246\240\220\000\032\000\006\004\331G\2446\246M2h\320i\352\032\014\2004h\003CF\2154\032\031\030\231\001\"A\000\232\000CS\002h\310\t\2424\236\243\305\032=OH2\000\003@\006\232\000\001\240\017P=L\331\364\224'1C!1p\002\274\204e>q\350\376\375\\\276\227\220\002\344j\004k\034\361\345|\205`\201\006t\2519\275\250\250RC\217m\036\343!\0037\270\254\245Mk\334\2061\336\n\334(\250L\256S\250\200\301\203h\023b\025\0131\266\372&&\025d\014R$\334\33379w\020\231\222,?\326A\230\346\031\263\330\274\207YA\330\t\2645R\277J*\220\027wX\r\211\275\225\216\361\024;\313H\005m/\030\335\314\271\204\230\250\223\004t\266\232\025\365\204\254\002\205Uf\307\022V,\254\307xM#y\201S\205\327\326\305;]gc\206Z67(\240\224\243+  B:p\000\336\227S\202RW\313I\245\322\231\242w\305\261\215\323\357H\254mjM\223\345K[\013t\3125\322V\027hc\032@\234a\331\216\270\351\037h2\350`\201\364\321M_>\240UG\376\202\257\367._w\224\247\364\024\376\300\023\005\331m\377x\027\177\017\331~\037\2562]\257\371\254w\343\325w\243\342a\305-\325\275\273\373\315s\230;\230\220~h\222\377\311\255\240As3\373\177rz\0375f\317\353jxEg\220,Ah\005\2607\202\273\356K\350\351\365?\350*\234\240\251\271\031hz\003\374\267\r\0303\306\361\371\250\021\005\r\034f\360x\356\033\370\202\203\246\013\375\272sj\032\271\355)I\276\323V""\320x&\322\n\374\272p\210(\342\0130U\377\212\310\204\241\223\2018\036\360\244~\374\234\013G+${mR\000\252\t\355\215l\373s\355\2152\307P\303\375z\277\016\031QL\024]\300\220\331E\350\211.\303\3642\026\266\210\320o\023\017\313\327\256\220\321\272yGEw\363;W@*g\361<\220Ya\315\035\232`\032o\245\327d\374A=\2724\202\225\204j&V\324\255b\nO\005\214K\373\016\340\325;3\304\265\001<K\010q\214\306\205\020\243)\301\336*\221\225\000\243!\030\364E(\360t\346\235\200\231\376\244E\210Xe\301L'\251\270\013\323'\357\007\274\207\037L\372\243Q\234H\226\371<h\312\3145\206\260\341\345\200\302\"1\360s(\314\273\n,Y8\217\237;\372H\272\364\234#A\240O*\213\230\331\036\210\217\223\200N\325\263\013\344^\372M\030c/\273O\013\260\365\007\\\271\257d{\372\351\262\rt\263\265\215_\202\273\275:\004\346\274\311\034<c\247\261\310#\211ekm\361T\025\214\030&\232s\227\025\036o|\252\t\264\341\020\302\346v\216\366\374\300;\207\233D\321~\224\360(\212=\334p\375\223h\356P\253Hk\352\230((\007K\252q|*\211\356\327\223q\251\237\210\352\276\211\323\226R\231 \245\344\3142\224\324\264\331\312\264\272\031SK*\220\335K \224\304\240\203p\nL\024\250\202d;)\313\2767\376\327\254\002~\177\r%Z_j\256\214\345\002\352\277\2755\235i\334\203\252\335<\363\322\332J\312\240\306\005\221\242\360\332j\231?5\303\236\225\031\2349\224\242\365l\215>\262\364\033Sc\005\250\344\347\326\353G\330q\277V\303Q\265%\255B\035Q\375w\277\306\316\3706\013\r\242\267',\247\311w\323>>\263\264c\255c3\224\301E&\212?u\335MP=`\276\376\325\255\265\256E\013\220\347\270!\310\312\210\001_\307&Z\271\013\024\007z\347\226{,U\245\321\364cU\326\362_\321\023\036\366\277\317\274\027\205{\t\254x\024\300\242\221\026\377b\277\270\367\266\215\002\312\205\355yOrd\305UU\001l\332\221!\001\005\202\300[Z\275\207\235\320\341\232\305$MT\rE]\266\2219\004\352&\207%\205\337j\222\010:\377\347\260'\n59\250\366\241\372~l\014k\346\260\022\314\037\316U\025]\335\312\332\226T\014\033\325\026\2725\001\366\241\364\006\202\030\023\373\257o3\353\371\247\316\316\252\252\252\252\252\252\252\363<\261\2327+""\330G\315({\261|\373\037z\351<\272\372v\243\331\"7\334\tj\232\033\340\271\251\005ji\364\0223\317[\247\037\326\255\345\336H4\001\245\210\231\327=9\260\253 !\351\036\023\026\357\213\371\037L`\271\366k\014\010\253LS\001\272Fd\026\215QV8\206\206T\246\014\020&\2225\325\226D\323\204T)\0133\013\307\332\352\272\370\rA\323\236A\177\3052fT\354B\017@t\014\214nC\222\324\026\210\232%\335\214\t\024\020\265@~8\260,F5q\240\234\032\33249\264i\035\004#AB\271\t|\0131\2446\0344\264\300i\204\310d\257^\035oh\363\037\250\300\301\t\2463z\265|\365\364\236/\320\245\345\312TS\224\021\306\"\374\212\327hl\331\237\035A\005\262%\251\277{\321\263\321a\313\\%\275\355.q\261\312r\021\247\231i\344\213\006\265j{:zB\224\266\337\036E\0276\037|[\237w\201\216\351\317O\305e\275\366\357\336\371c<1t\316\224}\3644J\006K\266\331N)\273\016W\021y^G\274[\014\272\235\315\2656V\343-\264I\252\314[\025\rf()7\267\334$U0\246\271\220\033@\366\276h\354%YB \266\240\377J\362n\325\321\006\206\322\321\r\016F\031aZ\031\350\311\214\203\313\271cV}\336\245\333\357\236D\035\336\247Q\336n\241\313\265\216'Nn5\3666He\n\225:\270S\210t\331Q\360\031\036W\214\376\367D\335\227?\177\217^\355U<\200p\036h\375\307\326\244vH!\254\326e\277Y\023\013\235e\022\346\345\320\366\rQ\033\207\027Sn\346\271y\243\3527\250\355\327\337\257\225k\357E\264\276#EN\\q\272\373\227?\267\233nA\305C\346\346\234\212!\306\276\032\\\322{n^\014)}\247\001\244\211\253\267\307\237\317\355\325\206\000\362Zz:\371\303\206<\030\216\244k\267wt\024\353\261$.\231\207\010Y\262\227\217\264\327>I\203\346\301f\311\2559\354_\363&\225:\022Y\260[\344\024\337\211Y\232\314\021\010\211\"*\013#\214\207\"\3541`\014\320#,\"\356\365\236\003\354\221\350\016\326\226n\265\370=\237\201\331\326VY\351\226_{\020\225\237#\216\007o\230n\\\265\006p\307i\266\217\026\254[\302\317\303\213\347\352p\000\322\0008\312\264\201\365\025\010\241\271c0\227\234\210\362Yy\231\033Z\275\301\030\240`\335\324F\n`\277h+\001\201\001|@\310\001B\017=\244\016\242\227$\250/\013\351\344\310\001v\260=z\362\372\260u[\361\370\364""\365\347\245j\231\3347-o\321\213P\232\206\276\267\023\033\2210U0f\251G\255\217y\265A!\032=\231\225\214\347\362t~\367\247\217W\016\376\377.z\226&\275\361\004\273\tA\245\255\334\356n\247P{\270\207,~\265\350\310\221\201H;Sh\364\300\030\202\243i\213\271\303^\014\206\031]\014\264D\325a\232\305*\n\304\310]u\240\246r\372\331\t\327u\360\355y;\273G\r\264\330p\332\263\322\2502\020V4\237\235\300\337Do\316\255\346W]\221\270m\342C\211\216\020\237\253\220\357\000#&\020\273\273z:\016\033;yr\342\033\370<x\2638\231\325\224^=\336\351\355\364\236\257\227\345\335\242\241\221e\273\267n\366\365\240\326\027-\354\341\321\033\301r\303\314s\232e\227\017<\347\237\327\363\233\205U\221\234\036]\202\367&S\215\201\005&\246{\272\351\350\241\223\240\335\261j\254\223.D\330\233B\221\035N\004\343\3069\344ad\320\210\226\354\302\323\306W;\354=\365Gb\203A\330(\217g\261x\302\305bY\202}q*\364A\261\314\311\241\014Q\216\254c\223e\007v\363+\345gq\022\305\207\221u\330\262\330\260\243H\206\010\311\220\325\201\367\354\266h\302X\332\211\266lf\267\022\246q\342\366L\251&\027\334@J\350\327\204yi\277t\345\204m\333i\325\\\261\263Lp\245%}`C\272\212\036\230\0318\314\261\024(\303m\rY\250Ye\025\260^\224\216>\372fb@\016\033&Fs9O\004\235\264k(\232\302\366\010\242=\013\260\002\372\261\2040\002\346\342\321\257|\245\307\300%\206\252\315 \303\216\006s\214\322\001\004%\023\235\255\217\025h\304\350\306\242\325\300\210 \3641\3600\367\022f\313,(\367\331\351\316\305\367Iz\263\300\302\035i\021\251\304\243@\023\302.\224\362#\002\206\253eD`\332w\3124J\347\240\214Qk\305\206;\340#\034<l\016uN\n\237\013\202\356\017\372\205\007\247+\031C\ti\"\241\246z-\3030Y\320sv+\333\312\tP\304\035B_4\344N\307u\263\235\004\033\245\026\214\021\006t\313*l\231U\203w\263:\3462)\"*2x\021&\376\\\251\240\231u[\"\034\0201\304C\210(\315&\303\ni\267\341@\215y\325%\251\215X38\366\301p6<\367J\367\343\2564\222\223\365\357\367~\326\310\367\263\256\247_\236\260\r\034> \025i\301o\207\003\205\024\025i\263i\367n\250\034\020s\320\333\356\266P\363:\230\005\006\010E!\301$PU""\022\033\240\231\363\204\320<\343\234VP\005\330\260Q\n,\025\010\314\276(S\266\371\355r\005P\030n\307Y\310):\\\213\215\355\020\367\261\2715\313\350\005L\201^\036q#*\002\000d\226N?}\266\355\210q\302\305\323\223_\326+\255U\342\337\217\036&\010:H\202\222\217\020[\366\366\232\220\031\237e\202hZw\037\021p\275`\202\325\347\240\220\220^\325\022\014\362\317U\343\315\335rzx399\305\260\321\010\265\322z\2203\245A\221\316\027\027\302\006$\022\002\271\205aP\221\311\351a\205\001B\006\tH\025\250R\273\254w\317\005\371\036\273{,\205Y:\322\005\030\273l\211\311\2260R\231\234\211\245\240\023\311~\031\014\320A}\240\203p-\213\211\272\353m6z\301D0]\224!\311\204!&0L~\220p2N\023\036\224p\202OcF\355p)\264\016Z\257\236%\327%\033\001o\214:ASd\210Q\227\243\310\376\346\255zi&\002\277\341\2345\331\020g\366\335\341\n\211f\247K\2468\262\302\023\3702\207\247lH\275\325\n\340\324\004\321x\"!\035\034\347\224\3549G\206\203dz9\270\241A\364\277(p\262\3154\240(\361\005\276\260P\353x\223\234p\005le7\225d\n.\302\362W\206L\272\036\022\264\027X(\320\311\003\020\326!\234\275:\273\301,H\205\217\000B\241.(`\220v\242\034\224E\214U\025\025U\021c\0340\261\274\335\337g\036J\227c1&M;C\037\217\326d\214)V\n\243\231\037JP\313r\306`\264L3\022\233\021\000\2439].,\"\223\260H\350.1\024MEA}w\362\330\037\r$\305k\031\232\004\r\003\316\303A\264\322\205\033r`Z\236\003\220\227\225e<a\022\354\205\260;\2600\204\216\320VQ\n\312j3v\361\207\215\262B\237vS\362Zx\326\263\231M\341+\026\221 \333R#N\222\240\246\255`\356}(Rb\014\214\374\240\264it|\255\2240\263M\263\223-\343=\264\324Z\205s\336\030`z\324H\034A#\360\256\244\366l\213\202p\304\020nK\215*<Y\265\320\362&1\244\304\332\212\014\220\250\301\330\255\365X\2658\302Zc v\315\331\244<\007\003_1\341\352\343\240\023B>~\204\004\2371\032t\305z9\250\201A\023$Q\r\352i@\270D$\232\216\227I\017\320xz%r\000\301\364t\352\013\333/\362<\202\272\tDRE\264Ds2~\273'\256\205XQ\242\375yRs\021zbd\256s\273F2=W\275^\257\311\250.\344&\230\314\332\026\000\232W\366\341,\354\204\010\324\317\215\263\2449{\2639\267r""\022\317k-|Y\250p\371\3341\217\346s\360B\353J\236\010\005x+\201i\004\303\317\263\225:\2304\364@\310\034&3\213D4\030_\023\231\036\320\221\337\325N\356|C\243m\271V\234\240\004\300V[e\222Pq`\233IE'Y\204vJ\016\247\030\341i\274J\001nz\0261\rE\230\342^\0375X\362\222\267f&,\033\033\363S}\344p\224\257\026\202\032\346k}\334\360\205\220*\023KQ\220\254a\335@-\352:\247\366o\265Z\3427D\231&\033\316\226\376x\024\346\tQT\356h\233Gni}V\005\210J\210<\373N:\315\200\027\002\354\004\301G\036\270\220\t\207\256v\234\363-H:P\266\002\324*\217<P\255jy4\326y\372\353o\302\232\355\2244g\204\0360/\220\331]\261\000u\002\331\264\026\313\375\006%\300--\202\355RD\"\337~E\363P\2616\356\032:\214\372\253\272\347[6\371\231\264c\344c\031\223\233\335\tF\216}\367\346@\026D\r\2227\362f0\262\232\027\\\035H\233\022\233!\376u\336M`\310M\036a\245\313\000Sh\005\350O?\003\303,\004\255\336FB\223\215\320\211\271\221\t\0017\246\"f\031bl~]\005\234\350\322\325\372\025\220/kJF!\017\022 \037V\366_d\304\0040\243\274ue\006\031\264}\205K\321}\216\335<r<\224\324\014\004\345\334\261\320\236Y\341\222\t0!\006\206\206\250E\022\007\316\321\363\003#l\000\2610p\225\3050\325.\331\320\010\322\300\260\363G\361\2016@0,\005\3006\2629\373\324\026\246\360.\032\322\225\020\252$>\264\313\271\202\026(d\300\240t\242\2000@\310c\360@4\\T\363HR\005\201\336\024cPJ\351\224)R\364\323\033`\323\022\014\245\210\244\315\"KS\373\000\273n\0139\367\301'S\301\361>^\244u\017}\37627\203@\310\326J$>n}\266q&\364\202\215b\016I0\351\032\244\364L\230\212s\326\354\255\005 \253P\266\263\270\026\017\310\226\231\215W]\225ax\017I\232\255\007\203\002\223\336\376k;\014\262\232\256\010P\350$w\200\322Z\030C\226\364m\330\002\270Z\257\250,\263\327\022\235\210Y\017I\262\243\243\212%\343`\213\n\316\r\316\3478\210x=\322B\340\006\211`4\007\242\331\006H\t\364\211\333\330UMET@\242\304\233\004aY]\263\301\027 UH\264j\261V\3122\206\251\253\024Ul\324,\330\321\035\356`\320\025\216\226\267\033\211\322bA\303u\005}\016ir\005c\270\235\247)r\240+\004\035\006\213\372\217Ql2\254K(\223\310""\252Nf\245\257\331<u\272\\\013\020\006L^\313\211_-\263\263b\301^\332\365\342\323@]\323\026\224`6\020X\033\261\th\"\213xO\030#b6\240\250\305\210\"\347\363bGtw?\020\\\375/\315/\213'\202\256\330\325\360):\342\t\362~\320QTm\005p\227z@\302\366\306\210\234\255\364\320%B\004\356\257\2464M%2V\300\333\231)V\310\327kF\252\363\375\246X\317\267\020\330\272\260\274\327\313\337\274\306\335\334A\034\370f=g\204$\367n\225L\001r+\242\301\327\240\037\261\006\374\255\213\260\215K\211\272\315^\321m\265\252\271%W-0F\2022Bz\324\3101\265\254\210b\006\024(\204\347![}\322&\330&\307:\311\n\207lJ\267u\203,*P\322g\332\352\362\016\256\216%\356\265fn\337\233\004\020\237\020\2033H\024\302u\260\005\357\326\200\270Ak'\331\"\331\325\253\3707lDD!9(\"\007z\262\306\242U\253\262\245p\216\253f\\!\221\020\332\"d\202\341\2150\r\353w\232\316\342P\265D\226\233exI\244\022d\200u\301\201=\344\306\306fL_\007\002\037gVtB\356*\002;~7*\004B\246W\232\315\305\222\311\245\t`\013\317b\016\266$iV\202aj:\201\201\247VF\324\224\233\006\312\332\343\"\227J_\025jcl\024\205\371V+\301\311\241@\263\315\304[`#!h\004\3640\227_hN\354\203@4\306\203\007\026B2'\025:\305\327\326\206\235:tBd\341\353\234Vp\002\014&\001\024%\3046\242@\320E\t\372\255\353\021\026\361\330\201}F\001\343\313+\263\016.F\036\211\241t!@PvA\200+x\256\033\271\374\247\262\375\204\323@\306%v\241h9\006\354\254\353\260\023\026\315\371Q\203A\336\2221Be\370\017\020\327T\002s\234\203_,\203\341\337\\i\225\211K\307z\026\374Bf\013\016n\346\375\000-@\2658\031\223\032\317\231\351\275\026X\336\313\324\004\330\250B\326]\360D\336\273\313\352\022\366\\\204;)Ifh\321\310\366`\n\267>.$\302\030\271!D\347 R\232my\034\234\014&0&0\243$<\023k\240\016mI\037\003\001Z\337E\304V\204i\332\324\016\020@\302@\240I\026y\346\266\274\206\232\352\203[\014\323\2400=M\264\330m\210'b=<\224\262\303\267\214\374\273\271{\320Y\371\227\373q\255\031^\207\350\321\223\343\321@r\364T3\307\224|\032\232\222\310\036\363\247\"\255\017\334\035\201\324f\333\366\310,\300\351$a\3721\006(\344\017\307\237\366\177\010\254""\202\252\037T\201\203*\240D\002\202\020\252\244P>C\267p.\202\036\236\267\230\241#eve@\275|3b\205\246\315\234\265\321\234hj\366\325\214\003\372\265\360\036&\264\016\036\260\262,q[UA\306?\324\031\003y\376f`gt\221\373\307\r\202D\017\226R\225Zd&\341N\032\211\324\214I\267\005\020\224\342F).\230(\360e\234\340\014\363\n\001\370S\022Hp&\253\0362\340\212\022\034\352\315\016O\000\210\363\2779B\262\245\240\350\3310\250\215\207S\317\007\310\022\375\371\202\372z\216\310A\374\257\350\233<|\004\017\036\336\320]\306\25211\234a\010\261}\213y\245Chg\020\347r\311\320I\024\016\366NeT^o8\362\372\216Ms[\014\234j%'\017\203\222\025B\361~{[\247j(M\316\341`\300\347\2716x\\\317\324\2554\026b \306\223\202\014x\376\370\341\n\207 \237\351k\232\004~\010\220F\271\314d\357\334\030\342\213\320O9:\353\3770jE\232\310\232\230qz\342T\325\217\370\021\306\271\235\374*:\2179\350\372|\276+x\265\335\202\336\366\376\356\027H\267<7C\316\330\362\311\347\303qRP\345w\341\227\305,\262\265GR\367\320+]\300\301.\306\307\313z\3523\007\311]\177!vT`\223;\302\230oI\254\226\307\203\267$v\361K\240\320\314\021\364z\035\225]X\371\375\350\361|x\271|}\226h\206\215\016\344j\222\037\334p\023\t\245;Ym\024\264:\304\0061\237\260f\311\222\322='\264ds0\371\355x}\016\373M\216\313\307\216\366\351\340\254\274I\277\021+\250;k\235\037\241\204\021b\2746\244!\230\314\010\0021\245\013\250\244@\001\275\273\300wog\357R\004i\364\252a\334s\335\036\320\227\277\177\260.\367\2638\222~\272\005\206|\r\347L\230\024\027 5A#[\200\363\002H\210\251!IkP\244\356\201?\r\010\270\213\272{\2325 \322:\335>\312):z\254b\374\024\345x@u\360\244\242\210\272\310t/\016\230Q\370\236\345Z\036\301a$Z\nQ\212Zm(\242\"\210\211\230y\265\203\230E\355\006T=8Qk\031R\\\270\2122*\2413\303\312\n\036\321,\003\221\231\017k\033\303\230p\360\354ox\277\313Ws6&\322\320\256fU\314\263\302\005|\335\327\376.\344\212p\241!\255\340\265\302";
    PyObject *data = __Pyx_DecompressString(cstring, 5582, 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 (5426 bytes) */
const char* const cstring = "x\332\325:\313r\033G\222\346\214d\213\024\307\022\365\262${g\232\022eJ\032\211\026(J\253\321\3323\323D7IX\000\210\027\037\222c\267\242\211n\200m\001h\260\273A\002f(\302G\036q\304\021G\034q\304\221G\035q\304\321\237\340O\230\314\254~\242!\355\20674!3\210\252\254\314\252\254\254\254\254\314z\364\322\235G\261\247\315GK\217\204\365\275\272\365\250\031{\344\3021\017X\336\215\255\270\360\356\262W\341\370\371\362\2437\317\205\343\347\337B>\203\331r\270\270\342\027\227\2378\215\226w\227\227\236\020\264\262\373\304\345\344\022\237\355\212E[?\324\204Ta\313\201\254\272\246\251\016|\244\253\366\276h\033U\275(\024\225\272\265\252\250B\346\265\326\022\212F\243fkf\274bXz\255,\304\r(5m\267(\245\034\304s\301\250k5M\025T\355P/j\3021\344o$\016\003?\241TQ\312\326\214\000\177.\262\242X\226`juS\263\264\232m\t\366\276&\304\005}\357\220q\026KB\302\026,\333\000\272\303t\321\022\352&tc\332\272f-\0213\250\242[B\315\260\005E\250+\246-\030%\301\330\373Q+\002\303\242\251)\266n\324\004\303T5Sx\210=\230\310\244f\0105\030\271P2L\352\265ai&q\263\r\336H\023t\233\250V\243\270/\324\033f\335\260\334\036\245\300\370\036\000+U\023\354V\035\0205\314\000e\233J\315\252\033 \013\307\333\016\276\334\320U\341\030S(\3505Uk\n\307\224\271jR\r\315\252-\302\230\033uj\256V\005\245R1\2124\010\247NM\251jB\265a\331\302\236\206\3128\324UM\225\017A\201B\001\272Y\223,`-(\246\271\266#\034j\246\005-\327\024\275\002\203\205\2619\3344w\216\252Z\3250[\2502K\377\t$\305\364\315\222\220R\232\202r\010\255\224\275\212\346\220\252J\363\315\222\317\251\010\323\357\261\t\240\215zK(\231F\025d\037\303B\036\304\225`\344!S\t\220LM\013\325-k0\273V\253V\0244\034h\230\340\360\250\350\326D\2025\201RG\263\346\023\000C\247\322w\201A\350U\322\276\224\212\2408K\037]%\205\nk\322X'\270\022\3361\270\203\206\006\032\227w=2Nh\204\376^b\031\315HW\233oHz\224\353\030\323\211\365l\232B\267\336;kXX\005W\302\370\010\003\365\320\226\375\016\337\010\nL \022\034K.G\372'\305F\220N\363q<\254\272\212`\353`\334\207J\245\241Y\377\033\035\374\225\275\017X\240Z6T,""\032\325:\253*\326\353\365\204$$P$\004\370\360+Z\215\n0\202\roU,%V\267\231\274-\247\013,\233aI1_`;Y\231\345d1\276!K\211\232\356,_pP\225V\242\006\275\302X\301u\nw\217\253o\356\271\210\212^{-T\224\026\270\227\273\307\225\212O\250\357\267,\275\0102[6,8\027K\016\327+ \005\232Y~+r\302I\344\251\231&\270\037S+\032 o+\351uCP\243\236\022w\205x\026\027\252\270\201i<+c&;\251\220\223\004\005|\271S\322q4\001\324Z*\207\231\233\322\022'\260\260E\331\016\246\031\211\322\027Z\313B \233\341i\220\017\224vr\0160\336GN\242\366\371u\331\311\000CP.\353d\036\r@\316\246\nq\002\274\273+_\265\250\200\237\003\336\212m+\305}\037U6\rP\001\0265\313R\312\2327\000S9\022\022\231\303\247\320\310r\313\232\275\337r\244\307H\342\210\230\006K\027\364\022\031o\032}8\372\345\264\001\023b\357+\266\020o\331\373\0208t\214<\025}O3a\252*-\2302S/B0\304J5!#g\036\256<[\241\225`j<\346X\215=\nl|I\3555\364\212\r\376\030-\311\202xV\022ZF\203\307\036\260\354:\006\300@\003X\2005\301\002\007\205+qQ\251AT#\327\317\2409\304\332EA\325\301 (ZC\3535\245biK\351F\025\244\303\276J\252\343\3717\245\214\260\016\241\330\004\353\303H\236q5\204\245\014(\303\206%\003\271\305\027#\305w*\222Af\364\342\353\nFv\214\n\266\331(\332\030&\240\017\213\007C\005r\255RZ\002\3751\230\027\323\013FZ\263^\321\213\272]i\005\226%\255\322\177*\r\333`ud\254\335-\230\r\355\336\377\265\023\362\257L\255\376\033z\372\320\035@\340\0027\366!{\320k\365\206\375A{0\324:C\213\372\240\235|\360\016l\313\370\360\2430-\353\303wRW\212\2575\233A\006\225?|wv\365\3370\373\007\254j\250\377\217~p\323\341\205\375\01498\367\364\021.\t\313\274l\324Jz\271a\362\223\002\354\335!\220\325\312D\202\210Ly\215|,\201\344\"\263\330\307\241nT\250\215\345\236\220rq\001]/\212\236OacH\255J\276\261WC\227\016[\027\243a\347\301\315\352Ut\310\353[\ti\313o\261%\371`>\235\210\013[Rf\253\366\272f\034\325\370\256\227\321n\344\256\213\203\235\227\207\301]B\271\006\016^u\216>\024o\266\265\232\n[\210\204\344\000t:JH\273\0011\217\361\014\371f\346\336s8\330\374CQU\006\021GSu\013\325\247\325x\332\250:'5<""\230)t>\304\331\241#\027\337\026\223\262i\323_o\301fe\317Z\202\210\t\265\021d\310\000\"\337K\010{\212I'\226=\250\337\202#\027\032\203\"\024\353\252V\022\250\033U\203\216L\215\2071a\251\336\204\003\032l\002y@\306\263\021\365\271\257@\370CrK\200s\035\346M\252\2664&*\337\311\242\250\214O\367\307.p`\226?vQ=\343\373\275\010\312\254\226U\372\370M\240j7>z\031q\017P\346\273K\356\245\177\017\002{W2\344\017\366t\373\343\027\333\223\226\274\327\362\357L\336\337\207\270\374\004\376\261\213\312/<\350r\343\343\223\265\\\304\206\374\016H\267\370\246A\305[\306\212\020\027\005\330\237\342\001ZiU\341\364\275\235\304\235\224w\207\344\210\375\215s\331\013\034\335\20189\243;\220c\353\215p\367\270\366\346\236\177L+\322\321\030w\206\260y\203\252\266s\273)d\370\251\335\331\004\341\375m\335\331v\362\275%\277\251~\340\236_\371\325\364o\343\245V\177sS\n\364\277\245\365]\033oFK\246R\256\002\207{\374\342^\304#\262T\025A1\001p\2111\230\323\006n\200\210\035ca\242\245\331d\374>\331\254j\252\210\227\254t\231\354C\0238\005iQF>\025f?.\306\263)C\325\370\366:\016\361b\274\034\345?\241F\244\027\367\025\202g\023xx\204w5]\242+l\267P\206c\024]1\363mX\020\215\327\230\214\014\334\305\322\215\244\263\301\234\204c\343Ua\033\022AL\252\304hUO@\303\026&\214E\241\3060\260\246\302\030pp\216\353\320\232RJJ\211\033JM\255hR*\225\223RQ\225\021.\242-\300\222\24207\352-\206\036\207\251U\267\010\247/*4j\334+IZI3\371S\005O\321\336|Hn\006\341\t2\204\251Qi<\372\373\332\276\273%P\360\2362P\204\263\250W\302+@\007\244\371v`\274\204wA0L\232\r\247\354\357+\010\311ON\252\004\0074\031\337\232\340\340\267\246\212\246IITb\027\035\021\226\023H\357k\030M\327\023\022\374\313x\203\344\346Qn\001J\204\241GCk\202!'V\361\366[,l\246\022q\266\236\334\014\0267\342b\240\224\336L\313X\224\344\355D\\f\342Va\223e\304\302\006K%\326\003\370UQb\231\027\362K\026O\027rc\370\354\004||CL\257\313,\263\361\222e6s\205 e+\227\303\033\371|A,\310,\265)\005h\211t\242\300\n/3A\211RbZ\\\227%\266\226\334\334\201F\262\234K\244\203\222\245\344\024K\255\027\230\274[""\220\323\371\304&\374\302\304\235DZ\332\334\231\210\244\276\330\262\370>\342j\200\230\006u\025\022k0\332l\000\213\003db\274\220\330\226\371\203C\200\226\023wX\"\303\342\371\255\324\0306\265\225,$\202\270\370\244\212q\226K\347XZ|\301\326\345t\220 \347\023\257P9\273l'\250\367\374\306V\001dO\217k=\237\313:m\202\310\227y\226H\201v\031^V\004\010[\022\023\267\371\270\344\364\332f..\207\211QAwsq\377\275%\236L`\226\223s\362z\002\246,\027 m\246RL\316\027\002\230,\223s\201\032\016\3035\261 &},\030\270cS>.9\001\0274\3350&\334\013\267\345\361\306\376D\216!Cm\301x\305x\\\316\347#\3501\241'\275;\005\2119yl\354\371TD\246|\226I91\221\0166\305\311\014\267\003D2\221J\024\242\335\354d}\251P\211d\324\334=x\305\334&(|;6\001\267\034\302\201\275\254\201\305\254Nl\300\211\201f\251\302\026\213=Z^q\341\345G+\317<\370\311S\027\\y\3647\017~\022\243\226\233\022\270\207\255\214k\302\201\242\343\265&cq%\024\344q\332Zr+\2771\216L\2442I`\023a\017\352\223\242\270\370\3668./\247#\365\370\022\213\326\365\244\0323\257\240\333\220\3445\276J82\227\342S\310K\350\222\301\200s\310\321\303\256nn\026\300\357\245\n!l\\\314\200O\310\277X\236\210%\357\205\353>Hs\327\352z\030\235\n\025]\3478\336\037\272\032\277\220\233\324\001\371e\t\034x>#\313R>DK\200s\301\ncH>/\274\220\201\020\223\207\326`gy\017\233\004\004\265\r\266K&\322/`\275Ao\361\227Q\002\365\3166\244\334\273H\351I\244\235\204\004\336cy7DI\241\357Ho\347\304\224\207Jof\002pD\007\233\031\034\211\024\302e\242\\\010\225\337!\215\020\242\220\0233\241F9\231Bd\020\225\227\261K\tm(\037\017S\2220\353\341\366y\277\263|:\225a\205\255tZN\206\253\354$\n\361\r\007\246\030]\020W\223\341\361\204\003G\210\024\021\031\274\220\264\231\003;\023\363\341\311\337N\344\274\221l\213\311-9\317\215\024\203c<\271\031\177\221\330\021s\231D\255\004;\272U\330\331\342\223}\022\024\rk\013O\rN\026\335'\371\204\3106)\023O\360/\240\260B\250\020e3N\2162\243\307\231\014\275\315\020\277\261\362\004\226\321\032Q\256F\245\342\274O\340V\327\315'0\363)Q&\374\200-\343\371\332\201\341H B\271f\204""\313\036}\313\322L*c\353&\374$\275h\2634\2346rZ)\213\347\r\276%\226\233\t|\206\214b\242\022N\254\023\2215\227N\304s\371<\352\303\311\242\234|B\264\271\021\227\017c\224.\347\214\206\255\231\371\212\246\325\363G\272]\334/\244\260\031O\243\\=|\204i!\277I\ry6\241\245G\2104\245\307\035\347\021g\013\316\016ZQ/\351\232\272\243)\257\363\232\r\006\240\320\251\236\321\227\"A\030\016q\212\252*\246I\307T\335\200\363\227\t\343\321k\232\345\277\312Xx?\262\207\007\034\272>bp~\325m\255\212E\250\010g\037\274\t-j{\320\017\235.\212U\225\225\324bUW\275\357g\234K\222\340a\317?\351\321KW\321n2\374\336IUlE\325\366\032eU+\302\271\010\316\276\3567\001n\0162#H\225\307\236c\234\257\263T\260\"8\346+f\313y\344\207\314(\225@m\214\251F\2211|6\327\351\003A\263EGs\377\231Dk2z\362&~%\303\254*\320\250\324\2003<+\0351\3473\237r\360\256\032\3241v\320\307\242#\032J\031>\3573\324\037\237><\206\323\241\235\213\203 U\341\000XU\t\324\312x\0358_QF\017\177\254nj%\275\351\236\342\361\210\3110!\200\013M \250w_k\356\323\t\035\000\206\023\335B\000\270\355\323h\364\360\003\334\2447\256\3603R\360\001$\372\030\342\2747L\272\322\177\367\255y\364\242w\302Uu\370zu\354\006SW\233\\\267\216\206\371q<\250B\246[\314\263m\264^\253R\321je{\277R\251T\213t\265\010\23510aFW\213\025\243\314\224\212^\256\301*<\000S\257*`\346\2206\341\237)\373\230\026\017x\252a\006\026\206\037\303 \2509)\227\302TI\275\016*X\342\223\216`\251jbV\205\301\3265\323+\342WI\254l\326\375\302A\235\361\257\226\010\305k\231^\307\325#L\353*\245`o\304\373\240\316\323\2104\200\n\227\216\210\237\251\0341\374\270\311i\210E\275~\370\024\212\304\316T\211\275\t\212\017\264\2065\340d\200%\310<p2\217\006\340\021\370\371*\372#r#\360W5\324FE#\3104\\\2150\264\240\032\336\2170J\334\024\027\275\363m\025\336\230\320\255\tZ\271w}\302<\250\006N\210>\234\2555\252\365\272\002b\241\216\320\232\360\013:\3749\346U\263\251\300\227#\254\026X\027\250\271\272A\337\312R\035\364\037\334^\221\231g\201>\344\264c\270(\353\212\251!@\237\023\267\334\253\347=\305\322\\\230\257\256\320e\364""\273\256\332]|\325\253\001\326[\001\375\324[M\247k\002\017\351\202\017\265x\320P*\\[\301\233\303\261[D\357\0060xk8v[\030\276%\364o\007\375[\301\350m\240Y4\213\314\375\230\007\315\200\371~\320\302/-\235\220\343\3065\026\211p\036\002\3270\230\230\005\323\210\227\333\024\361\0343\000H\325JJ\243b\007\342 \233\020\023q\306y\207\356\374x\ty\024\0020\024\361R\320\257Z\r\230>\360g\214>\252 #c\014\277oc\334{U\260\037\337MZ>\322\367\223>\316\325\242\217\301\357;\031}x\351\343\300\346\375\202g\310>*\354\016\337\205_\366\t\341[D\257\024F\217\327\242\004?+l\370S\331P}\320\271\220\2059\347\323~H_\201\200\177u\000\374\034\004JG\212Y\303\037>N\034\301&\004\264J\037\241R\342\314G\363'\275\236im\362\007\211\373w}\360\336'\264\213`NC\353\347\251_?\377\344\354\245\341\334\255\356|7\326\025Gg>\373\271\325\376c;6:\367\371\360\363?w\224\316\301\350\314\347'\312\350\314\271\223\263'[\355y\244\\8i\266\017:\177\350,v\347\306\nW\332\033\035\261\223\353\034u\025\244\034\265\367\206\327\037\364\304\336n?\333\337\033L\215\316\315\r\347\276\356*\335f\357\240\377\207\376<\257\243\264\017;\331N\251\273\326\373\272\177~\020\033}z\2753\325\231\033\2359\177\022\373y\n\263\307'\312\311O\235\353\335\271\356\235\256\325\273\333\237\357?\035\314\375,\376:\373\311\364\354\311\312\211\335~\334VF\263\027\000\210\215.^i\257w\236B\325\371\321\354\315\316|'\326\221\272S\234\270\322>\030]\274\326\256\300HW\272\000^\206vE\350\350\312\315\341\315\373\275\371\341_\377y\n5/\266?En\027\333\347;\261\237\305\321\271\363\320C\253\363\307N\354}=|\332U\207\367\237\017\026\006\306\333\3020\2733\334\371a\370\2032T\264\241V\032}% \031\306v\246\2771\220N?;\265\337\306\020\371yO\355?\034\330\303xaX\330\035\356\276\034\315^\032^\272\r\223 \365H`\253}\273\235\005\201\207\327@c\303E\020\356\364\312i6 \331\205\341\205[4\226\237\3727Am$)\n\210|\2000\274\275\361v\352\355\237\207;\304\0344}\200\215.\266g:\3634\271n\333\271\376\235\376\001\266~|Rl\317\371\255\305\3239\257\325\354\211xRh_m+\274\220F\026\263\303\331\277\200u@1\001r\372""\331\367X\013\347\346J\373y'K]A\275\356\231\356\367=\245\327\234\330\325\352\351\374\350\336\375\336\235\236\335\1776\210\271\275N\377\007\230\205\322\261\273\261\341\031\020\346\327\353\237L_\036^\272\323\335\356\305zI0\246\007\017C\343\2701xx\3520\337kO\271\314\273\261\321\355\205\321\271k0\247 \233\214c\0003\230\3059\214u\304\321\354\027\355#\350\243\331=\350\235\355\025\372\327\007s\243\277,\300\014\234\353_\0304NE,\274\3505\372\0048z\310:\362\341\020\257\265wi\210'\006\210\252v\357\367\276\357+\375\237Pq\2211~7\310\342\030o\365^\240\n\220\003\330\366\331\321\364W \3054,\264\321\264\000\206:\r\006\020,\022\004\355\235d\036\026Y\200JE\234\004T\325hz\021\254z\372^o\316\201\\\006\277@7\320a\243-\302\004\235\237%\303\271\323\315vq2\247ot\346:\013\035R\316Z{\036\247\367F\347\0130X\0058\300\270\224\223\303v\2763E\212\206\336\272w\301\216g\301\212\247F\267\036\300H\232\203\203w\014\025\332\252\355[\3551\235!\032\253BV\003GQ\350\336\354=\357\357\014\304A\0368F\031\245\336fG\211\357\337.\274-\017\267^\r_\375\340p\371\305\225f\241\373c\177f\260x:\007\3663\336\032'\036Vuo\271\367\252o\016\270)\017\317|;\020\301\341M\177\201^ `=\007`$\335\r\230=}pt\372\3430\223\305\362\213\336\244\301\311\247\331\250\255\376\0222\201\362 ;P&4}>\230\037\374\343\355\374[\317\3021\033=x\334\217\365\245\301\231\201|\372\305\333)Z\3600\207\275\205\236B\360\022\254\032\273\017n\347j\373\207\356T\367Jw\267\267\335_\351se\362\2455\333\223\372g\373\257`.\204\273\275O{\373\375I\235\377\327\000\235\306\302\235_\257|2=\327>\347\314\251\2732\177\204\365$\314w\257v\367{\312DU\202\301\014\277\376\333`\216/2\322%8v\\\003\027p.\256\301\002\242\031\374\316a\214\006\246\366\356\367\305\t\242\200_\342\330\327\235\313\270\006\275^\316]\034^\274\315\235\222\343\336p\206\247\0026\004F\214\332&O\314\025\210\361\303\036~\371\r*\t\227\324\364\311eX\346\227\3332\360^\353\336\006o\361\030\206\304\227\3001F\251\356\255\256\010\302\225z\253\200w\226\303\255\356\"\250\374VOt9\254\201\363\335\356<\206\250\024\357\036\201""\243\236\237\300a\277\267\007\262\021\007\276\232\335\206/;\305\356\215\336\355^\326it\320\236\202\341O\250\370\252c\201\301\304\301+Z\003X\3350\312\367\265X\207x\265\017\254\257\367.\367\022\375\374`\346\364\366iv\202\\\325\376r\337[\350\013\335up\2270T\344\002\321w\276{ex\007\014\221\263LB`\373\026b\352\203~\021\226\010\010\220\352\\\351\3747\330^u\260\002\3464\215\313T\006'\363\336N|\t7;\313\235\377\201\0257a\340\303\013\367{\213\020kn\367\263X{\346\344\257m\000\300\030\317^kg\1779\003\023\277@|\025\177\007\342\333\005\337\201\234\ry\360\313\355g\340\301W\301u\005\301\353\235s\260H.A\033\300\376g\347\326\360\253G\375)t\3530\342\331\253\303\253\350\021\236\301z\0239}\236\002\371\327\260hJ\375\027\203\203_\246\235\035\217\263\365\230\031\316\200\035\217\002\tz\\\016\241\213\235\001v\243\031\364\270\001*\025!d;\t\372\355\031\364\352\034\242\344K\330M\360\266~\342\327{\210\372;\177\362w\360\314\240o\256\255\333'/a\257\362%X#\364\372\247\341\237\036\200\325ph\201p\321\t*\367rP#0A3'K\2606g0*\314`\010\341\322R\217\204\363\023\022\345.\254\347\231o\260\023\032\020\325\303X\305GJ\365\010\242A\022\325\257G8\014\230T\014\217\005|\203\320\375l\270\370wp\221\350%F\023\242\023\356\202`)\202w9{\376d\261=\327\236G\023\330\247\335\332\231\213`T_\300\016\361\022\006\360N\036\334\227\334\273\nN\322B\333\352\377\010\201\204\252\\j?\201J\227asv\266\233\357M\365n\300\266\361q_\035\334;\215\235\306O\017\370\276Rk\307\332\264\346\241\005nq?;!\227\377\024Z\203\005\335\350\334\244=1\000sA\233\240\251'%\221\036c\340\2558\216t\206\211?\344\177\001S\242F\211";
    PyObject *data = __Pyx_DecompressString(cstring, 5426, 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 (15441 bytes) */
const char* const bytes = ".%016x0.0 Gbps0x100.0 Gbps10.0 Gbps12X14.0 Gbps1X200.0 Gbps{:20}: {:<20}\n{:<22}: {:<20}\n{:<24}: {:<20}\n25.0 Gbps2X2.5 Gbps4X50.0 Gbps5.0 Gbps8XActive MTUActive speedActive widthAtomic capsBad Pkey counterClosing ContextClosing DMContext: opened device {dev}Device cap flags\n    Device class represents the C ibv_device. It stores device's properties.\n    It is not a part of objects creation order - there's no need for the user\n    to create it for such purposes.\n    Device {dev}, node type {ntype}, transport type {ttype}, guid {guid}, index {index}Device doesn't support dm allocationDevice name must be providedEvent TypeFDs in arrFW versionFailed to allocate device memory of size {size}. Max available size {max}.Failed to close device Failed to copy from dmFailed to copy to dmFailed to find device {dev}Failed to free dmFailed to get async eventFailed to get device listFailed to get devices listFailed to get pkey index of pkey = Failed to import DMFailed to import deviceFailed to malloc FD listFailed to open device {dev}Failed to query EX device {name}Failed to query device {name}Failed to query gid {idx} of port {port}Failed to query gid table of port Failed to query gid tables of the deviceFailed to query gid type of port {p} and gid index {g}Failed to query pkey Failed to query port {p}Failed to query real time valuesFailed to query real time values with requested comp_maskGID IndexGID table lenGID typeHW version.IBV_EVENT_QP_LAST_WQE_REACHEDInit type replyInvalid MTU ({m})Invalid link layer ({ll})Invalid physical stateInvalid speedInvalid state ({s})Invalid widthLink error recoveryLink layerLink upMAX CQMax AHMax CQEMax EEMax EE RD atomMax EE init RD atomMax FMRMax MRMax MR sizeMax MTUMax MWMax PDMax PKeysMax QPMax QP RD atomMax QP WRMax QP init RD atomMax RDDMax SGEMax SGE RDMax SRQMax SRQ SGEMax SRQ WRMax map per FMRMax mcast QP attachMax mcast groupMax message sizeMax raw IPv6 QPsMax raw ethy QPMax res RD atomNdev ifindexNode guidNote that Cython is delib""erately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Number of fd in arrODP General capsPage size capPhy testPhys port countPhys statePickling of struct members such as self.dev_attr must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.alloc_dm_attr must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.attr must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.entry must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.input must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.odp_caps must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.caps must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.tso_caps must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.rss_caps must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.packet_pacing_caps must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.tm_caps must be explicitly requested with @auto_pickle(True)Pickling of struct members such as self.cq_mod_caps must be explicitly requested with @auto_pickle(True)Pkey table lenPort cap flagsPort cap flags 2Port configuration trainingPort lidPort numberPort stateQkey violations counterRC ODP capsSM lidSM slSubnet timeoutSys image GUIDUC ODP capsUD ODP capsUSNIC UDPUnknown event_type (Unknown gid_type (Unrecognized object typeVendor IDVendor part IDXRC ODP caps{}: {}\n):\n  ?add_notedisableenableenum class ibv_atomic_cap not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_device_cap_flags not import""able from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_event_type not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_gid_type not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_gid_type_sysfs not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_mtu not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_odp_general_caps not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_odp_transport_cap_bits not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_port_cap_flags2 not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_port_cap_flags not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_port_state not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.enum class ibv_values_mask not importable from pyverbs.libibverbs_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py  or .pyx file.gc in index isenabledlocal CA ack delaymax VL num of port pyverbs/device.pyxpyverbs.pyverbs_error{s} ({n})self.attr cannot be conver""ted to a Python object for picklingself.context,self.device cannot be converted to a Python object for picklingself.dm cannot be converted to a Python object for picklingself.event cannot be converted to a Python object for pickling(tree fragment)ActiveAllocDmAttrAllocDmAttr.__reduce_cython__AllocDmAttr.__setstate_cython__ArmedAsyncEventAsyncEvent.__reduce_cython__AsyncEvent.__setstate_cython__AsyncEvent.ackCACQModerationCapsCQModerationCaps.__reduce_cython__CQModerationCaps.__setstate_cython__ContextContext.__reduce_cython__Context.__setstate_cython__Context.closeContext.get_async_eventContext.get_pkey_indexContext.query_deviceContext.query_device_exContext.query_gidContext.query_gid_exContext.query_gid_tableContext.query_gid_typeContext.query_pkeyContext.query_portContext.query_rt_values_exDMDMAHandleDMMRDM.__reduce_cython__DM.__setstate_cython__DM.closeDM.copy_from_dmDM.copy_to_dmDM.unimportDeferDeviceDeviceAttrDeviceAttrExDeviceAttrEx.__reduce_cython__DeviceAttrEx.__setstate_cython__DeviceAttr.__reduce_cython__DeviceAttr.__setstate_cython__Device.__init__Device.__str__Device.guidDevice.indexDevice.nameDevice.node_typeDevice.transport_typeDisabledDownEthernetFdArrFdArr.__reduce_cython__FdArr.__setstate_cython__FdArr.closeFlagsGIDGIDEntryGIDEntry.__reduce_cython__GIDEntry.__setstate_cython__GIDEntry.gid_strIBIBV_ATOMIC_GLOBIBV_ATOMIC_HCAIBV_ATOMIC_NONEIBV_DEVICE_AUTO_PATH_MIGIBV_DEVICE_BAD_PKEY_CNTRIBV_DEVICE_BAD_QKEY_CNTRIBV_DEVICE_CHANGE_PHY_PORTIBV_DEVICE_CURR_QP_STATE_MODIBV_DEVICE_INIT_TYPEIBV_DEVICE_MANAGED_FLOW_STEERINGIBV_DEVICE_MEM_MGT_EXTENSIONSIBV_DEVICE_MEM_WINDOWIBV_DEVICE_MEM_WINDOW_TYPE_2AIBV_DEVICE_MEM_WINDOW_TYPE_2BIBV_DEVICE_N_NOTIFY_CQIBV_DEVICE_PORT_ACTIVE_EVENTIBV_DEVICE_RAW_IP_CSUMIBV_DEVICE_RAW_MULTIIBV_DEVICE_RC_IP_CSUMIBV_DEVICE_RC_RNR_NAK_GENIBV_DEVICE_RESIZE_MAX_WRIBV_DEVICE_SHUTDOWN_PORTIBV_DEVICE_SRQ_RESIZEIBV_DEVICE_SYS_IMAGE_GUIDIBV_DEVICE_UD_AV_PORT_ENFORCEIBV_DEVICE_UD_IP_CSUMIBV_DEVICE_XRCIBV_EVENT_CLIENT_REREGISTERIBV_EVENT_COMM_""ESTIBV_EVENT_CQ_ERRIBV_EVENT_DEVICE_FATALIBV_EVENT_GID_CHANGEIBV_EVENT_LID_CHANGEIBV_EVENT_PATH_MIGIBV_EVENT_PATH_MIG_ERRIBV_EVENT_PKEY_CHANGEIBV_EVENT_PORT_ACTIVEIBV_EVENT_PORT_ERRIBV_EVENT_QP_ACCESS_ERRIBV_EVENT_QP_FATALIBV_EVENT_QP_LAST_WQE_REACHEDIBV_EVENT_QP_REQ_ERRIBV_EVENT_SM_CHANGEIBV_EVENT_SQ_DRAINEDIBV_EVENT_SRQ_ERRIBV_EVENT_SRQ_LIMIT_REACHEDIBV_EVENT_WQ_FATALIBV_GID_TYPE_IBIBV_GID_TYPE_ROCE_V1IBV_GID_TYPE_ROCE_V2IBV_GID_TYPE_SYSFS_IB_ROCE_V1IBV_GID_TYPE_SYSFS_ROCE_V2IBV_MTU_1024IBV_MTU_2048IBV_MTU_256IBV_MTU_4096IBV_MTU_512IBV_ODP_SUPPORTIBV_ODP_SUPPORT_ATOMICIBV_ODP_SUPPORT_ATOMIC_WRITEIBV_ODP_SUPPORT_FLUSHIBV_ODP_SUPPORT_IMPLICITIBV_ODP_SUPPORT_READIBV_ODP_SUPPORT_RECVIBV_ODP_SUPPORT_SENDIBV_ODP_SUPPORT_SRQ_RECVIBV_ODP_SUPPORT_WRITEIBV_PORT_ACTIVEIBV_PORT_ACTIVE_DEFERIBV_PORT_ARMEDIBV_PORT_AUTO_MIGR_SUPIBV_PORT_BOOT_MGMT_SUPIBV_PORT_CAP_MASK2_SUPIBV_PORT_CAP_MASK_NOTICE_SUPIBV_PORT_CLIENT_REG_SUPIBV_PORT_CM_SUPIBV_PORT_DEVICE_MGMT_SUPIBV_PORT_DOWNIBV_PORT_DR_NOTICE_SUPIBV_PORT_EXTENDED_SPEEDS_SUPIBV_PORT_INFO_EXT_SUPIBV_PORT_INITIBV_PORT_IP_BASED_GIDSIBV_PORT_LED_INFO_SUPIBV_PORT_LINK_LATENCY_SUPIBV_PORT_LINK_SPEED_HDR_SUPIBV_PORT_LINK_SPEED_NDR_SUPIBV_PORT_LINK_WIDTH_2X_SUPIBV_PORT_MKEY_NVRAMIBV_PORT_NOPIBV_PORT_NOTICE_SUPIBV_PORT_OPT_IPD_SUPIBV_PORT_PKEY_NVRAMIBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUPIBV_PORT_REINIT_SUPIBV_PORT_SET_NODE_DESC_SUPIBV_PORT_SL_MAP_SUPIBV_PORT_SMIBV_PORT_SNMP_TUNNEL_SUPIBV_PORT_SWITCH_PORT_STATE_TABLE_SUPIBV_PORT_SYS_IMAGE_GUID_SUPIBV_PORT_TRAP_SUPIBV_PORT_VENDOR_CLASS_SUPIBV_PORT_VIRT_SUPIBV_VALUES_MASK_RAW_CLOCKIWARPInfiniBandInitLNOPODPCapsODPCaps.__reduce_cython__ODPCaps.__setstate_cython__PCIAtomicCapsPCIAtomicCaps.__reduce_cython__PCIAtomicCaps.__setstate_cython__PacketPacingCapsPacketPacingCaps.__reduce_cython__PacketPacingCaps.__setstate_cython__PollingPortAttrPortAttr.__reduce_cython__PortAttr.__setstate_cython__PyverbsErrorPyverbsRDMAErrnoPyverbsRDMAErrorPyverbsUserError__Pyx_PyDict_NextRefQueryDeviceExInputQueryDeviceEx""Input.__reduce_cython__QueryDeviceExInput.__setstate_cython__RNICRSSCapsRSSCaps.__reduce_cython__RSSCaps.__setstate_cython__RoCEv1RoCEv2RouterSleepSwitchTMCapsTMCaps.__reduce_cython__TMCaps.__setstate_cython__TSOCapsTSOCaps.__reduce_cython__TSOCaps.__setstate_cython__USNICUnknownUnspecifiedWeakSetackactive_speedactive_speed_exaddarrasyncio.coroutinesatomic_capsattrbit__class_getitem__cline_in_tracebackclosecmd_fdcmidcomp_maskcontextcopy_from_dmcopy_to_dmcountctx_listdatadebugdecodedevdev_attrdev_attr_exdev_listdevice_cap_flagsdevicesdictionarydm_attrdm_offset__doc__entriesentryeventevent_typeex_inputflagsformat__func__fw_versionggeneral_capsgetget_async_eventget_device_listget_pkey_index__getstate__gidgid_entriesgid_indexgid_interface_idgid_strgid_subnet_prefixgid_typeguid_guidguid_formatguid_to_hexhandlehex_arrayhex_strhw_veriibv_atomic_capibv_device_cap_flagsibv_event_typeibv_gid_typeibv_gid_type_sysfsibv_mtuibv_odp_general_capsibv_odp_transport_cap_bitsibv_port_cap_flagsibv_port_cap_flags2ibv_port_stateibv_values_maskidxindex_index__init__interface_id_is_coroutineitemsllengthlllmclocal_ca_ack_delaylog_align_reqm__main__maxmax_ahmax_cqmax_cqemax_dm_sizemax_eemax_ee_init_rd_atommax_ee_rd_atommax_entriesmax_fmrmax_map_per_fmrmax_mcast_grpmax_mcast_qp_attachmax_mrmax_mr_sizemax_mwmax_pdmax_pkeysmax_qpmax_qp_init_rd_atommax_qp_rd_atommax_qp_wrmax_raw_ethy_qpmax_raw_ipv6_qpsmax_rddmax_res_rd_atommax_sgemax_sge_rdmax_srqmax_srq_sgemax_srq_wr__metaclass____module____mro_entries__mtunname_name__name__ndev_ifindexnodenode_guidnode_type_node_typensecntypenumppage_size_capphysphys_port_cntphys_state_to_strpkeypopportport_attrsport_numport_stateport_state_to_str__prepare__propertypyverbs.basepyverbs.devicepyverbs_errorpyverbs.libibverbs_enumspyverbs.mrpyverbs.utils__pyx_state__pyx_vtable____qualname__query_devicequery_device_exquery_gidquery_gid_exquery_gid_tablequery_gid_typequery_pkeyquery_portquery_rt_values_exrcrc_odp_capsrdma_get_devicesreal_speed__reduce____reduce_cytho""n____reduce_ex__resssecself__set_name__setdefault__setstate____setstate_cython__sizespeed_to_str__str__str_flagsstr_from_flagssubnet_prefixsupersys_image_guid__test__translate_device_capstranslate_event_typetranslate_gid_typetranslate_link_layertranslate_mtutranslate_node_typetranslate_port_cap_flagstranslate_port_cap_flags2translate_transport_typetransporttransport_type_transport_typettypetypesuc_odp_capsud_odp_capsunimportvalvaluesvendor_idvendor_part_idwarnwarningsweakrefwidthwidth_to_strxzipPyObject *(PyObject *)\000close_weakrefs\200\001\360\016\000\005\022\320\021\"\240!\2401\240A\330\004\007\200y\220\003\2201\330\010\016\320\016\036\230a\230q\330\004\016\210a\330\004\010\210\005\210U\220!\2201\330\010\017\210x\220q\230\002\230'\240\021\330\010\017\210x\220q\230\002\230'\240\021\330\010\024\220H\230A\230R\230w\240a\330\010\017\210w\220b\320\030,\250A\250X\260Q\260b\270\001\330\010\021\320\021&\240a\240x\250q\260\002\260!\330\010\017\210w\220a\220v\230Q\230f\240F\250&\260\013\2701\330\006\030\230\001\230\021\330\004\013\2101\200\001\330\004\013\2103\210a\210z\230\030\240\021\240%\240s\250(\260!\2606\270\021\200A\360\014\000\t\014\2104\210t\2203\220a\330\014\017\210t\2201\330\020\024\220G\2306\240\021\240!\330\014\032\230!\2301\230D\240\001\330\014\017\210t\2204\220q\330\020\026\220l\240!\2404\240q\330\020\023\2203\220c\230\021\330\024\032\320\032*\250!\320+@\300\001\330\014\020\220\006\220a\330\014\020\220\013\2301\200A\330\010\013\2104\210y\230\003\2301\330\014\017\210t\2201\330\020\024\220G\2306\240\021\240!\330\014\032\230!\2301\230D\240\006\240d\320*:\270$\270o\310T\320QW\320W[\320[a\320ae\320ef\330\034 \240\006\240d\250&\260\004\260H\270D\300\007\300t\3101\330\034 \240\016\250d\260-\270t\320CT\320TX\320XY\330\014\022\320\022#\2401\240D\250\001\330\014\017\210s\220#\220Q\330\020\026\320\026&\240a\320'@\300\001\300\024\300Q\330\014\020\220\013\2301\200A\330\010\017\320\017\"\240!\2404\240z\260\032\2701\330\010\013\2104\210t\2201\330\014\022\320\022\"\240!""\320#H\310\001\310\036\320WX\320XY\330\010\017\210q\200A\330\010\020\220\n\230!\330\010\016\320\016\"\240!\2404\240z\260\021\260%\260q\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#A\300\021\330\010\017\210q\200A\330\010\014\210A\210T\220\025\220a\200A\330\010\014\210N\230!\330\010\014\320\014\037\230q\330\010\014\210I\220Q\330\010\014\210I\220Q\330\010\014\210J\220a\200A\360\014\000\t\024\220:\230Q\330\010\016\320\016\037\230q\240\004\240J\250a\250x\260q\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#B\300!\330)*\250%\250t\2608\2701\330\010\017\210q\200A\330\t\035\230Q\230a\230t\2401\320\004A\300\021\360\030\000\t\023\320\022%\240V\2501\250L\270\001\330,-\330\010\016\320\016\"\240!\2404\240z\260\031\270-\300q\330\010\013\2103\210b\220\001\330\014\022\320\022\"\240!\2401\330#$\330\010\026\220a\330\010\014\210E\220\025\220a\220q\330\014\024\220G\2301\230A\330\014\027\220w\230a\230x\240q\250\005\250T\260\030\270\021\330\037$\240D\250\010\260\017\270u\300A\330\037$\240K\250u\260A\330\037$\240A\330\010\014\210A\210Q\330\010\017\210q\200A\360\014\000\t\026\220X\230Q\330\010\016\210o\230Q\230d\240*\250J\260a\260z\300\021\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#=\270Q\330)*\250\"\250K\260q\330\010\017\210q\200\001\330\004\005\330\t\034\230A\330\t\036\230a\330\t \240\001\330\t#\2401\330\t\036\230a\330\t \240\001\330\t\036\230a\330\t\"\240!\330\t\"\240!\330\t!\240\021\330\t\036\230a\330\t \240\001\330\t!\240\021\330\t\037\230q\330\t\035\230Q\330\t'\240q\330\t)\250\021\330\t'\240q\330\t \240\001\330\t\036\230a\340\004\005\330\010\017\210u\220A\220Q\330\013\014\330\010\017\320\017%\240Q\240a\200A\330\t\031\230\021\230$\230a\330\010\014\210F\220!\200A\330\010\031\230\027\240\006\240a\240q\330\010\016\210a\210v\220S\230\001\330\010\016\320\016!\240\021\240(\250&\260\014\270D\300\001\330\",\250K\260x\270q\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#=\270Q\330\010\016\210d\220\"\220A\330\010\014\210A\210Q\330\010""\017\210q\200A\330\010\016\210c\220\021\330\010\016\210n\230A\230T\240\032\250:\260W\270A\270S\300\001\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#M\310Q\330IJ\310$\310g\320UZ\320Z[\330\010\017\210q\200A\340\010\016\320\016!\240\021\240$\240j\260\n\270'\300\021\300!\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\2401\330#*\250!\2502\250Z\260r\270\021\330\010\017\210q\320\004<\270A\360\016\000\t\027\220l\240!\330\010\016\320\016\"\240!\2404\240q\330#$\240H\250J\260i\270w\300j\320PQ\330#$\240K\250q\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#E\300Q\330)*\250%\250t\2608\2701\330\010\017\210q\200A\340\010\016\210o\230Q\230d\240*\250J\260g\270Q\270a\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#:\270!\270?\310!\3101\330\010\017\210q\200A\330\010\017\210q\330,3\2601\260D\270\004\270E\300\027\310\001\330\020\026\320\026)\250\021\250$\250a\330\020\026\320\026.\250a\250t\2601\330\020\025\220[\240\001\240\024\240X\250V\2604\260q\200A\330\010\016\320\016\037\230q\240\014\250D\260\005\260Z\270q\330 (\250\006\250h\260a\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#;\2701\200A\330$%\360\024\000\t\021\220\010\230\001\330\010\016\320\016\037\230q\240\004\240J\250j\270\001\330 !\240\025\240h\250a\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\2401\330#%\240Q\320&9\270\021\270-\300q\330\010\017\210q\320\004,\250A\360\014\000\t\017\320\016!\240\026\240q\250\001\330\010\013\210=\230\001\330\010\016\320\016%\240Q\240d\250*\260A\330\010\013\2103\210c\220\021\330\014\022\320\022\"\240!\320#H\310\001\330\010\013\2103\210k\230\023\230A\330\014\022\320\022\"\240!\2401\330\010\020\320\020#\2404\240z\260\021\330\010\017\320\017\"\240$\240j\260\001\330\010\014\210A\210Q\330\010\017\210u\220A\200A\340\010\017\210t\2201\200A\330\010\017\210w\220a\220t\320\033/\250t\2601\200\001\330\004\t\210\023\210E\220\023\220E\230\023\230F\240#\240V\2503\250a\330\004\005\330\010\017\210{\230'\240\021\240\"\240A\240Q\240f\250B""\250a\330\013\014\330\010\017\320\017\"\240'\250\021\250\"\250A\200\001\330\004\t\210\023\210F\220#\220V\2303\230f\240C\240w\250d\260!\330\004\005\330\010\017\210{\230'\240\021\240\"\240A\240Q\240h\250b\260\001\330\013\014\330\010\017\210q\200\001\330\004\t\210\023\210F\220#\220Y\230c\240\031\250#\250Q\330\004\005\330\010\017\210q\220\001\220\021\330\013\014\330\010\017\210q\200\001\330\004\t\210\023\210F\220#\220Z\230s\240*\250C\250x\260s\270!\330\t\014\210A\330\004\005\330\010\017\210q\220\001\220\021\330\013\014\330\010\017\210q\200\001\330\004\t\210\023\210G\2203\220h\230c\240\030\250\023\250I\260S\270\n\300#\300Q\330\004\005\330\010\017\210{\230'\240\021\240\"\240A\240Q\240m\2602\260Q\330\013\014\330\010\017\320\017$\240G\2501\250B\250a\200\001\330\004\021\320\021!\240\024\320%:\270!\330\004\t\210\023\210L\230\003\230<\240s\250,\260c\270\021\330\t\014\210M\230\024\230]\250$\250m\2704\270q\330\t\016\210n\230E\240\021\330\004\005\330\010\017\210{\230'\240\021\240\"\240A\240Q\240m\2602\260Q\330\013\014\330\010\017\210q\200\001\330\004\t\210\023\210O\2302\230^\2502\250Q\330\004\005\330\010\017\210q\220\001\220\021\330\013\014\330\010\017\320\017*\250'\260\021\260#\260Q\200\001\330\004\n\210+\220Q\200\001\360\024\000\005\026\220Q\340\004\020\320\020$\240A\240Q\240a\330\004\007\200y\220\003\2201\330\014\022\320\022\"\240!\2401\330\004\016\210a\330\004\005\330\010\014\210E\220\025\220a\220q\330\014\023\2208\2301\230B\230a\330\014\023\2208\2301\230B\230a\330\014\030\230\010\240\001\240\022\2401\330\014\023\2207\230\"\320\0340\260\001\260\030\270\021\270!\330\014\025\320\025*\250!\2508\2601\260A\330\014\023\2207\230!\2306\240\021\240&\250\006\250f\260K\270q\340\t\036\230a\230q\330\004\013\2101\200\001\330\004\n\320\n%\240Q\330\n%\240Q\330\n%\240Q\330\n!\240\021\330\n%\240Q\330\n'\240q\330\n*\250!\330\n)\250\021\330\n%\240Q\330\n!\240\021\330\n)\250\021\330\n&\240a\330\n&\240a\330\n\"\240!\330\n#\2401\330\n\"\240!\330\n\"\240!\330\n\033\2301\330\n*\250!\330\n*\250!\330""\n*\250!\330\n\"\240!\330\n#\2401\330\n-\250Q\330\004\013\210>\230\021\230'\240\021\200\001\330\004\n\210#\210Y\220c\230\033\240C\240q\330\n\r\320\r,\250C\250q\330\n\r\320\r$\240C\240q\330\004\005\330\010\017\210{\230'\240\021\240\"\240A\240Q\240g\250R\250q\330\013\014\330\010\017\210q\200\001\330\004\n\210.\230\001\330\n \240\001\330\n\036\230a\330\n!\240\021\330\n#\2401\330\n \240\001\330\n \240\001\330\n \240\001\330\n\"\240!\330\n(\250\001\330\n/\250q\330\n)\250\021\330\n#\2401\330\n\034\230A\330\n%\240Q\330\n \240\001\330\n%\240Q\330\n&\240a\330\n#\2401\330\n)\250\021\330\n#\2401\330\n&\240a\330\n$\240A\330\n#\2401\330\004\013\210>\230\021\230'\240\021\200\001\330\004\016\320\016 \240\007\320'>\270a\330\016%\240Q\330\004\005\330\010\017\210u\220A\220Q\330\013\014\330\010\017\320\017#\2401\240A\200\001\360\014\000\005\013\210'\220\021\220!\330\004\016\210h\220c\230\021\330\004\020\220\001\220\027\230\001\230\022\2301\230A\230S\240\004\240E\250\025\250a\250s\260#\260Q\260j\300\001\330\004\020\220\001\220\022\2205\230\001\230\023\230D\240\005\240S\250\001\250\031\260!\2603\260d\270)\3001\300C\300q\330\004\013\2103\210e\2201\220A\200\001\330\004\020\220\001\330\004\010\210\007\210q\330\010\013\2106\220\022\2201\330\014\031\230\032\2401\240A\330\014\031\230\021\330\004\013\2101\200\001\330\004\n\320\n'\240q\330\n\"\240!\330\n\036\230a\330\n1\260\021\330\n'\240q\330\n(\250\001\330\n(\250\001\330\004\013\210>\230\021\230'\240\021";
    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 < 622; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 183) 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 = 622; i < 664; 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 < 664; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 622;
      for (Py_ssize_t i=0; i<42; ++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 + 0;
    int8_t const cint_constants_1[] = {0,1,2,3,4,5,6,7,8,16,32,64};
    int16_t const cint_constants_2[] = {128,256,512,1024,2048,4096};
    for (int i = 0; i < 18; i++) {
      numbertab[i] = PyLong_FromLong((i < 12 ? cint_constants_1[i - 0] : cint_constants_2[i - 12]));
      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<18; ++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 : 4;
    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 = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 44};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_guid, __pyx_mstate->__pyx_n_u_node_type, __pyx_mstate->__pyx_n_u_transport_type, __pyx_mstate->__pyx_n_u_index};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_N_q_IQ_IQ_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 51};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 55};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_node_type, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, 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), 59};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_transport_type, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 63};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_guid, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 67};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 71};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_A_q_31D_E_a_at1_XV4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 178};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_4y_1_t1_G6_1D_d_oTQWW_aaeef_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 198};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dev_attr, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_device, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_q_Jaxq_3c_B_t81_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ex_input, __pyx_mstate->__pyx_n_u_dev_attr_ex, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_device_ex, __pyx_mstate->__pyx_kp_b_iso88591_A_l_4q_HJiwjPQ_Kq_3c_EQ_t81_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 227};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port_num, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_pkey, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_pkey, __pyx_mstate->__pyx_kp_b_iso88591_A_oQd_JgQa_3c_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 234};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port_num, __pyx_mstate->__pyx_n_u_pkey, __pyx_mstate->__pyx_n_u_idx};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_get_pkey_index, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_1_4t1_H_WXXY_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 240};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port_num, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_gid, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_gid, __pyx_mstate->__pyx_kp_b_iso88591_A_c_nAT_WAS_3c_MQIJ_gUZZ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 248};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port_num, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_gid_type, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_gid_type, __pyx_mstate->__pyx_kp_b_iso88591_A_j_3c_1_2Zr_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 256};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port_num, __pyx_mstate->__pyx_n_u_port_attrs, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_port, __pyx_mstate->__pyx_kp_b_iso88591_A_XQ_oQd_Jaz_3c_Q_Kq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 269};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_entries, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_entries, __pyx_mstate->__pyx_n_u_entry, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_gid_entries, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_gid_table, __pyx_mstate->__pyx_kp_b_iso88591_A_V1L_4z_q_3b_1_a_E_aq_G1A_waxq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 297};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port_num, __pyx_mstate->__pyx_n_u_gid_index, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_entry, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_gid_ex, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Jj_ha_3c_1_Q_9_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 316};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_comp_mask, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_nsec, __pyx_mstate->__pyx_n_u_sec};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_query_rt_values_ex, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Qd_A_3c_H_3k_A_1_4z_j_AQ_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_event, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_get_async_event, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_q_3c_A_q, 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), 1};
    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_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, 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), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, 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), 1};
    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_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, 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), 1};
    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_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, 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), 1};
    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_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_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, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_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, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_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, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_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, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, 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), 812};
    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_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_unimport, __pyx_mstate->__pyx_kp_b_iso88591_A_a_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 819};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_4t3a_t1_G6_1D_t4q_l_4q_3c_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 840};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dm_offset, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_rc};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_copy_to_dm, __pyx_mstate->__pyx_kp_b_iso88591_A_q_D_Zq_ha_3c_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 846};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dm_offset, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_res};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_copy_from_dm, __pyx_mstate->__pyx_kp_b_iso88591_A_aq_avS_D_Kxq_3c_Q_d_A_AQ_q, 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), 1};
    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_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 994};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_gid_str, __pyx_mstate->__pyx_kp_b_iso88591_A_wat_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1012};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_ack, __pyx_mstate->__pyx_kp_b_iso88591_A_Qat1, 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), 1};
    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_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1025};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_gid_type, __pyx_mstate->__pyx_n_u_types};
    __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_gid_type, __pyx_mstate->__pyx_kp_b_iso88591_a_Q_uAQ_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1034};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_num, __pyx_mstate->__pyx_n_u_hex_str, __pyx_mstate->__pyx_n_u_hex_array, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_guid_format, __pyx_mstate->__pyx_kp_b_iso88591_hc_1AS_E_as_Qj_5_D_S_3d_1Cq_3e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1047};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_transport_type, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_transport_type, __pyx_mstate->__pyx_kp_b_iso88591_F_Yc_Q_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1055};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_node_type, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_node_type, __pyx_mstate->__pyx_kp_b_iso88591_F_Zs_Cxs_A_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1064};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_node_guid};
    __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_guid_to_hex, __pyx_mstate->__pyx_kp_b_iso88591_3az_s_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1068};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_port_state, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_port_state_to_str, __pyx_mstate->__pyx_kp_b_iso88591_G3hc_IS_Q_AQm2Q_G1Ba, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1076};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_mtu, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_mtu, __pyx_mstate->__pyx_kp_b_iso88591_E_E_F_V3a_AQfBa_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1084};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ll, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_link_layer, __pyx_mstate->__pyx_kp_b_iso88591_O2_2Q_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1092};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_port_cap_flags, __pyx_mstate->__pyx_kp_b_iso88591_a_1_q_1_A_Q_Q_a_1_1_a_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1120};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_port_cap_flags2, __pyx_mstate->__pyx_kp_b_iso88591_q_a_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1131};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_device_caps, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_Q_Q_q_Q_a_a_1_1_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1159};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_dictionary, __pyx_mstate->__pyx_n_u_str_flags, __pyx_mstate->__pyx_n_u_bit};
    __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_str_from_flags, __pyx_mstate->__pyx_kp_b_iso88591_q_6_1_1A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1168};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_phys, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_phys_state_to_str, __pyx_mstate->__pyx_kp_b_iso88591_Yc_Cq_Cq_Cq_AQgRq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1178};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_width, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_width_to_str, __pyx_mstate->__pyx_kp_b_iso88591_F_V3fCwd_AQhb_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1186};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_active_speed, __pyx_mstate->__pyx_n_u_active_speed_ex, __pyx_mstate->__pyx_n_u_real_speed, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_speed_to_str, __pyx_mstate->__pyx_kp_b_iso88591_L_s_c_M_m4q_nE_AQm2Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1197};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_n_u_dev_list, __pyx_mstate->__pyx_n_u_devices, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_node, __pyx_mstate->__pyx_n_u_transport, __pyx_mstate->__pyx_n_u_guid, __pyx_mstate->__pyx_n_u_index};
    __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_get_device_list, __pyx_mstate->__pyx_kp_b_iso88591_Q_AQa_y_1_1_a_E_aq_81Ba_81Ba_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1226};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_n_u_ctx_list, __pyx_mstate->__pyx_n_u_devices, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_node, __pyx_mstate->__pyx_n_u_transport, __pyx_mstate->__pyx_n_u_guid, __pyx_mstate->__pyx_n_u_index};
    __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_rdma_get_devices, __pyx_mstate->__pyx_kp_b_iso88591_1A_y_1_aq_a_U_1_xq_xq_HARwa_wb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1248};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_event_type, __pyx_mstate->__pyx_n_u_types};
    __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_translate_event_type, __pyx_mstate->__pyx_kp_b_iso88591_A_a_1_a_a_a_q_Q_q_q_a_uAQ_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1295};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyverbs_device_pyx, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) 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)

  /* 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) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

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

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

/* 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 PyObjectCallOneArg) */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyObjectCallOneArg (used by ImportImpl) */
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);
}

/* TupleAndListFromArray (used by ImportImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
        Py_INCREF(src[i]);
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

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

/* 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 */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

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

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* 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 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

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

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

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    Py_INCREF(key);
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    const char* function_name,
    PyObject *kw)
{
#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments)
    CYTHON_UNUSED_VAR(function_name);
    CYTHON_UNUSED_VAR(kw);
    return 0;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
#if PY_VERSION_HEX >= 0x03090000
        CYTHON_UNUSED_VAR(function_name);
#else
        Py_ssize_t kwsize;
        #if CYTHON_ASSUME_SAFE_SIZE
        kwsize = PyTuple_GET_SIZE(kw);
        #else
        kwsize = PyTuple_Size(kw);
        if (unlikely(kwsize < 0)) return -1;
        #endif
        for (Py_ssize_t pos = 0; pos < kwsize; pos++) {
            PyObject* key = NULL;
            #if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
            #else
            key = PyTuple_GetItem(kw, pos);
            if (unlikely(!key)) return -1;
            #endif
            if (unlikely(!PyUnicode_Check(key))) {
                PyErr_Format(PyExc_TypeError,
                    "%.200s() keywords must be strings", function_name);
                return -1;
            }
        }
#endif
    } else {
        if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1;
    }
    return 0;
#endif
}

/* PyObjectCall2Args (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    int was_initialized =  __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return __Pyx_CallCFunction(cfunc, self, arg);
        } else if (flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1);
        } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL);
        }
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg);
    }
#endif
    PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *args = PyTuple_New(1);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
    } else
#endif
    {
        result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg);
    }
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

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

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* RaiseException */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

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

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

/* 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) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyUnicode_Concat(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyUnicode_Concat(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
    return value <= 1114111;
}
static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
    Py_ssize_t padding_length = ulength - 1;
    if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) padding_length);
            chars[ulength-1] = (char) value;
            return PyUnicode_DecodeLatin1(chars, ulength, NULL);
        }
        char *cpos = chars + sizeof(chars);
        if (value < 0x800) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xc0 | (value & 0x1f));
        } else if (value < 0x10000) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xe0 | (value & 0x0f));
        } else {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xf0 | (value & 0x07));
        }
        cpos -= padding_length;
        memset(cpos, padding_char, (size_t) padding_length);
        return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
    }
    if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
        const char chars[1] = {(char) value};
        return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
    }
    {
        PyObject *uchar, *padding_uchar, *padding, *result;
        padding_uchar = PyUnicode_FromOrdinal(padding_char);
        if (unlikely(!padding_uchar)) return NULL;
        padding = PySequence_Repeat(padding_uchar, padding_length);
        Py_DECREF(padding_uchar);
        if (unlikely(!padding)) return NULL;
        uchar = PyUnicode_FromOrdinal(value);
        if (unlikely(!uchar)) {
            Py_DECREF(padding);
            return NULL;
        }
        result = PyUnicode_Concat(padding, uchar);
        Py_DECREF(padding);
        Py_DECREF(uchar);
        return result;
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_unsigned_int(unsigned int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (unsigned int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, 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) {
    char digits[sizeof(unsigned int)*3+2];
    char *dpos, *end = digits + sizeof(unsigned int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    unsigned int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (unsigned int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (unsigned int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (unsigned int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
        Py_INCREF(values[i]);
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_uint32_t(uint32_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (uint32_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_uint32_t(uint32_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(uint32_t)*3+2];
    char *dpos, *end = digits + sizeof(uint32_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    uint32_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (uint32_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (uint32_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (uint32_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared)
{
    if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared))
        return 0;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000
    if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1)
        return 0;
#endif
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left, unsafe_shared)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* DictGetItem */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error
        if (unlikely(PyTuple_Check(key))) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args)) {
                PyErr_SetObject(PyExc_KeyError, args);
                Py_DECREF(args);
            }
        } else {
            PyErr_SetObject(PyExc_KeyError, key);
        }
    }
    return value;
}
#endif

/* PyUnicode_Substring */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length;
    #if !CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL;
    #endif
    length = __Pyx_PyUnicode_GET_LENGTH(text);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(length < 0)) return NULL;
    #endif
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    if (stop <= start)
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    if (start == 0 && stop == length)
        return __Pyx_NewRef(text);
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyUnicode_Substring(text, start, stop);
#else
    return PyUnicode_FromKindAndData(PyUnicode_KIND(text),
        PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start);
#endif
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

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

/* CallNextTpDealloc */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    destructor tp_dealloc = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type)
        tp_dealloc(obj);
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    traverseproc tp_traverse = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type && tp_traverse)
        return tp_traverse(obj, v, a);
    return 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

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    inquiry tp_clear = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type && tp_clear)
        tp_clear(obj);
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_4
#define __PYX_HAVE_RT_ImportType_3_2_4
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)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
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;
}

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* 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 */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
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);
}

/* PyObjectGetMethod (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) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* 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) */
#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) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

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

/* MergeVTables */
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i=0;
    Py_ssize_t size;
    void** base_vtables;
    __Pyx_TypeName tp_base_name = NULL;
    __Pyx_TypeName base_name = NULL;
    void* unknown = (void*)-1;
    PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
    int base_depth = 0;
    {
        PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        while (base) {
            base_depth += 1;
            base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
        }
    }
    base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
#if CYTHON_COMPILING_IN_LIMITED_API
    size = PyTuple_Size(bases);
    if (size < 0) goto other_failure;
#else
    size = PyTuple_GET_SIZE(bases);
#endif
    for (i = 1; i < size; i++) {
        PyObject *basei;
        void* base_vtable;
#if CYTHON_AVOID_BORROWED_REFS
        basei = PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#else
        basei = PyTuple_GET_ITEM(bases, i);
#endif
        base_vtable = __Pyx_GetVtable((PyTypeObject*)basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
            }
        }
    }
    PyErr_Clear();
    PyMem_Free(base_vtables);
    return 0;
bad:
    {
        PyTypeObject* basei = NULL;
        PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base);
#if CYTHON_AVOID_BORROWED_REFS
        basei = (PyTypeObject*)PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#else
        basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
#endif
        base_name = __Pyx_PyType_GetFullyQualifiedName(basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
    }
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
really_bad: // bad has failed!
#endif
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
other_failure:
#endif
    PyMem_Free(base_vtables);
    return -1;
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    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_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_3);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* PxdImportShared (used by FunctionImport) */
#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4
#define __PYX_HAVE_RT_ImportFromPxd_3_2_4
static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, "__pyx_capi__");
    if (!d)
        goto bad;
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
    PyDict_GetItemStringRef(d, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction_3_2_4
#define __PYX_HAVE_RT_ImportFunction_3_2_4
static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    int result = __Pyx_ImportFromPxd_3_2_4(module, funcname, &tmp.p, sig, "function");
    if (result == 0) {
        *f = tmp.fp;
    }
    return result;
}
#endif

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
        metaclass = &PyType_Type;
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* 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) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* 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) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

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

/* PyObjectLookupSpecial (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
    Py_XDECREF(owned_metaclass);
    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) */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            code_cache->count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* 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;\
    }

/* CIntFromPy */
static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyLong_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT)) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (unsigned int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(unsigned int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(unsigned int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
        } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        unsigned int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (unsigned int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (unsigned int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (unsigned int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (unsigned int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((unsigned int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((unsigned int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (unsigned int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyLong_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) {
                            return (size_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
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (size_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(size_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((((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(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_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
        if ((sizeof(size_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
        } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        size_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (size_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (size_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (size_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (size_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((size_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((size_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (size_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyLong_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT)) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT)) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT)) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (uint32_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint32_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint32_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint32_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint32_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint32_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint32_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint32_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint32_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint32_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint32_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint32_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint32_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint32_t) 1) << (sizeof(uint32_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint32_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint16_t(uint16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint16_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint16_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint16_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_long(unsigned long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint32_t(uint32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_time_t(time_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const time_t neg_one = (time_t) -1, const_zero = (time_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(time_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(time_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(time_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(time_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(time_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(time_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyLong_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (uint64_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint64_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint64_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint64_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint64_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint64_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint64_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint64_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint64_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint64_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint64_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_short(unsigned short value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned short) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned short) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned short),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned short));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_char(unsigned char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned char) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned char) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned char),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned char));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned long __Pyx_PyLong_As_unsigned_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (unsigned long) -1;
        val = __Pyx_PyLong_As_unsigned_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(unsigned long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) >= 2 * PyLong_SHIFT)) {
                            return (unsigned long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) >= 3 * PyLong_SHIFT)) {
                            return (unsigned long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) >= 4 * PyLong_SHIFT)) {
                            return (unsigned long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (unsigned long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(unsigned long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(unsigned long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned long) (((unsigned long)-1)*(((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(unsigned long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned long) ((((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned long) (((unsigned long)-1)*(((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned long) ((((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned long) (((unsigned long)-1)*(((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned long) ((((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(unsigned long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned long, long, PyLong_AsLong(x))
        } else if ((sizeof(unsigned long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        unsigned long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (unsigned long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (unsigned long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (unsigned long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (unsigned long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(unsigned long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((unsigned long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(unsigned long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((unsigned long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((unsigned long) 1) << (sizeof(unsigned long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (unsigned long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned long");
    return (unsigned long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned long");
    return (unsigned long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum ibv_event_type __Pyx_PyLong_As_enum__ibv_event_type(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum ibv_event_type neg_one = (enum ibv_event_type) -1, const_zero = (enum ibv_event_type) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        enum ibv_event_type val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (enum ibv_event_type) -1;
        val = __Pyx_PyLong_As_enum__ibv_event_type(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(enum ibv_event_type) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) >= 2 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) (((((enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum ibv_event_type) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) >= 3 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) (((((((enum ibv_event_type)digits[2]) << PyLong_SHIFT) | (enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum ibv_event_type) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) >= 4 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) (((((((((enum ibv_event_type)digits[3]) << PyLong_SHIFT) | (enum ibv_event_type)digits[2]) << PyLong_SHIFT) | (enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (enum ibv_event_type) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(enum ibv_event_type) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum ibv_event_type, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(enum ibv_event_type) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum ibv_event_type, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(enum ibv_event_type) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) (((enum ibv_event_type)-1)*(((((enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(enum ibv_event_type) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) ((((((enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(enum ibv_event_type) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) (((enum ibv_event_type)-1)*(((((((enum ibv_event_type)digits[2]) << PyLong_SHIFT) | (enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum ibv_event_type) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) ((((((((enum ibv_event_type)digits[2]) << PyLong_SHIFT) | (enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(enum ibv_event_type) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) (((enum ibv_event_type)-1)*(((((((((enum ibv_event_type)digits[3]) << PyLong_SHIFT) | (enum ibv_event_type)digits[2]) << PyLong_SHIFT) | (enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum ibv_event_type) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum ibv_event_type, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum ibv_event_type) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum ibv_event_type) ((((((((((enum ibv_event_type)digits[3]) << PyLong_SHIFT) | (enum ibv_event_type)digits[2]) << PyLong_SHIFT) | (enum ibv_event_type)digits[1]) << PyLong_SHIFT) | (enum ibv_event_type)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(enum ibv_event_type) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum ibv_event_type, long, PyLong_AsLong(x))
        } else if ((sizeof(enum ibv_event_type) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum ibv_event_type, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        enum ibv_event_type val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (enum ibv_event_type) -1;
#endif
        if (unlikely(ret))
            return (enum ibv_event_type) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum ibv_event_type");
    return (enum ibv_event_type) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum ibv_event_type");
    return (enum ibv_event_type) -1;
}

/* 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__9);
    }
    goto done;
}
#endif

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* 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 */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
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
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) goto bad;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#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 */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
