/* Generated by Cython 3.0a6 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "name": "fastsnmp.snmp_parser",
        "sources": [
            "fastsnmp/snmp_parser.pyx"
        ]
    },
    "module_name": "fastsnmp.snmp_parser"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #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 < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#define CYTHON_ABI "3_0a6"
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030000A6
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #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_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 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 (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 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
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #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_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #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
  #undef CYTHON_PEP487_INIT_SUBCLASS
  #define CYTHON_PEP487_INIT_SUBCLASS 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 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
#elif defined(CYTHON_LIMITED_API)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #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 1
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 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 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #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
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #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 (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #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(__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_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #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 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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #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)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030800B2
  #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)
#elif PY_VERSION_HEX >= 0x030800A4
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(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
#endif
#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
#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 METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(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
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#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(n)
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((n) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  (n)
#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_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_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 >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static 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;
}
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#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
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && 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 PY_MAJOR_VERSION >= 3 && (!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_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
#else
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111)
  #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))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#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 PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if 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
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

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

#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; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE__fastsnmp__snmp_parser
#define __PYX_HAVE_API__fastsnmp__snmp_parser
/* Early includes */
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 1
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING "ascii"
#define __Pyx_PyObject_FromString __Pyx_PyStr_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyStr_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 const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_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_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_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
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_IntOrLong(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_PyInt_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))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

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

static const char *__pyx_f[] = {
  "fastsnmp/snmp_parser.pyx",
  "type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti;
struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t;

/* "fastsnmp/snmp_parser.pyx":144
 * # sub id 1 and 2 bytes
 * # int
 * cdef struct SID12_ti:             # <<<<<<<<<<<<<<
 *     uint64_t SID1
 *     uint64_t SID2
 */
struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti {
  uint64_t SID1;
  uint64_t SID2;
};

/* "fastsnmp/snmp_parser.pyx":149
 * 
 * # str
 * cdef struct SID12_t:             # <<<<<<<<<<<<<<
 *     size_t strlen
 *     char *str
 */
struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t {
  size_t strlen;
  char *str;
};
/* #### 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;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_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 */
#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 */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#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
#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 */
#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 */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

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

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

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

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

/* fastcall.proto */
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#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_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) 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);
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_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
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

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

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

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

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

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

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

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

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, nargs, NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);

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

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

/* 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))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

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

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char);

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

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, 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);
        PyList_SET_ITEM(list, len, x);
        __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

/* PyDictVersioning.proto */
#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_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)  {\
    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_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);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
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

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

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

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

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

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
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

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

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_OrObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_OrObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceOr(op1, op2) : PyNumber_Or(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
#endif

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

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

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

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

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

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

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* PyUnicodeContains.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
    int result = PyUnicode_Contains(text, substring);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* 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);
        PyList_SET_ITEM(list, len, x);
        __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

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
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

/* 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)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_Occurred(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

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

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

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

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

/* unicode_tailmatch.proto */
static int __Pyx_PyUnicode_Tailmatch(
    PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction);

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

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !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

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

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

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

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);

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

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

/* PyObjectLookupSpecial.proto */
#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);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#if CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, CYTHON_UNUSED PyObject *typ) {
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, Py_ssize_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_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 {
    PyCFunctionObject func;
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_CyFunctionType = 0;
#endif
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_IsCyOrPyCFunction(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
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_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
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(void);
#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);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func.vectorcall)
#endif
#endif

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

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

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

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

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

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

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

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

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

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

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

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

/* InitStrings.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str);
#else
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
#endif

/* #### Code section: module_declarations ### */

/* Module declarations from "cython" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "libc.string" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "libc.stdio" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "__builtin__" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "cpython.type" */
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
#endif

/* Module declarations from "cpython" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "cpython.object" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "cpython.tuple" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "cpython.int" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "cpython.ref" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "cpython.unicode" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "libc.stdint" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "fastsnmp.snmp_parser" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif
static struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti *__pyx_v_8fastsnmp_11snmp_parser_sid12i;
static struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t *__pyx_v_8fastsnmp_11snmp_parser_sid12s;
static char **__pyx_v_8fastsnmp_11snmp_parser_INT_TO_STRING;
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_primitive_decode(char *, size_t, uint64_t *, size_t *); /*proto*/
static int __pyx_f_8fastsnmp_11snmp_parser_objectid_decode_str(unsigned char const *, size_t, char *, size_t *); /*proto*/
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_objectid_decode_c(char *, size_t, uint64_t *, size_t *); /*proto*/
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_primitive_encode7(uint64_t *, char *); /*proto*/
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_primitive_encode(uint64_t *, char *); /*proto*/
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_objectid_encode_array(uint64_t *, uint32_t, char *, size_t *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8fastsnmp_11snmp_parser_c_octetstring_decode(unsigned char const *, size_t); /*proto*/
static CYTHON_INLINE void __pyx_f_8fastsnmp_11snmp_parser_integer_encode_c(int64_t const , char *, uint64_t *); /*proto*/
static CYTHON_INLINE int64_t __pyx_f_8fastsnmp_11snmp_parser_integer_decode_c(unsigned char const *, size_t *); /*proto*/
static CYTHON_INLINE uint64_t __pyx_f_8fastsnmp_11snmp_parser_uinteger_decode_c(unsigned char const *, size_t *); /*proto*/
static PyObject *__pyx_f_8fastsnmp_11snmp_parser_sequence_decode_c(unsigned char const *, size_t const ); /*proto*/
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_length_decode_c(unsigned char const *, size_t *, size_t *); /*proto*/
static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_tag_decode_c(unsigned char const *, uint64_t *, size_t *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "fastsnmp.snmp_parser"
extern int __pyx_module_is_main_fastsnmp__snmp_parser;
int __pyx_module_is_main_fastsnmp__snmp_parser = 0;

/* Implementation of "fastsnmp.snmp_parser" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = ".";
static const char __pyx_k_0[] = "0";
static const char __pyx_k_A[] = "A";
static const char __pyx_k_F[] = "F";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_f[] = ">f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_p[] = "p";
static const char __pyx_k_x[] = "x";
static const char __pyx_k__8[] = "";
static const char __pyx_k__9[] = "\006";
static const char __pyx_k_vs[] = " vs ";
static const char __pyx_k_Get[] = "Get";
static const char __pyx_k_Set[] = "Set";
static const char __pyx_k__10[] = "\002";
static const char __pyx_k__11[] = "\245";
static const char __pyx_k__12[] = "\000";
static const char __pyx_k__13[] = "\004";
static const char __pyx_k__14[] = "\001";
static const char __pyx_k__15[] = "*";
static const char __pyx_k__16[] = "\005";
static const char __pyx_k__17[] = "\240";
static const char __pyx_k__18[] = "\241";
static const char __pyx_k__19[] = "\242";
static const char __pyx_k__20[] = "\243";
static const char __pyx_k__21[] = "\244";
static const char __pyx_k__65[] = "?";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_for[] = " for ";
static const char __pyx_k_oid[] = "oid";
static const char __pyx_k_pdu[] = "pdu";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_tag[] = " tag=";
static const char __pyx_k_Null[] = "Null";
static const char __pyx_k_SID1[] = "SID1";
static const char __pyx_k_SID2[] = "SID2";
static const char __pyx_k_Trap[] = "Trap";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_item[] = "' item=";
static const char __pyx_k_list[] = "list";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_slen[] = "slen";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_cycle[] = "cycle";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_subid[] = "subid";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_tag_2[] = "tag";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_idlist[] = "idlist";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_insert[] = "insert";
static const char __pyx_k_item_2[] = "item";
static const char __pyx_k_length[] = " length=";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_number[] = "number";
static const char __pyx_k_req_id[] = "req_id";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_string[] = "string";
static const char __pyx_k_strlen[] = "strlen";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_GetBulk[] = "GetBulk";
static const char __pyx_k_GetNext[] = "GetNext";
static const char __pyx_k_Integer[] = "Integer";
static const char __pyx_k_pdu_len[] = "pdu_len";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_ret_str[] = "ret_str";
static const char __pyx_k_seq_tag[] = "seq_tag";
static const char __pyx_k_varbind[] = "varbind";
static const char __pyx_k_ObjectID[] = "ObjectID";
static const char __pyx_k_Response[] = "Response";
static const char __pyx_k_Sequence[] = "Sequence";
static const char __pyx_k_data_len[] = "data_len";
static const char __pyx_k_length_2[] = "length";
static const char __pyx_k_main_oid[] = "main_oid";
static const char __pyx_k_msg_type[] = "msg_type";
static const char __pyx_k_pdu_type[] = "pdu_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_snmp_ver[] = "snmp_ver";
static const char __pyx_k_varbinds[] = "varbinds";
static const char __pyx_k_Counter32[] = "Counter32";
static const char __pyx_k_Counter64[] = "Counter64";
static const char __pyx_k_Exception[] = "Exception='";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_community[] = "community";
static const char __pyx_k_itertools[] = "itertools";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_next_oids[] = "next_oids";
static const char __pyx_k_numOctets[] = "numOctets";
static const char __pyx_k_oid_start[] = "oid_start";
static const char __pyx_k_subidlist[] = "subidlist";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_index_part[] = "index_part";
static const char __pyx_k_is_growing[] = "is_growing";
static const char __pyx_k_msg_decode[] = "msg_decode";
static const char __pyx_k_msg_encode[] = "msg_encode";
static const char __pyx_k_obj_id_len[] = "obj_id_len";
static const char __pyx_k_object_len[] = "object_len";
static const char __pyx_k_oid_finish[] = "oid_finish";
static const char __pyx_k_resultlist[] = "resultlist";
static const char __pyx_k_ret_length[] = "ret_length";
static const char __pyx_k_stream_len[] = " stream_len=";
static const char __pyx_k_stream_ptr[] = "stream_ptr";
static const char __pyx_k_tag_decode[] = "tag_decode";
static const char __pyx_k_tmp_length[] = "tmp_length";
static const char __pyx_k_value_type[] = "value_type";
static const char __pyx_k_wrong_SID1[] = "wrong SID1";
static const char __pyx_k_wrong_SID2[] = "wrong SID2";
static const char __pyx_k_OctetString[] = "OctetString";
static const char __pyx_k_error_index[] = "error_index";
static const char __pyx_k_obj_id_type[] = "obj_id_type";
static const char __pyx_k_skip_column[] = "skip_column";
static const char __pyx_k_stream_char[] = "stream_char";
static const char __pyx_k_varbind_enc[] = "varbind_enc";
static const char __pyx_k_version_len[] = "version_len";
static const char __pyx_k_EndOfMibView[] = "EndOfMibView";
static const char __pyx_k_NoSuchObject[] = "NoSuchObject";
static const char __pyx_k_error_status[] = "error_status";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_length_cache[] = "length_cache";
static const char __pyx_k_obj_id_value[] = "obj_id_value";
static const char __pyx_k_oids_to_poll[] = "oids_to_poll";
static const char __pyx_k_stream_len_2[] = "stream_len";
static const char __pyx_k_too_long_oid[] = "too long oid";
static const char __pyx_k_value_encode[] = "value_encode";
static const char __pyx_k_var_bind_pos[] = "var_bind_pos";
static const char __pyx_k_varbinds_len[] = "varbinds_len";
static const char __pyx_k_varbinds_obj[] = "varbinds_obj";
static const char __pyx_k_varbinds_tlv[] = "varbinds_tlv";
static const char __pyx_k_version_type[] = "version_type";
static const char __pyx_k_SNMPException[] = "SNMPException";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_community_len[] = "community_len";
static const char __pyx_k_encode_length[] = "encode_length";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_length_decode[] = "length_decode";
static const char __pyx_k_length_encode[] = "length_encode";
static const char __pyx_k_main_oids_len[] = "main_oids_len";
static const char __pyx_k_main_oids_pos[] = "main_oids_pos";
static const char __pyx_k_non_repeaters[] = "non_repeaters";
static const char __pyx_k_obj_value_len[] = "obj_value_len";
static const char __pyx_k_parse_varbind[] = "parse_varbind";
static const char __pyx_k_unknown_tag_s[] = "unknown tag=%s";
static const char __pyx_k_var_bind_list[] = "var_bind_list";
static const char __pyx_k_varbinds_data[] = "varbinds_data";
static const char __pyx_k_varbinds_type[] = "varbinds_type";
static const char __pyx_k_version_value[] = "version_value";
static const char __pyx_k_NoSuchInstance[] = "NoSuchInstance";
static const char __pyx_k_community_type[] = "community_type";
static const char __pyx_k_encode_varbind[] = "encode_varbind";
static const char __pyx_k_end_of_content[] = "end of content";
static const char __pyx_k_integer_decode[] = "integer_decode";
static const char __pyx_k_integer_encode[] = "integer_encode";
static const char __pyx_k_not_increasing[] = "not increasing ";
static const char __pyx_k_obj_value_type[] = "obj_value_type";
static const char __pyx_k_opaque_len_s_1[] = "opaque len %s != 1";
static const char __pyx_k_orig_main_oids[] = "orig_main_oids";
static const char __pyx_k_request_id_len[] = "request_id_len";
static const char __pyx_k_community_value[] = "community_value";
static const char __pyx_k_end_of_mib_view[] = "end_of_mib_view";
static const char __pyx_k_error_index_len[] = "error_index_len";
static const char __pyx_k_last_seen_index[] = "last_seen_index";
static const char __pyx_k_max_repetitions[] = "max_repetitions";
static const char __pyx_k_obj_value_value[] = "obj_value_value";
static const char __pyx_k_objectid_decode[] = "objectid_decode";
static const char __pyx_k_objectid_encode[] = "objectid_encode";
static const char __pyx_k_request_id_type[] = "request_id_type";
static const char __pyx_k_sequence_decode[] = "sequence_decode";
static const char __pyx_k_uinteger_decode[] = "uinteger_decode";
static const char __pyx_k_uinteger_encode[] = "uinteger_encode";
static const char __pyx_k_varbinds_encode[] = "varbinds_encode";
static const char __pyx_k_check_is_growing[] = "check_is_growing";
static const char __pyx_k_error_index_type[] = "error_index_type";
static const char __pyx_k_error_status_len[] = "error_status_len";
static const char __pyx_k_first_seen_index[] = "first_seen_index";
static const char __pyx_k_request_id_value[] = "request_id_value";
static const char __pyx_k_snmp_message_len[] = "snmp_message_len";
static const char __pyx_k_TYPE_NAME_TO_TYPE[] = "TYPE_NAME_TO_TYPE";
static const char __pyx_k_error_index_value[] = "error_index_value";
static const char __pyx_k_error_status_type[] = "error_status_type";
static const char __pyx_k_non_repeaters_len[] = "non_repeaters_len";
static const char __pyx_k_snmp_message_type[] = "snmp_message_type";
static const char __pyx_k_var_bind_list_len[] = "var_bind_list_len";
static const char __pyx_k_ASN_SNMP_MSG_TYPES[] = "ASN_SNMP_MSG_TYPES";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_error_status_value[] = "error_status_value";
static const char __pyx_k_non_repeaters_type[] = "non_repeaters_type";
static const char __pyx_k_octetstring_decode[] = "octetstring_decode";
static const char __pyx_k_octetstring_encode[] = "octetstring_encode";
static const char __pyx_k_orig_main_oids_len[] = "orig_main_oids_len";
static const char __pyx_k_snmp_message_value[] = "snmp_message_value";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_main_oids_positions[] = "main_oids_positions";
static const char __pyx_k_max_repetitions_len[] = "max_repetitions_len";
static const char __pyx_k_non_repeaters_value[] = "non_repeaters_value";
static const char __pyx_k_rest_oids_positions[] = "rest_oids_positions";
static const char __pyx_k_unknown_float_len_s[] = "unknown float len %s";
static const char __pyx_k_varbinds_encode_tlv[] = "varbinds_encode_tlv";
static const char __pyx_k_fastsnmp_snmp_parser[] = "fastsnmp.snmp_parser";
static const char __pyx_k_max_repetitions_type[] = "max_repetitions_type";
static const char __pyx_k_orig_main_oids_doted[] = "orig_main_oids_doted";
static const char __pyx_k_max_repetitions_value[] = "max_repetitions_value";
static const char __pyx_k_VarBindUnpackException[] = "VarBindUnpackException";
static const char __pyx_k_VarBindContentException[] = "VarBindContentException";
static const char __pyx_k_fastsnmp_snmp_parser_pyx[] = "fastsnmp/snmp_parser.pyx";
static const char __pyx_k_expected_oid_in_str_got_r[] = "expected oid in str. got %r";
static const char __pyx_k_not_implement_coder_for_s[] = "not implement coder for %s";
static const char __pyx_k_long_SID1_is_not_supported[] = "long SID1 is not supported";
static const char __pyx_k_out_of_len_current_stream_pos[] = "out of len. current_stream_pos=";
static const char __pyx_k_max_repetitions_must_be_higher_t[] = "max_repetitions must be higher than %s";
static const char __pyx_k_value_must_be_None_for_Null_type[] = "value must be None for Null type!";
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_kp_u_;
static PyObject *__pyx_kp_b_0;
static PyObject *__pyx_n_b_A;
static PyObject *__pyx_n_s_ASN_SNMP_MSG_TYPES;
static PyObject *__pyx_n_u_Counter32;
static PyObject *__pyx_n_u_Counter64;
static PyObject *__pyx_n_s_EndOfMibView;
static PyObject *__pyx_kp_u_Exception;
static PyObject *__pyx_n_b_F;
static PyObject *__pyx_n_u_Get;
static PyObject *__pyx_n_u_GetBulk;
static PyObject *__pyx_n_u_GetNext;
static PyObject *__pyx_n_u_Integer;
static PyObject *__pyx_n_s_NoSuchInstance;
static PyObject *__pyx_n_s_NoSuchObject;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_u_Null;
static PyObject *__pyx_n_u_ObjectID;
static PyObject *__pyx_n_u_OctetString;
static PyObject *__pyx_n_u_Response;
static PyObject *__pyx_n_u_SID1;
static PyObject *__pyx_n_u_SID2;
static PyObject *__pyx_n_s_SNMPException;
static PyObject *__pyx_n_u_Sequence;
static PyObject *__pyx_n_u_Set;
static PyObject *__pyx_n_s_TYPE_NAME_TO_TYPE;
static PyObject *__pyx_n_u_Trap;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_VarBindContentException;
static PyObject *__pyx_n_s_VarBindUnpackException;
static PyObject *__pyx_kp_b__10;
static PyObject *__pyx_kp_b__11;
static PyObject *__pyx_kp_b__12;
static PyObject *__pyx_kp_b__13;
static PyObject *__pyx_kp_b__14;
static PyObject *__pyx_n_s__15;
static PyObject *__pyx_kp_b__16;
static PyObject *__pyx_kp_b__17;
static PyObject *__pyx_kp_b__18;
static PyObject *__pyx_kp_b__19;
static PyObject *__pyx_kp_b__20;
static PyObject *__pyx_kp_b__21;
static PyObject *__pyx_n_s__65;
static PyObject *__pyx_kp_b__8;
static PyObject *__pyx_kp_b__9;
static PyObject *__pyx_n_u_ascii;
static PyObject *__pyx_n_s_check_is_growing;
static PyObject *__pyx_n_s_class_getitem;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_community;
static PyObject *__pyx_n_s_community_len;
static PyObject *__pyx_n_s_community_type;
static PyObject *__pyx_n_s_community_value;
static PyObject *__pyx_n_s_cycle;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_data_len;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_encode_length;
static PyObject *__pyx_n_s_encode_varbind;
static PyObject *__pyx_kp_u_end_of_content;
static PyObject *__pyx_n_s_end_of_mib_view;
static PyObject *__pyx_n_s_error_index;
static PyObject *__pyx_n_s_error_index_len;
static PyObject *__pyx_n_s_error_index_type;
static PyObject *__pyx_n_s_error_index_value;
static PyObject *__pyx_n_s_error_status;
static PyObject *__pyx_n_s_error_status_len;
static PyObject *__pyx_n_s_error_status_type;
static PyObject *__pyx_n_s_error_status_value;
static PyObject *__pyx_kp_u_expected_oid_in_str_got_r;
static PyObject *__pyx_kp_u_f;
static PyObject *__pyx_n_s_fastsnmp_snmp_parser;
static PyObject *__pyx_kp_s_fastsnmp_snmp_parser_pyx;
static PyObject *__pyx_n_s_first_seen_index;
static PyObject *__pyx_kp_u_for;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_idlist;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index_part;
static PyObject *__pyx_n_s_init_subclass;
static PyObject *__pyx_n_s_initializing;
static PyObject *__pyx_n_s_insert;
static PyObject *__pyx_n_s_integer_decode;
static PyObject *__pyx_n_s_integer_encode;
static PyObject *__pyx_n_s_is_growing;
static PyObject *__pyx_kp_u_item;
static PyObject *__pyx_n_s_item_2;
static PyObject *__pyx_n_s_itertools;
static PyObject *__pyx_n_s_last_seen_index;
static PyObject *__pyx_kp_u_length;
static PyObject *__pyx_n_s_length_2;
static PyObject *__pyx_n_s_length_cache;
static PyObject *__pyx_n_s_length_decode;
static PyObject *__pyx_n_s_length_encode;
static PyObject *__pyx_n_s_list;
static PyObject *__pyx_kp_u_long_SID1_is_not_supported;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_main_oid;
static PyObject *__pyx_n_s_main_oids_len;
static PyObject *__pyx_n_s_main_oids_pos;
static PyObject *__pyx_n_s_main_oids_positions;
static PyObject *__pyx_n_s_max_repetitions;
static PyObject *__pyx_n_s_max_repetitions_len;
static PyObject *__pyx_kp_u_max_repetitions_must_be_higher_t;
static PyObject *__pyx_n_s_max_repetitions_type;
static PyObject *__pyx_n_s_max_repetitions_value;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_msg_decode;
static PyObject *__pyx_n_s_msg_encode;
static PyObject *__pyx_n_s_msg_type;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_next_oids;
static PyObject *__pyx_n_s_non_repeaters;
static PyObject *__pyx_n_s_non_repeaters_len;
static PyObject *__pyx_n_s_non_repeaters_type;
static PyObject *__pyx_n_s_non_repeaters_value;
static PyObject *__pyx_kp_u_not_implement_coder_for_s;
static PyObject *__pyx_kp_u_not_increasing;
static PyObject *__pyx_n_s_numOctets;
static PyObject *__pyx_n_s_number;
static PyObject *__pyx_n_s_obj_id_len;
static PyObject *__pyx_n_s_obj_id_type;
static PyObject *__pyx_n_s_obj_id_value;
static PyObject *__pyx_n_s_obj_value_len;
static PyObject *__pyx_n_s_obj_value_type;
static PyObject *__pyx_n_s_obj_value_value;
static PyObject *__pyx_n_s_object_len;
static PyObject *__pyx_n_s_objectid_decode;
static PyObject *__pyx_n_s_objectid_encode;
static PyObject *__pyx_n_s_octetstring_decode;
static PyObject *__pyx_n_s_octetstring_encode;
static PyObject *__pyx_n_s_oid;
static PyObject *__pyx_n_s_oid_finish;
static PyObject *__pyx_n_s_oid_start;
static PyObject *__pyx_n_s_oids_to_poll;
static PyObject *__pyx_kp_u_opaque_len_s_1;
static PyObject *__pyx_n_s_orig_main_oids;
static PyObject *__pyx_n_s_orig_main_oids_doted;
static PyObject *__pyx_n_s_orig_main_oids_len;
static PyObject *__pyx_kp_u_out_of_len_current_stream_pos;
static PyObject *__pyx_n_s_p;
static PyObject *__pyx_n_s_parse_varbind;
static PyObject *__pyx_n_s_pdu;
static PyObject *__pyx_n_s_pdu_len;
static PyObject *__pyx_n_s_pdu_type;
static PyObject *__pyx_n_s_pos;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_req_id;
static PyObject *__pyx_n_s_request_id_len;
static PyObject *__pyx_n_s_request_id_type;
static PyObject *__pyx_n_s_request_id_value;
static PyObject *__pyx_n_s_res;
static PyObject *__pyx_n_s_rest_oids_positions;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_resultlist;
static PyObject *__pyx_n_s_ret;
static PyObject *__pyx_n_s_ret_length;
static PyObject *__pyx_n_s_ret_str;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_n_s_seq_tag;
static PyObject *__pyx_n_s_sequence_decode;
static PyObject *__pyx_n_s_set_name;
static PyObject *__pyx_n_s_skip_column;
static PyObject *__pyx_n_s_slen;
static PyObject *__pyx_n_s_snmp_message_len;
static PyObject *__pyx_n_s_snmp_message_type;
static PyObject *__pyx_n_s_snmp_message_value;
static PyObject *__pyx_n_s_snmp_ver;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_u_str;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_n_s_stream_char;
static PyObject *__pyx_kp_u_stream_len;
static PyObject *__pyx_n_s_stream_len_2;
static PyObject *__pyx_n_s_stream_ptr;
static PyObject *__pyx_n_s_string;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_u_strlen;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_subid;
static PyObject *__pyx_n_s_subidlist;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_kp_u_tag;
static PyObject *__pyx_n_s_tag_2;
static PyObject *__pyx_n_s_tag_decode;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tmp_length;
static PyObject *__pyx_kp_u_too_long_oid;
static PyObject *__pyx_n_s_uinteger_decode;
static PyObject *__pyx_n_s_uinteger_encode;
static PyObject *__pyx_kp_u_unknown_float_len_s;
static PyObject *__pyx_kp_u_unknown_tag_s;
static PyObject *__pyx_n_s_unpack;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_encode;
static PyObject *__pyx_kp_u_value_must_be_None_for_Null_type;
static PyObject *__pyx_n_s_value_type;
static PyObject *__pyx_n_s_var_bind_list;
static PyObject *__pyx_n_s_var_bind_list_len;
static PyObject *__pyx_n_s_var_bind_pos;
static PyObject *__pyx_n_s_varbind;
static PyObject *__pyx_n_s_varbind_enc;
static PyObject *__pyx_n_s_varbinds;
static PyObject *__pyx_n_s_varbinds_data;
static PyObject *__pyx_n_s_varbinds_encode;
static PyObject *__pyx_n_s_varbinds_encode_tlv;
static PyObject *__pyx_n_s_varbinds_len;
static PyObject *__pyx_n_s_varbinds_obj;
static PyObject *__pyx_n_s_varbinds_tlv;
static PyObject *__pyx_n_s_varbinds_type;
static PyObject *__pyx_n_s_version_len;
static PyObject *__pyx_n_s_version_type;
static PyObject *__pyx_n_s_version_value;
static PyObject *__pyx_kp_u_vs;
static PyObject *__pyx_kp_u_wrong_SID1;
static PyObject *__pyx_kp_u_wrong_SID2;
static PyObject *__pyx_n_s_x;
#endif
/* #### Code section: decls ### */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_objectid_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_2objectid_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_oid); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_4octetstring_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_6octetstring_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_8integer_encode(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_value); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_10uinteger_encode(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_value); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_12uinteger_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_14integer_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_16sequence_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_18length_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_20length_encode(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_length); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_22tag_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_24value_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_value_type); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_26encode_varbind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_value_type, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_28varbinds_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_varbinds); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_30varbinds_encode_tlv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_varbinds); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_32msg_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_req_id, PyObject *__pyx_v_community, PyObject *__pyx_v_varbinds, PyObject *__pyx_v_msg_type, PyObject *__pyx_v_max_repetitions, PyObject *__pyx_v_non_repeaters); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_34msg_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_36check_is_growing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_oid_start, PyObject *__pyx_v_oid_finish); /* proto */
static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_38parse_varbind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_var_bind_list, PyObject *__pyx_v_orig_main_oids, PyObject *__pyx_v_oids_to_poll); /* proto */
static __Pyx_CachedCFunction __pyx_umethod_PyByteArray_Type_insert = {0, 0, 0, 0, 0};
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_128;
static PyObject *__pyx_int_255;
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__64;
#endif
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyObject *__pyx_kp_u_;
  PyObject *__pyx_kp_b_0;
  PyObject *__pyx_n_b_A;
  PyObject *__pyx_n_s_ASN_SNMP_MSG_TYPES;
  PyObject *__pyx_n_u_Counter32;
  PyObject *__pyx_n_u_Counter64;
  PyObject *__pyx_n_s_EndOfMibView;
  PyObject *__pyx_kp_u_Exception;
  PyObject *__pyx_n_b_F;
  PyObject *__pyx_n_u_Get;
  PyObject *__pyx_n_u_GetBulk;
  PyObject *__pyx_n_u_GetNext;
  PyObject *__pyx_n_u_Integer;
  PyObject *__pyx_n_s_NoSuchInstance;
  PyObject *__pyx_n_s_NoSuchObject;
  PyObject *__pyx_n_s_NotImplementedError;
  PyObject *__pyx_n_u_Null;
  PyObject *__pyx_n_u_ObjectID;
  PyObject *__pyx_n_u_OctetString;
  PyObject *__pyx_n_u_Response;
  PyObject *__pyx_n_u_SID1;
  PyObject *__pyx_n_u_SID2;
  PyObject *__pyx_n_s_SNMPException;
  PyObject *__pyx_n_u_Sequence;
  PyObject *__pyx_n_u_Set;
  PyObject *__pyx_n_s_TYPE_NAME_TO_TYPE;
  PyObject *__pyx_n_u_Trap;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_VarBindContentException;
  PyObject *__pyx_n_s_VarBindUnpackException;
  PyObject *__pyx_kp_b__10;
  PyObject *__pyx_kp_b__11;
  PyObject *__pyx_kp_b__12;
  PyObject *__pyx_kp_b__13;
  PyObject *__pyx_kp_b__14;
  PyObject *__pyx_n_s__15;
  PyObject *__pyx_kp_b__16;
  PyObject *__pyx_kp_b__17;
  PyObject *__pyx_kp_b__18;
  PyObject *__pyx_kp_b__19;
  PyObject *__pyx_kp_b__20;
  PyObject *__pyx_kp_b__21;
  PyObject *__pyx_n_s__65;
  PyObject *__pyx_kp_b__8;
  PyObject *__pyx_kp_b__9;
  PyObject *__pyx_n_u_ascii;
  PyObject *__pyx_n_s_check_is_growing;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_community;
  PyObject *__pyx_n_s_community_len;
  PyObject *__pyx_n_s_community_type;
  PyObject *__pyx_n_s_community_value;
  PyObject *__pyx_n_s_cycle;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_n_s_data_len;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_n_s_encode;
  PyObject *__pyx_n_s_encode_length;
  PyObject *__pyx_n_s_encode_varbind;
  PyObject *__pyx_kp_u_end_of_content;
  PyObject *__pyx_n_s_end_of_mib_view;
  PyObject *__pyx_n_s_error_index;
  PyObject *__pyx_n_s_error_index_len;
  PyObject *__pyx_n_s_error_index_type;
  PyObject *__pyx_n_s_error_index_value;
  PyObject *__pyx_n_s_error_status;
  PyObject *__pyx_n_s_error_status_len;
  PyObject *__pyx_n_s_error_status_type;
  PyObject *__pyx_n_s_error_status_value;
  PyObject *__pyx_kp_u_expected_oid_in_str_got_r;
  PyObject *__pyx_kp_u_f;
  PyObject *__pyx_n_s_fastsnmp_snmp_parser;
  PyObject *__pyx_kp_s_fastsnmp_snmp_parser_pyx;
  PyObject *__pyx_n_s_first_seen_index;
  PyObject *__pyx_kp_u_for;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_idlist;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_index_part;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_insert;
  PyObject *__pyx_n_s_integer_decode;
  PyObject *__pyx_n_s_integer_encode;
  PyObject *__pyx_n_s_is_growing;
  PyObject *__pyx_kp_u_item;
  PyObject *__pyx_n_s_item_2;
  PyObject *__pyx_n_s_itertools;
  PyObject *__pyx_n_s_last_seen_index;
  PyObject *__pyx_kp_u_length;
  PyObject *__pyx_n_s_length_2;
  PyObject *__pyx_n_s_length_cache;
  PyObject *__pyx_n_s_length_decode;
  PyObject *__pyx_n_s_length_encode;
  PyObject *__pyx_n_s_list;
  PyObject *__pyx_kp_u_long_SID1_is_not_supported;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_main_oid;
  PyObject *__pyx_n_s_main_oids_len;
  PyObject *__pyx_n_s_main_oids_pos;
  PyObject *__pyx_n_s_main_oids_positions;
  PyObject *__pyx_n_s_max_repetitions;
  PyObject *__pyx_n_s_max_repetitions_len;
  PyObject *__pyx_kp_u_max_repetitions_must_be_higher_t;
  PyObject *__pyx_n_s_max_repetitions_type;
  PyObject *__pyx_n_s_max_repetitions_value;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_msg_decode;
  PyObject *__pyx_n_s_msg_encode;
  PyObject *__pyx_n_s_msg_type;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_next_oids;
  PyObject *__pyx_n_s_non_repeaters;
  PyObject *__pyx_n_s_non_repeaters_len;
  PyObject *__pyx_n_s_non_repeaters_type;
  PyObject *__pyx_n_s_non_repeaters_value;
  PyObject *__pyx_kp_u_not_implement_coder_for_s;
  PyObject *__pyx_kp_u_not_increasing;
  PyObject *__pyx_n_s_numOctets;
  PyObject *__pyx_n_s_number;
  PyObject *__pyx_n_s_obj_id_len;
  PyObject *__pyx_n_s_obj_id_type;
  PyObject *__pyx_n_s_obj_id_value;
  PyObject *__pyx_n_s_obj_value_len;
  PyObject *__pyx_n_s_obj_value_type;
  PyObject *__pyx_n_s_obj_value_value;
  PyObject *__pyx_n_s_object_len;
  PyObject *__pyx_n_s_objectid_decode;
  PyObject *__pyx_n_s_objectid_encode;
  PyObject *__pyx_n_s_octetstring_decode;
  PyObject *__pyx_n_s_octetstring_encode;
  PyObject *__pyx_n_s_oid;
  PyObject *__pyx_n_s_oid_finish;
  PyObject *__pyx_n_s_oid_start;
  PyObject *__pyx_n_s_oids_to_poll;
  PyObject *__pyx_kp_u_opaque_len_s_1;
  PyObject *__pyx_n_s_orig_main_oids;
  PyObject *__pyx_n_s_orig_main_oids_doted;
  PyObject *__pyx_n_s_orig_main_oids_len;
  PyObject *__pyx_kp_u_out_of_len_current_stream_pos;
  PyObject *__pyx_n_s_p;
  PyObject *__pyx_n_s_parse_varbind;
  PyObject *__pyx_n_s_pdu;
  PyObject *__pyx_n_s_pdu_len;
  PyObject *__pyx_n_s_pdu_type;
  PyObject *__pyx_n_s_pos;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_req_id;
  PyObject *__pyx_n_s_request_id_len;
  PyObject *__pyx_n_s_request_id_type;
  PyObject *__pyx_n_s_request_id_value;
  PyObject *__pyx_n_s_res;
  PyObject *__pyx_n_s_rest_oids_positions;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_resultlist;
  PyObject *__pyx_n_s_ret;
  PyObject *__pyx_n_s_ret_length;
  PyObject *__pyx_n_s_ret_str;
  PyObject *__pyx_n_s_return;
  PyObject *__pyx_n_s_seq_tag;
  PyObject *__pyx_n_s_sequence_decode;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_skip_column;
  PyObject *__pyx_n_s_slen;
  PyObject *__pyx_n_s_snmp_message_len;
  PyObject *__pyx_n_s_snmp_message_type;
  PyObject *__pyx_n_s_snmp_message_value;
  PyObject *__pyx_n_s_snmp_ver;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_u_str;
  PyObject *__pyx_n_s_stream;
  PyObject *__pyx_n_s_stream_char;
  PyObject *__pyx_kp_u_stream_len;
  PyObject *__pyx_n_s_stream_len_2;
  PyObject *__pyx_n_s_stream_ptr;
  PyObject *__pyx_n_s_string;
  PyObject *__pyx_n_s_strip;
  PyObject *__pyx_n_u_strlen;
  PyObject *__pyx_n_s_struct;
  PyObject *__pyx_n_s_subid;
  PyObject *__pyx_n_s_subidlist;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_kp_u_tag;
  PyObject *__pyx_n_s_tag_2;
  PyObject *__pyx_n_s_tag_decode;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_tmp_length;
  PyObject *__pyx_kp_u_too_long_oid;
  PyObject *__pyx_n_s_uinteger_decode;
  PyObject *__pyx_n_s_uinteger_encode;
  PyObject *__pyx_kp_u_unknown_float_len_s;
  PyObject *__pyx_kp_u_unknown_tag_s;
  PyObject *__pyx_n_s_unpack;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_value_encode;
  PyObject *__pyx_kp_u_value_must_be_None_for_Null_type;
  PyObject *__pyx_n_s_value_type;
  PyObject *__pyx_n_s_var_bind_list;
  PyObject *__pyx_n_s_var_bind_list_len;
  PyObject *__pyx_n_s_var_bind_pos;
  PyObject *__pyx_n_s_varbind;
  PyObject *__pyx_n_s_varbind_enc;
  PyObject *__pyx_n_s_varbinds;
  PyObject *__pyx_n_s_varbinds_data;
  PyObject *__pyx_n_s_varbinds_encode;
  PyObject *__pyx_n_s_varbinds_encode_tlv;
  PyObject *__pyx_n_s_varbinds_len;
  PyObject *__pyx_n_s_varbinds_obj;
  PyObject *__pyx_n_s_varbinds_tlv;
  PyObject *__pyx_n_s_varbinds_type;
  PyObject *__pyx_n_s_version_len;
  PyObject *__pyx_n_s_version_type;
  PyObject *__pyx_n_s_version_value;
  PyObject *__pyx_kp_u_vs;
  PyObject *__pyx_kp_u_wrong_SID1;
  PyObject *__pyx_kp_u_wrong_SID2;
  PyObject *__pyx_n_s_x;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_10;
  PyObject *__pyx_int_128;
  PyObject *__pyx_int_255;
  PyObject *__pyx_tuple__2;
  PyObject *__pyx_tuple__3;
  PyObject *__pyx_tuple__4;
  PyObject *__pyx_tuple__5;
  PyObject *__pyx_tuple__6;
  PyObject *__pyx_tuple__7;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__30;
  PyObject *__pyx_tuple__32;
  PyObject *__pyx_tuple__34;
  PyObject *__pyx_tuple__36;
  PyObject *__pyx_tuple__38;
  PyObject *__pyx_tuple__40;
  PyObject *__pyx_tuple__42;
  PyObject *__pyx_tuple__44;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__48;
  PyObject *__pyx_tuple__49;
  PyObject *__pyx_tuple__51;
  PyObject *__pyx_tuple__52;
  PyObject *__pyx_tuple__54;
  PyObject *__pyx_tuple__56;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__59;
  PyObject *__pyx_tuple__61;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_codeobj__23;
  PyObject *__pyx_codeobj__25;
  PyObject *__pyx_codeobj__27;
  PyObject *__pyx_codeobj__29;
  PyObject *__pyx_codeobj__31;
  PyObject *__pyx_codeobj__33;
  PyObject *__pyx_codeobj__35;
  PyObject *__pyx_codeobj__37;
  PyObject *__pyx_codeobj__39;
  PyObject *__pyx_codeobj__41;
  PyObject *__pyx_codeobj__43;
  PyObject *__pyx_codeobj__45;
  PyObject *__pyx_codeobj__47;
  PyObject *__pyx_codeobj__50;
  PyObject *__pyx_codeobj__53;
  PyObject *__pyx_codeobj__55;
  PyObject *__pyx_codeobj__57;
  PyObject *__pyx_codeobj__60;
  PyObject *__pyx_codeobj__62;
  PyObject *__pyx_codeobj__64;
} __pyx_mstate;

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

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(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);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_kp_u_);
  Py_CLEAR(clear_module_state->__pyx_kp_b_0);
  Py_CLEAR(clear_module_state->__pyx_n_b_A);
  Py_CLEAR(clear_module_state->__pyx_n_s_ASN_SNMP_MSG_TYPES);
  Py_CLEAR(clear_module_state->__pyx_n_u_Counter32);
  Py_CLEAR(clear_module_state->__pyx_n_u_Counter64);
  Py_CLEAR(clear_module_state->__pyx_n_s_EndOfMibView);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Exception);
  Py_CLEAR(clear_module_state->__pyx_n_b_F);
  Py_CLEAR(clear_module_state->__pyx_n_u_Get);
  Py_CLEAR(clear_module_state->__pyx_n_u_GetBulk);
  Py_CLEAR(clear_module_state->__pyx_n_u_GetNext);
  Py_CLEAR(clear_module_state->__pyx_n_u_Integer);
  Py_CLEAR(clear_module_state->__pyx_n_s_NoSuchInstance);
  Py_CLEAR(clear_module_state->__pyx_n_s_NoSuchObject);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError);
  Py_CLEAR(clear_module_state->__pyx_n_u_Null);
  Py_CLEAR(clear_module_state->__pyx_n_u_ObjectID);
  Py_CLEAR(clear_module_state->__pyx_n_u_OctetString);
  Py_CLEAR(clear_module_state->__pyx_n_u_Response);
  Py_CLEAR(clear_module_state->__pyx_n_u_SID1);
  Py_CLEAR(clear_module_state->__pyx_n_u_SID2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SNMPException);
  Py_CLEAR(clear_module_state->__pyx_n_u_Sequence);
  Py_CLEAR(clear_module_state->__pyx_n_u_Set);
  Py_CLEAR(clear_module_state->__pyx_n_s_TYPE_NAME_TO_TYPE);
  Py_CLEAR(clear_module_state->__pyx_n_u_Trap);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_VarBindContentException);
  Py_CLEAR(clear_module_state->__pyx_n_s_VarBindUnpackException);
  Py_CLEAR(clear_module_state->__pyx_kp_b__10);
  Py_CLEAR(clear_module_state->__pyx_kp_b__11);
  Py_CLEAR(clear_module_state->__pyx_kp_b__12);
  Py_CLEAR(clear_module_state->__pyx_kp_b__13);
  Py_CLEAR(clear_module_state->__pyx_kp_b__14);
  Py_CLEAR(clear_module_state->__pyx_n_s__15);
  Py_CLEAR(clear_module_state->__pyx_kp_b__16);
  Py_CLEAR(clear_module_state->__pyx_kp_b__17);
  Py_CLEAR(clear_module_state->__pyx_kp_b__18);
  Py_CLEAR(clear_module_state->__pyx_kp_b__19);
  Py_CLEAR(clear_module_state->__pyx_kp_b__20);
  Py_CLEAR(clear_module_state->__pyx_kp_b__21);
  Py_CLEAR(clear_module_state->__pyx_n_s__65);
  Py_CLEAR(clear_module_state->__pyx_kp_b__8);
  Py_CLEAR(clear_module_state->__pyx_kp_b__9);
  Py_CLEAR(clear_module_state->__pyx_n_u_ascii);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_is_growing);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_community);
  Py_CLEAR(clear_module_state->__pyx_n_s_community_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_community_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_community_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_cycle);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_encode_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_encode_varbind);
  Py_CLEAR(clear_module_state->__pyx_kp_u_end_of_content);
  Py_CLEAR(clear_module_state->__pyx_n_s_end_of_mib_view);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_index_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_index_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_index_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_status_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_status_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_status_value);
  Py_CLEAR(clear_module_state->__pyx_kp_u_expected_oid_in_str_got_r);
  Py_CLEAR(clear_module_state->__pyx_kp_u_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_fastsnmp_snmp_parser);
  Py_CLEAR(clear_module_state->__pyx_kp_s_fastsnmp_snmp_parser_pyx);
  Py_CLEAR(clear_module_state->__pyx_n_s_first_seen_index);
  Py_CLEAR(clear_module_state->__pyx_kp_u_for);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_idlist);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_part);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_insert);
  Py_CLEAR(clear_module_state->__pyx_n_s_integer_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_integer_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_growing);
  Py_CLEAR(clear_module_state->__pyx_kp_u_item);
  Py_CLEAR(clear_module_state->__pyx_n_s_item_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_itertools);
  Py_CLEAR(clear_module_state->__pyx_n_s_last_seen_index);
  Py_CLEAR(clear_module_state->__pyx_kp_u_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_length_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_length_cache);
  Py_CLEAR(clear_module_state->__pyx_n_s_length_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_length_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_list);
  Py_CLEAR(clear_module_state->__pyx_kp_u_long_SID1_is_not_supported);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_oid);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_oids_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_oids_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_oids_positions);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_repetitions);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_repetitions_len);
  Py_CLEAR(clear_module_state->__pyx_kp_u_max_repetitions_must_be_higher_t);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_repetitions_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_repetitions_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_msg_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_msg_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_msg_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_oids);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_repeaters);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_repeaters_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_repeaters_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_repeaters_value);
  Py_CLEAR(clear_module_state->__pyx_kp_u_not_implement_coder_for_s);
  Py_CLEAR(clear_module_state->__pyx_kp_u_not_increasing);
  Py_CLEAR(clear_module_state->__pyx_n_s_numOctets);
  Py_CLEAR(clear_module_state->__pyx_n_s_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj_id_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj_id_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj_id_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj_value_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj_value_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj_value_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_object_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_objectid_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_objectid_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_octetstring_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_octetstring_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_oid);
  Py_CLEAR(clear_module_state->__pyx_n_s_oid_finish);
  Py_CLEAR(clear_module_state->__pyx_n_s_oid_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_oids_to_poll);
  Py_CLEAR(clear_module_state->__pyx_kp_u_opaque_len_s_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_orig_main_oids);
  Py_CLEAR(clear_module_state->__pyx_n_s_orig_main_oids_doted);
  Py_CLEAR(clear_module_state->__pyx_n_s_orig_main_oids_len);
  Py_CLEAR(clear_module_state->__pyx_kp_u_out_of_len_current_stream_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_p);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_varbind);
  Py_CLEAR(clear_module_state->__pyx_n_s_pdu);
  Py_CLEAR(clear_module_state->__pyx_n_s_pdu_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_pdu_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_req_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_request_id_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_request_id_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_request_id_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_res);
  Py_CLEAR(clear_module_state->__pyx_n_s_rest_oids_positions);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_resultlist);
  Py_CLEAR(clear_module_state->__pyx_n_s_ret);
  Py_CLEAR(clear_module_state->__pyx_n_s_ret_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_ret_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_return);
  Py_CLEAR(clear_module_state->__pyx_n_s_seq_tag);
  Py_CLEAR(clear_module_state->__pyx_n_s_sequence_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_skip_column);
  Py_CLEAR(clear_module_state->__pyx_n_s_slen);
  Py_CLEAR(clear_module_state->__pyx_n_s_snmp_message_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_snmp_message_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_snmp_message_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_snmp_ver);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_u_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_stream);
  Py_CLEAR(clear_module_state->__pyx_n_s_stream_char);
  Py_CLEAR(clear_module_state->__pyx_kp_u_stream_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_stream_len_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_stream_ptr);
  Py_CLEAR(clear_module_state->__pyx_n_s_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_strip);
  Py_CLEAR(clear_module_state->__pyx_n_u_strlen);
  Py_CLEAR(clear_module_state->__pyx_n_s_struct);
  Py_CLEAR(clear_module_state->__pyx_n_s_subid);
  Py_CLEAR(clear_module_state->__pyx_n_s_subidlist);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_kp_u_tag);
  Py_CLEAR(clear_module_state->__pyx_n_s_tag_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_tag_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_tmp_length);
  Py_CLEAR(clear_module_state->__pyx_kp_u_too_long_oid);
  Py_CLEAR(clear_module_state->__pyx_n_s_uinteger_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_uinteger_encode);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_float_len_s);
  Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_tag_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_value_encode);
  Py_CLEAR(clear_module_state->__pyx_kp_u_value_must_be_None_for_Null_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_value_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_var_bind_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_var_bind_list_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_var_bind_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbind);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbind_enc);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_encode_tlv);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_obj);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_tlv);
  Py_CLEAR(clear_module_state->__pyx_n_s_varbinds_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_version_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_version_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_version_value);
  Py_CLEAR(clear_module_state->__pyx_kp_u_vs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_wrong_SID1);
  Py_CLEAR(clear_module_state->__pyx_kp_u_wrong_SID2);
  Py_CLEAR(clear_module_state->__pyx_n_s_x);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_10);
  Py_CLEAR(clear_module_state->__pyx_int_128);
  Py_CLEAR(clear_module_state->__pyx_int_255);
  Py_CLEAR(clear_module_state->__pyx_tuple__2);
  Py_CLEAR(clear_module_state->__pyx_tuple__3);
  Py_CLEAR(clear_module_state->__pyx_tuple__4);
  Py_CLEAR(clear_module_state->__pyx_tuple__5);
  Py_CLEAR(clear_module_state->__pyx_tuple__6);
  Py_CLEAR(clear_module_state->__pyx_tuple__7);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__24);
  Py_CLEAR(clear_module_state->__pyx_tuple__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
  Py_CLEAR(clear_module_state->__pyx_tuple__32);
  Py_CLEAR(clear_module_state->__pyx_tuple__34);
  Py_CLEAR(clear_module_state->__pyx_tuple__36);
  Py_CLEAR(clear_module_state->__pyx_tuple__38);
  Py_CLEAR(clear_module_state->__pyx_tuple__40);
  Py_CLEAR(clear_module_state->__pyx_tuple__42);
  Py_CLEAR(clear_module_state->__pyx_tuple__44);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__48);
  Py_CLEAR(clear_module_state->__pyx_tuple__49);
  Py_CLEAR(clear_module_state->__pyx_tuple__51);
  Py_CLEAR(clear_module_state->__pyx_tuple__52);
  Py_CLEAR(clear_module_state->__pyx_tuple__54);
  Py_CLEAR(clear_module_state->__pyx_tuple__56);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__59);
  Py_CLEAR(clear_module_state->__pyx_tuple__61);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_codeobj__23);
  Py_CLEAR(clear_module_state->__pyx_codeobj__25);
  Py_CLEAR(clear_module_state->__pyx_codeobj__27);
  Py_CLEAR(clear_module_state->__pyx_codeobj__29);
  Py_CLEAR(clear_module_state->__pyx_codeobj__31);
  Py_CLEAR(clear_module_state->__pyx_codeobj__33);
  Py_CLEAR(clear_module_state->__pyx_codeobj__35);
  Py_CLEAR(clear_module_state->__pyx_codeobj__37);
  Py_CLEAR(clear_module_state->__pyx_codeobj__39);
  Py_CLEAR(clear_module_state->__pyx_codeobj__41);
  Py_CLEAR(clear_module_state->__pyx_codeobj__43);
  Py_CLEAR(clear_module_state->__pyx_codeobj__45);
  Py_CLEAR(clear_module_state->__pyx_codeobj__47);
  Py_CLEAR(clear_module_state->__pyx_codeobj__50);
  Py_CLEAR(clear_module_state->__pyx_codeobj__53);
  Py_CLEAR(clear_module_state->__pyx_codeobj__55);
  Py_CLEAR(clear_module_state->__pyx_codeobj__57);
  Py_CLEAR(clear_module_state->__pyx_codeobj__60);
  Py_CLEAR(clear_module_state->__pyx_codeobj__62);
  Py_CLEAR(clear_module_state->__pyx_codeobj__64);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(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);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_kp_u_);
  Py_VISIT(traverse_module_state->__pyx_kp_b_0);
  Py_VISIT(traverse_module_state->__pyx_n_b_A);
  Py_VISIT(traverse_module_state->__pyx_n_s_ASN_SNMP_MSG_TYPES);
  Py_VISIT(traverse_module_state->__pyx_n_u_Counter32);
  Py_VISIT(traverse_module_state->__pyx_n_u_Counter64);
  Py_VISIT(traverse_module_state->__pyx_n_s_EndOfMibView);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Exception);
  Py_VISIT(traverse_module_state->__pyx_n_b_F);
  Py_VISIT(traverse_module_state->__pyx_n_u_Get);
  Py_VISIT(traverse_module_state->__pyx_n_u_GetBulk);
  Py_VISIT(traverse_module_state->__pyx_n_u_GetNext);
  Py_VISIT(traverse_module_state->__pyx_n_u_Integer);
  Py_VISIT(traverse_module_state->__pyx_n_s_NoSuchInstance);
  Py_VISIT(traverse_module_state->__pyx_n_s_NoSuchObject);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError);
  Py_VISIT(traverse_module_state->__pyx_n_u_Null);
  Py_VISIT(traverse_module_state->__pyx_n_u_ObjectID);
  Py_VISIT(traverse_module_state->__pyx_n_u_OctetString);
  Py_VISIT(traverse_module_state->__pyx_n_u_Response);
  Py_VISIT(traverse_module_state->__pyx_n_u_SID1);
  Py_VISIT(traverse_module_state->__pyx_n_u_SID2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SNMPException);
  Py_VISIT(traverse_module_state->__pyx_n_u_Sequence);
  Py_VISIT(traverse_module_state->__pyx_n_u_Set);
  Py_VISIT(traverse_module_state->__pyx_n_s_TYPE_NAME_TO_TYPE);
  Py_VISIT(traverse_module_state->__pyx_n_u_Trap);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_VarBindContentException);
  Py_VISIT(traverse_module_state->__pyx_n_s_VarBindUnpackException);
  Py_VISIT(traverse_module_state->__pyx_kp_b__10);
  Py_VISIT(traverse_module_state->__pyx_kp_b__11);
  Py_VISIT(traverse_module_state->__pyx_kp_b__12);
  Py_VISIT(traverse_module_state->__pyx_kp_b__13);
  Py_VISIT(traverse_module_state->__pyx_kp_b__14);
  Py_VISIT(traverse_module_state->__pyx_n_s__15);
  Py_VISIT(traverse_module_state->__pyx_kp_b__16);
  Py_VISIT(traverse_module_state->__pyx_kp_b__17);
  Py_VISIT(traverse_module_state->__pyx_kp_b__18);
  Py_VISIT(traverse_module_state->__pyx_kp_b__19);
  Py_VISIT(traverse_module_state->__pyx_kp_b__20);
  Py_VISIT(traverse_module_state->__pyx_kp_b__21);
  Py_VISIT(traverse_module_state->__pyx_n_s__65);
  Py_VISIT(traverse_module_state->__pyx_kp_b__8);
  Py_VISIT(traverse_module_state->__pyx_kp_b__9);
  Py_VISIT(traverse_module_state->__pyx_n_u_ascii);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_is_growing);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_community);
  Py_VISIT(traverse_module_state->__pyx_n_s_community_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_community_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_community_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_cycle);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_encode_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_encode_varbind);
  Py_VISIT(traverse_module_state->__pyx_kp_u_end_of_content);
  Py_VISIT(traverse_module_state->__pyx_n_s_end_of_mib_view);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_index_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_index_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_index_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_status_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_status_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_status_value);
  Py_VISIT(traverse_module_state->__pyx_kp_u_expected_oid_in_str_got_r);
  Py_VISIT(traverse_module_state->__pyx_kp_u_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_fastsnmp_snmp_parser);
  Py_VISIT(traverse_module_state->__pyx_kp_s_fastsnmp_snmp_parser_pyx);
  Py_VISIT(traverse_module_state->__pyx_n_s_first_seen_index);
  Py_VISIT(traverse_module_state->__pyx_kp_u_for);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_idlist);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_part);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_insert);
  Py_VISIT(traverse_module_state->__pyx_n_s_integer_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_integer_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_growing);
  Py_VISIT(traverse_module_state->__pyx_kp_u_item);
  Py_VISIT(traverse_module_state->__pyx_n_s_item_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_itertools);
  Py_VISIT(traverse_module_state->__pyx_n_s_last_seen_index);
  Py_VISIT(traverse_module_state->__pyx_kp_u_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_length_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_length_cache);
  Py_VISIT(traverse_module_state->__pyx_n_s_length_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_length_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_list);
  Py_VISIT(traverse_module_state->__pyx_kp_u_long_SID1_is_not_supported);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_oid);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_oids_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_oids_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_oids_positions);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_repetitions);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_repetitions_len);
  Py_VISIT(traverse_module_state->__pyx_kp_u_max_repetitions_must_be_higher_t);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_repetitions_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_repetitions_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_msg_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_msg_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_msg_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_oids);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_repeaters);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_repeaters_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_repeaters_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_repeaters_value);
  Py_VISIT(traverse_module_state->__pyx_kp_u_not_implement_coder_for_s);
  Py_VISIT(traverse_module_state->__pyx_kp_u_not_increasing);
  Py_VISIT(traverse_module_state->__pyx_n_s_numOctets);
  Py_VISIT(traverse_module_state->__pyx_n_s_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj_id_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj_id_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj_id_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj_value_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj_value_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj_value_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_object_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_objectid_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_objectid_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_octetstring_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_octetstring_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_oid);
  Py_VISIT(traverse_module_state->__pyx_n_s_oid_finish);
  Py_VISIT(traverse_module_state->__pyx_n_s_oid_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_oids_to_poll);
  Py_VISIT(traverse_module_state->__pyx_kp_u_opaque_len_s_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_orig_main_oids);
  Py_VISIT(traverse_module_state->__pyx_n_s_orig_main_oids_doted);
  Py_VISIT(traverse_module_state->__pyx_n_s_orig_main_oids_len);
  Py_VISIT(traverse_module_state->__pyx_kp_u_out_of_len_current_stream_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_p);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_varbind);
  Py_VISIT(traverse_module_state->__pyx_n_s_pdu);
  Py_VISIT(traverse_module_state->__pyx_n_s_pdu_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_pdu_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_req_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_request_id_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_request_id_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_request_id_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_res);
  Py_VISIT(traverse_module_state->__pyx_n_s_rest_oids_positions);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_resultlist);
  Py_VISIT(traverse_module_state->__pyx_n_s_ret);
  Py_VISIT(traverse_module_state->__pyx_n_s_ret_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_ret_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_return);
  Py_VISIT(traverse_module_state->__pyx_n_s_seq_tag);
  Py_VISIT(traverse_module_state->__pyx_n_s_sequence_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_skip_column);
  Py_VISIT(traverse_module_state->__pyx_n_s_slen);
  Py_VISIT(traverse_module_state->__pyx_n_s_snmp_message_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_snmp_message_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_snmp_message_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_snmp_ver);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_u_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_stream);
  Py_VISIT(traverse_module_state->__pyx_n_s_stream_char);
  Py_VISIT(traverse_module_state->__pyx_kp_u_stream_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_stream_len_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_stream_ptr);
  Py_VISIT(traverse_module_state->__pyx_n_s_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_strip);
  Py_VISIT(traverse_module_state->__pyx_n_u_strlen);
  Py_VISIT(traverse_module_state->__pyx_n_s_struct);
  Py_VISIT(traverse_module_state->__pyx_n_s_subid);
  Py_VISIT(traverse_module_state->__pyx_n_s_subidlist);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_kp_u_tag);
  Py_VISIT(traverse_module_state->__pyx_n_s_tag_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_tag_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_tmp_length);
  Py_VISIT(traverse_module_state->__pyx_kp_u_too_long_oid);
  Py_VISIT(traverse_module_state->__pyx_n_s_uinteger_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_uinteger_encode);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_float_len_s);
  Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_tag_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_value_encode);
  Py_VISIT(traverse_module_state->__pyx_kp_u_value_must_be_None_for_Null_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_value_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_var_bind_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_var_bind_list_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_var_bind_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbind);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbind_enc);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_encode_tlv);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_obj);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_tlv);
  Py_VISIT(traverse_module_state->__pyx_n_s_varbinds_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_version_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_version_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_version_value);
  Py_VISIT(traverse_module_state->__pyx_kp_u_vs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_wrong_SID1);
  Py_VISIT(traverse_module_state->__pyx_kp_u_wrong_SID2);
  Py_VISIT(traverse_module_state->__pyx_n_s_x);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_10);
  Py_VISIT(traverse_module_state->__pyx_int_128);
  Py_VISIT(traverse_module_state->__pyx_int_255);
  Py_VISIT(traverse_module_state->__pyx_tuple__2);
  Py_VISIT(traverse_module_state->__pyx_tuple__3);
  Py_VISIT(traverse_module_state->__pyx_tuple__4);
  Py_VISIT(traverse_module_state->__pyx_tuple__5);
  Py_VISIT(traverse_module_state->__pyx_tuple__6);
  Py_VISIT(traverse_module_state->__pyx_tuple__7);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__24);
  Py_VISIT(traverse_module_state->__pyx_tuple__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
  Py_VISIT(traverse_module_state->__pyx_tuple__32);
  Py_VISIT(traverse_module_state->__pyx_tuple__34);
  Py_VISIT(traverse_module_state->__pyx_tuple__36);
  Py_VISIT(traverse_module_state->__pyx_tuple__38);
  Py_VISIT(traverse_module_state->__pyx_tuple__40);
  Py_VISIT(traverse_module_state->__pyx_tuple__42);
  Py_VISIT(traverse_module_state->__pyx_tuple__44);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__48);
  Py_VISIT(traverse_module_state->__pyx_tuple__49);
  Py_VISIT(traverse_module_state->__pyx_tuple__51);
  Py_VISIT(traverse_module_state->__pyx_tuple__52);
  Py_VISIT(traverse_module_state->__pyx_tuple__54);
  Py_VISIT(traverse_module_state->__pyx_tuple__56);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__59);
  Py_VISIT(traverse_module_state->__pyx_tuple__61);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_codeobj__23);
  Py_VISIT(traverse_module_state->__pyx_codeobj__25);
  Py_VISIT(traverse_module_state->__pyx_codeobj__27);
  Py_VISIT(traverse_module_state->__pyx_codeobj__29);
  Py_VISIT(traverse_module_state->__pyx_codeobj__31);
  Py_VISIT(traverse_module_state->__pyx_codeobj__33);
  Py_VISIT(traverse_module_state->__pyx_codeobj__35);
  Py_VISIT(traverse_module_state->__pyx_codeobj__37);
  Py_VISIT(traverse_module_state->__pyx_codeobj__39);
  Py_VISIT(traverse_module_state->__pyx_codeobj__41);
  Py_VISIT(traverse_module_state->__pyx_codeobj__43);
  Py_VISIT(traverse_module_state->__pyx_codeobj__45);
  Py_VISIT(traverse_module_state->__pyx_codeobj__47);
  Py_VISIT(traverse_module_state->__pyx_codeobj__50);
  Py_VISIT(traverse_module_state->__pyx_codeobj__53);
  Py_VISIT(traverse_module_state->__pyx_codeobj__55);
  Py_VISIT(traverse_module_state->__pyx_codeobj__57);
  Py_VISIT(traverse_module_state->__pyx_codeobj__60);
  Py_VISIT(traverse_module_state->__pyx_codeobj__62);
  Py_VISIT(traverse_module_state->__pyx_codeobj__64);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#if CYTHON_COMPILING_IN_LIMITED_API
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
#define __pyx_kp_b_0 __pyx_mstate_global->__pyx_kp_b_0
#define __pyx_n_b_A __pyx_mstate_global->__pyx_n_b_A
#define __pyx_n_s_ASN_SNMP_MSG_TYPES __pyx_mstate_global->__pyx_n_s_ASN_SNMP_MSG_TYPES
#define __pyx_n_u_Counter32 __pyx_mstate_global->__pyx_n_u_Counter32
#define __pyx_n_u_Counter64 __pyx_mstate_global->__pyx_n_u_Counter64
#define __pyx_n_s_EndOfMibView __pyx_mstate_global->__pyx_n_s_EndOfMibView
#define __pyx_kp_u_Exception __pyx_mstate_global->__pyx_kp_u_Exception
#define __pyx_n_b_F __pyx_mstate_global->__pyx_n_b_F
#define __pyx_n_u_Get __pyx_mstate_global->__pyx_n_u_Get
#define __pyx_n_u_GetBulk __pyx_mstate_global->__pyx_n_u_GetBulk
#define __pyx_n_u_GetNext __pyx_mstate_global->__pyx_n_u_GetNext
#define __pyx_n_u_Integer __pyx_mstate_global->__pyx_n_u_Integer
#define __pyx_n_s_NoSuchInstance __pyx_mstate_global->__pyx_n_s_NoSuchInstance
#define __pyx_n_s_NoSuchObject __pyx_mstate_global->__pyx_n_s_NoSuchObject
#define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError
#define __pyx_n_u_Null __pyx_mstate_global->__pyx_n_u_Null
#define __pyx_n_u_ObjectID __pyx_mstate_global->__pyx_n_u_ObjectID
#define __pyx_n_u_OctetString __pyx_mstate_global->__pyx_n_u_OctetString
#define __pyx_n_u_Response __pyx_mstate_global->__pyx_n_u_Response
#define __pyx_n_u_SID1 __pyx_mstate_global->__pyx_n_u_SID1
#define __pyx_n_u_SID2 __pyx_mstate_global->__pyx_n_u_SID2
#define __pyx_n_s_SNMPException __pyx_mstate_global->__pyx_n_s_SNMPException
#define __pyx_n_u_Sequence __pyx_mstate_global->__pyx_n_u_Sequence
#define __pyx_n_u_Set __pyx_mstate_global->__pyx_n_u_Set
#define __pyx_n_s_TYPE_NAME_TO_TYPE __pyx_mstate_global->__pyx_n_s_TYPE_NAME_TO_TYPE
#define __pyx_n_u_Trap __pyx_mstate_global->__pyx_n_u_Trap
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_VarBindContentException __pyx_mstate_global->__pyx_n_s_VarBindContentException
#define __pyx_n_s_VarBindUnpackException __pyx_mstate_global->__pyx_n_s_VarBindUnpackException
#define __pyx_kp_b__10 __pyx_mstate_global->__pyx_kp_b__10
#define __pyx_kp_b__11 __pyx_mstate_global->__pyx_kp_b__11
#define __pyx_kp_b__12 __pyx_mstate_global->__pyx_kp_b__12
#define __pyx_kp_b__13 __pyx_mstate_global->__pyx_kp_b__13
#define __pyx_kp_b__14 __pyx_mstate_global->__pyx_kp_b__14
#define __pyx_n_s__15 __pyx_mstate_global->__pyx_n_s__15
#define __pyx_kp_b__16 __pyx_mstate_global->__pyx_kp_b__16
#define __pyx_kp_b__17 __pyx_mstate_global->__pyx_kp_b__17
#define __pyx_kp_b__18 __pyx_mstate_global->__pyx_kp_b__18
#define __pyx_kp_b__19 __pyx_mstate_global->__pyx_kp_b__19
#define __pyx_kp_b__20 __pyx_mstate_global->__pyx_kp_b__20
#define __pyx_kp_b__21 __pyx_mstate_global->__pyx_kp_b__21
#define __pyx_n_s__65 __pyx_mstate_global->__pyx_n_s__65
#define __pyx_kp_b__8 __pyx_mstate_global->__pyx_kp_b__8
#define __pyx_kp_b__9 __pyx_mstate_global->__pyx_kp_b__9
#define __pyx_n_u_ascii __pyx_mstate_global->__pyx_n_u_ascii
#define __pyx_n_s_check_is_growing __pyx_mstate_global->__pyx_n_s_check_is_growing
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_community __pyx_mstate_global->__pyx_n_s_community
#define __pyx_n_s_community_len __pyx_mstate_global->__pyx_n_s_community_len
#define __pyx_n_s_community_type __pyx_mstate_global->__pyx_n_s_community_type
#define __pyx_n_s_community_value __pyx_mstate_global->__pyx_n_s_community_value
#define __pyx_n_s_cycle __pyx_mstate_global->__pyx_n_s_cycle
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_n_s_data_len __pyx_mstate_global->__pyx_n_s_data_len
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
#define __pyx_n_s_encode_length __pyx_mstate_global->__pyx_n_s_encode_length
#define __pyx_n_s_encode_varbind __pyx_mstate_global->__pyx_n_s_encode_varbind
#define __pyx_kp_u_end_of_content __pyx_mstate_global->__pyx_kp_u_end_of_content
#define __pyx_n_s_end_of_mib_view __pyx_mstate_global->__pyx_n_s_end_of_mib_view
#define __pyx_n_s_error_index __pyx_mstate_global->__pyx_n_s_error_index
#define __pyx_n_s_error_index_len __pyx_mstate_global->__pyx_n_s_error_index_len
#define __pyx_n_s_error_index_type __pyx_mstate_global->__pyx_n_s_error_index_type
#define __pyx_n_s_error_index_value __pyx_mstate_global->__pyx_n_s_error_index_value
#define __pyx_n_s_error_status __pyx_mstate_global->__pyx_n_s_error_status
#define __pyx_n_s_error_status_len __pyx_mstate_global->__pyx_n_s_error_status_len
#define __pyx_n_s_error_status_type __pyx_mstate_global->__pyx_n_s_error_status_type
#define __pyx_n_s_error_status_value __pyx_mstate_global->__pyx_n_s_error_status_value
#define __pyx_kp_u_expected_oid_in_str_got_r __pyx_mstate_global->__pyx_kp_u_expected_oid_in_str_got_r
#define __pyx_kp_u_f __pyx_mstate_global->__pyx_kp_u_f
#define __pyx_n_s_fastsnmp_snmp_parser __pyx_mstate_global->__pyx_n_s_fastsnmp_snmp_parser
#define __pyx_kp_s_fastsnmp_snmp_parser_pyx __pyx_mstate_global->__pyx_kp_s_fastsnmp_snmp_parser_pyx
#define __pyx_n_s_first_seen_index __pyx_mstate_global->__pyx_n_s_first_seen_index
#define __pyx_kp_u_for __pyx_mstate_global->__pyx_kp_u_for
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_idlist __pyx_mstate_global->__pyx_n_s_idlist
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_index_part __pyx_mstate_global->__pyx_n_s_index_part
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_insert __pyx_mstate_global->__pyx_n_s_insert
#define __pyx_n_s_integer_decode __pyx_mstate_global->__pyx_n_s_integer_decode
#define __pyx_n_s_integer_encode __pyx_mstate_global->__pyx_n_s_integer_encode
#define __pyx_n_s_is_growing __pyx_mstate_global->__pyx_n_s_is_growing
#define __pyx_kp_u_item __pyx_mstate_global->__pyx_kp_u_item
#define __pyx_n_s_item_2 __pyx_mstate_global->__pyx_n_s_item_2
#define __pyx_n_s_itertools __pyx_mstate_global->__pyx_n_s_itertools
#define __pyx_n_s_last_seen_index __pyx_mstate_global->__pyx_n_s_last_seen_index
#define __pyx_kp_u_length __pyx_mstate_global->__pyx_kp_u_length
#define __pyx_n_s_length_2 __pyx_mstate_global->__pyx_n_s_length_2
#define __pyx_n_s_length_cache __pyx_mstate_global->__pyx_n_s_length_cache
#define __pyx_n_s_length_decode __pyx_mstate_global->__pyx_n_s_length_decode
#define __pyx_n_s_length_encode __pyx_mstate_global->__pyx_n_s_length_encode
#define __pyx_n_s_list __pyx_mstate_global->__pyx_n_s_list
#define __pyx_kp_u_long_SID1_is_not_supported __pyx_mstate_global->__pyx_kp_u_long_SID1_is_not_supported
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_main_oid __pyx_mstate_global->__pyx_n_s_main_oid
#define __pyx_n_s_main_oids_len __pyx_mstate_global->__pyx_n_s_main_oids_len
#define __pyx_n_s_main_oids_pos __pyx_mstate_global->__pyx_n_s_main_oids_pos
#define __pyx_n_s_main_oids_positions __pyx_mstate_global->__pyx_n_s_main_oids_positions
#define __pyx_n_s_max_repetitions __pyx_mstate_global->__pyx_n_s_max_repetitions
#define __pyx_n_s_max_repetitions_len __pyx_mstate_global->__pyx_n_s_max_repetitions_len
#define __pyx_kp_u_max_repetitions_must_be_higher_t __pyx_mstate_global->__pyx_kp_u_max_repetitions_must_be_higher_t
#define __pyx_n_s_max_repetitions_type __pyx_mstate_global->__pyx_n_s_max_repetitions_type
#define __pyx_n_s_max_repetitions_value __pyx_mstate_global->__pyx_n_s_max_repetitions_value
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_msg_decode __pyx_mstate_global->__pyx_n_s_msg_decode
#define __pyx_n_s_msg_encode __pyx_mstate_global->__pyx_n_s_msg_encode
#define __pyx_n_s_msg_type __pyx_mstate_global->__pyx_n_s_msg_type
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_next_oids __pyx_mstate_global->__pyx_n_s_next_oids
#define __pyx_n_s_non_repeaters __pyx_mstate_global->__pyx_n_s_non_repeaters
#define __pyx_n_s_non_repeaters_len __pyx_mstate_global->__pyx_n_s_non_repeaters_len
#define __pyx_n_s_non_repeaters_type __pyx_mstate_global->__pyx_n_s_non_repeaters_type
#define __pyx_n_s_non_repeaters_value __pyx_mstate_global->__pyx_n_s_non_repeaters_value
#define __pyx_kp_u_not_implement_coder_for_s __pyx_mstate_global->__pyx_kp_u_not_implement_coder_for_s
#define __pyx_kp_u_not_increasing __pyx_mstate_global->__pyx_kp_u_not_increasing
#define __pyx_n_s_numOctets __pyx_mstate_global->__pyx_n_s_numOctets
#define __pyx_n_s_number __pyx_mstate_global->__pyx_n_s_number
#define __pyx_n_s_obj_id_len __pyx_mstate_global->__pyx_n_s_obj_id_len
#define __pyx_n_s_obj_id_type __pyx_mstate_global->__pyx_n_s_obj_id_type
#define __pyx_n_s_obj_id_value __pyx_mstate_global->__pyx_n_s_obj_id_value
#define __pyx_n_s_obj_value_len __pyx_mstate_global->__pyx_n_s_obj_value_len
#define __pyx_n_s_obj_value_type __pyx_mstate_global->__pyx_n_s_obj_value_type
#define __pyx_n_s_obj_value_value __pyx_mstate_global->__pyx_n_s_obj_value_value
#define __pyx_n_s_object_len __pyx_mstate_global->__pyx_n_s_object_len
#define __pyx_n_s_objectid_decode __pyx_mstate_global->__pyx_n_s_objectid_decode
#define __pyx_n_s_objectid_encode __pyx_mstate_global->__pyx_n_s_objectid_encode
#define __pyx_n_s_octetstring_decode __pyx_mstate_global->__pyx_n_s_octetstring_decode
#define __pyx_n_s_octetstring_encode __pyx_mstate_global->__pyx_n_s_octetstring_encode
#define __pyx_n_s_oid __pyx_mstate_global->__pyx_n_s_oid
#define __pyx_n_s_oid_finish __pyx_mstate_global->__pyx_n_s_oid_finish
#define __pyx_n_s_oid_start __pyx_mstate_global->__pyx_n_s_oid_start
#define __pyx_n_s_oids_to_poll __pyx_mstate_global->__pyx_n_s_oids_to_poll
#define __pyx_kp_u_opaque_len_s_1 __pyx_mstate_global->__pyx_kp_u_opaque_len_s_1
#define __pyx_n_s_orig_main_oids __pyx_mstate_global->__pyx_n_s_orig_main_oids
#define __pyx_n_s_orig_main_oids_doted __pyx_mstate_global->__pyx_n_s_orig_main_oids_doted
#define __pyx_n_s_orig_main_oids_len __pyx_mstate_global->__pyx_n_s_orig_main_oids_len
#define __pyx_kp_u_out_of_len_current_stream_pos __pyx_mstate_global->__pyx_kp_u_out_of_len_current_stream_pos
#define __pyx_n_s_p __pyx_mstate_global->__pyx_n_s_p
#define __pyx_n_s_parse_varbind __pyx_mstate_global->__pyx_n_s_parse_varbind
#define __pyx_n_s_pdu __pyx_mstate_global->__pyx_n_s_pdu
#define __pyx_n_s_pdu_len __pyx_mstate_global->__pyx_n_s_pdu_len
#define __pyx_n_s_pdu_type __pyx_mstate_global->__pyx_n_s_pdu_type
#define __pyx_n_s_pos __pyx_mstate_global->__pyx_n_s_pos
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_req_id __pyx_mstate_global->__pyx_n_s_req_id
#define __pyx_n_s_request_id_len __pyx_mstate_global->__pyx_n_s_request_id_len
#define __pyx_n_s_request_id_type __pyx_mstate_global->__pyx_n_s_request_id_type
#define __pyx_n_s_request_id_value __pyx_mstate_global->__pyx_n_s_request_id_value
#define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res
#define __pyx_n_s_rest_oids_positions __pyx_mstate_global->__pyx_n_s_rest_oids_positions
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_resultlist __pyx_mstate_global->__pyx_n_s_resultlist
#define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret
#define __pyx_n_s_ret_length __pyx_mstate_global->__pyx_n_s_ret_length
#define __pyx_n_s_ret_str __pyx_mstate_global->__pyx_n_s_ret_str
#define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return
#define __pyx_n_s_seq_tag __pyx_mstate_global->__pyx_n_s_seq_tag
#define __pyx_n_s_sequence_decode __pyx_mstate_global->__pyx_n_s_sequence_decode
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_skip_column __pyx_mstate_global->__pyx_n_s_skip_column
#define __pyx_n_s_slen __pyx_mstate_global->__pyx_n_s_slen
#define __pyx_n_s_snmp_message_len __pyx_mstate_global->__pyx_n_s_snmp_message_len
#define __pyx_n_s_snmp_message_type __pyx_mstate_global->__pyx_n_s_snmp_message_type
#define __pyx_n_s_snmp_message_value __pyx_mstate_global->__pyx_n_s_snmp_message_value
#define __pyx_n_s_snmp_ver __pyx_mstate_global->__pyx_n_s_snmp_ver
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_u_str __pyx_mstate_global->__pyx_n_u_str
#define __pyx_n_s_stream __pyx_mstate_global->__pyx_n_s_stream
#define __pyx_n_s_stream_char __pyx_mstate_global->__pyx_n_s_stream_char
#define __pyx_kp_u_stream_len __pyx_mstate_global->__pyx_kp_u_stream_len
#define __pyx_n_s_stream_len_2 __pyx_mstate_global->__pyx_n_s_stream_len_2
#define __pyx_n_s_stream_ptr __pyx_mstate_global->__pyx_n_s_stream_ptr
#define __pyx_n_s_string __pyx_mstate_global->__pyx_n_s_string
#define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip
#define __pyx_n_u_strlen __pyx_mstate_global->__pyx_n_u_strlen
#define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
#define __pyx_n_s_subid __pyx_mstate_global->__pyx_n_s_subid
#define __pyx_n_s_subidlist __pyx_mstate_global->__pyx_n_s_subidlist
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_kp_u_tag __pyx_mstate_global->__pyx_kp_u_tag
#define __pyx_n_s_tag_2 __pyx_mstate_global->__pyx_n_s_tag_2
#define __pyx_n_s_tag_decode __pyx_mstate_global->__pyx_n_s_tag_decode
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_tmp_length __pyx_mstate_global->__pyx_n_s_tmp_length
#define __pyx_kp_u_too_long_oid __pyx_mstate_global->__pyx_kp_u_too_long_oid
#define __pyx_n_s_uinteger_decode __pyx_mstate_global->__pyx_n_s_uinteger_decode
#define __pyx_n_s_uinteger_encode __pyx_mstate_global->__pyx_n_s_uinteger_encode
#define __pyx_kp_u_unknown_float_len_s __pyx_mstate_global->__pyx_kp_u_unknown_float_len_s
#define __pyx_kp_u_unknown_tag_s __pyx_mstate_global->__pyx_kp_u_unknown_tag_s
#define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_value_encode __pyx_mstate_global->__pyx_n_s_value_encode
#define __pyx_kp_u_value_must_be_None_for_Null_type __pyx_mstate_global->__pyx_kp_u_value_must_be_None_for_Null_type
#define __pyx_n_s_value_type __pyx_mstate_global->__pyx_n_s_value_type
#define __pyx_n_s_var_bind_list __pyx_mstate_global->__pyx_n_s_var_bind_list
#define __pyx_n_s_var_bind_list_len __pyx_mstate_global->__pyx_n_s_var_bind_list_len
#define __pyx_n_s_var_bind_pos __pyx_mstate_global->__pyx_n_s_var_bind_pos
#define __pyx_n_s_varbind __pyx_mstate_global->__pyx_n_s_varbind
#define __pyx_n_s_varbind_enc __pyx_mstate_global->__pyx_n_s_varbind_enc
#define __pyx_n_s_varbinds __pyx_mstate_global->__pyx_n_s_varbinds
#define __pyx_n_s_varbinds_data __pyx_mstate_global->__pyx_n_s_varbinds_data
#define __pyx_n_s_varbinds_encode __pyx_mstate_global->__pyx_n_s_varbinds_encode
#define __pyx_n_s_varbinds_encode_tlv __pyx_mstate_global->__pyx_n_s_varbinds_encode_tlv
#define __pyx_n_s_varbinds_len __pyx_mstate_global->__pyx_n_s_varbinds_len
#define __pyx_n_s_varbinds_obj __pyx_mstate_global->__pyx_n_s_varbinds_obj
#define __pyx_n_s_varbinds_tlv __pyx_mstate_global->__pyx_n_s_varbinds_tlv
#define __pyx_n_s_varbinds_type __pyx_mstate_global->__pyx_n_s_varbinds_type
#define __pyx_n_s_version_len __pyx_mstate_global->__pyx_n_s_version_len
#define __pyx_n_s_version_type __pyx_mstate_global->__pyx_n_s_version_type
#define __pyx_n_s_version_value __pyx_mstate_global->__pyx_n_s_version_value
#define __pyx_kp_u_vs __pyx_mstate_global->__pyx_kp_u_vs
#define __pyx_kp_u_wrong_SID1 __pyx_mstate_global->__pyx_kp_u_wrong_SID1
#define __pyx_kp_u_wrong_SID2 __pyx_mstate_global->__pyx_kp_u_wrong_SID2
#define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_10 __pyx_mstate_global->__pyx_int_10
#define __pyx_int_128 __pyx_mstate_global->__pyx_int_128
#define __pyx_int_255 __pyx_mstate_global->__pyx_int_255
#define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
#define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
#define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
#define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49
#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
#define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
#define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
#define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27
#define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
#define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
#define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
#define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43
#define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45
#define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47
#define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
#define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
#define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55
#define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57
#define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60
#define __pyx_codeobj__62 __pyx_mstate_global->__pyx_codeobj__62
#define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64
#endif
/* #### Code section: module_code ### */

/* "fastsnmp/snmp_parser.pyx":169
 * ]
 * 
 * cdef inline int primitive_decode(char *stream, size_t stream_len, uint64_t *result, size_t *result_len):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef uint8_t sid
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_primitive_decode(char *__pyx_v_stream, size_t __pyx_v_stream_len, uint64_t *__pyx_v_result, size_t *__pyx_v_result_len) {
  size_t __pyx_v_i;
  uint8_t __pyx_v_sid;
  int __pyx_v_retval;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  __Pyx_RefNannySetupContext("primitive_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":172
 *     cdef size_t i
 *     cdef uint8_t sid
 *     cdef int retval = 0             # <<<<<<<<<<<<<<
 *     result_len[0] = 0
 *     result[0] = 0
 */
  __pyx_v_retval = 0;

  /* "fastsnmp/snmp_parser.pyx":173
 *     cdef uint8_t sid
 *     cdef int retval = 0
 *     result_len[0] = 0             # <<<<<<<<<<<<<<
 *     result[0] = 0
 * 
 */
  (__pyx_v_result_len[0]) = 0;

  /* "fastsnmp/snmp_parser.pyx":174
 *     cdef int retval = 0
 *     result_len[0] = 0
 *     result[0] = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(stream_len):
 */
  (__pyx_v_result[0]) = 0;

  /* "fastsnmp/snmp_parser.pyx":176
 *     result[0] = 0
 * 
 *     for i in range(stream_len):             # <<<<<<<<<<<<<<
 *         result[result_len[0]] <<= 7
 *         sid = <uint8_t>stream[i]
 */
  __pyx_t_1 = __pyx_v_stream_len;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "fastsnmp/snmp_parser.pyx":177
 * 
 *     for i in range(stream_len):
 *         result[result_len[0]] <<= 7             # <<<<<<<<<<<<<<
 *         sid = <uint8_t>stream[i]
 *         result[result_len[0]] |= sid & 0x7f
 */
    __pyx_t_4 = (__pyx_v_result_len[0]);
    (__pyx_v_result[__pyx_t_4]) = ((__pyx_v_result[__pyx_t_4]) << 7);

    /* "fastsnmp/snmp_parser.pyx":178
 *     for i in range(stream_len):
 *         result[result_len[0]] <<= 7
 *         sid = <uint8_t>stream[i]             # <<<<<<<<<<<<<<
 *         result[result_len[0]] |= sid & 0x7f
 *         if sid & 0x80 == 0:
 */
    __pyx_v_sid = ((uint8_t)(__pyx_v_stream[__pyx_v_i]));

    /* "fastsnmp/snmp_parser.pyx":179
 *         result[result_len[0]] <<= 7
 *         sid = <uint8_t>stream[i]
 *         result[result_len[0]] |= sid & 0x7f             # <<<<<<<<<<<<<<
 *         if sid & 0x80 == 0:
 *             result_len[0] +=1
 */
    __pyx_t_4 = (__pyx_v_result_len[0]);
    (__pyx_v_result[__pyx_t_4]) = ((__pyx_v_result[__pyx_t_4]) | (__pyx_v_sid & 0x7f));

    /* "fastsnmp/snmp_parser.pyx":180
 *         sid = <uint8_t>stream[i]
 *         result[result_len[0]] |= sid & 0x7f
 *         if sid & 0x80 == 0:             # <<<<<<<<<<<<<<
 *             result_len[0] +=1
 *             result[result_len[0]] = 0
 */
    __pyx_t_5 = (((__pyx_v_sid & 0x80) == 0) != 0);
    if (__pyx_t_5) {

      /* "fastsnmp/snmp_parser.pyx":181
 *         result[result_len[0]] |= sid & 0x7f
 *         if sid & 0x80 == 0:
 *             result_len[0] +=1             # <<<<<<<<<<<<<<
 *             result[result_len[0]] = 0
 * 
 */
      __pyx_t_6 = 0;
      (__pyx_v_result_len[__pyx_t_6]) = ((__pyx_v_result_len[__pyx_t_6]) + 1);

      /* "fastsnmp/snmp_parser.pyx":182
 *         if sid & 0x80 == 0:
 *             result_len[0] +=1
 *             result[result_len[0]] = 0             # <<<<<<<<<<<<<<
 * 
 *     return retval
 */
      (__pyx_v_result[(__pyx_v_result_len[0])]) = 0;

      /* "fastsnmp/snmp_parser.pyx":180
 *         sid = <uint8_t>stream[i]
 *         result[result_len[0]] |= sid & 0x7f
 *         if sid & 0x80 == 0:             # <<<<<<<<<<<<<<
 *             result_len[0] +=1
 *             result[result_len[0]] = 0
 */
    }
  }

  /* "fastsnmp/snmp_parser.pyx":184
 *             result[result_len[0]] = 0
 * 
 *     return retval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_retval;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":169
 * ]
 * 
 * cdef inline int primitive_decode(char *stream, size_t stream_len, uint64_t *result, size_t *result_len):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef uint8_t sid
 */

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

/* "fastsnmp/snmp_parser.pyx":187
 * 
 * 
 * cdef int objectid_decode_str(const unsigned char *stream, size_t stream_len, char *out, size_t *out_length) except -1:             # <<<<<<<<<<<<<<
 *     cdef uint64_t result[122]
 *     cdef uint64_t oid_part
 */

static int __pyx_f_8fastsnmp_11snmp_parser_objectid_decode_str(unsigned char const *__pyx_v_stream, size_t __pyx_v_stream_len, char *__pyx_v_out, size_t *__pyx_v_out_length) {
  uint64_t __pyx_v_result[0x7A];
  uint64_t __pyx_v_oid_part;
  size_t __pyx_v_n;
  size_t __pyx_v_tmp_n;
  size_t __pyx_v_cpy_len;
  size_t __pyx_v_sid12_enc_len;
  size_t __pyx_v_result_len;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_v_tmp_sid;
  char *__pyx_v_oid_part_char;
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  long __pyx_t_5;
  __Pyx_RefNannySetupContext("objectid_decode_str", 0);

  /* "fastsnmp/snmp_parser.pyx":190
 *     cdef uint64_t result[122]
 *     cdef uint64_t oid_part
 *     cdef size_t n, tmp_n, cpy_len, ret_len, sid12_enc_len, result_len=0             # <<<<<<<<<<<<<<
 *     cdef SID12_t tmp_sid
 *     cdef char *oid_part_char
 */
  __pyx_v_result_len = 0;

  /* "fastsnmp/snmp_parser.pyx":194
 *     cdef char *oid_part_char
 * 
 *     if <size_t>stream[0] > 127:             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_t_1 = ((((size_t)(__pyx_v_stream[0])) > 0x7F) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":195
 * 
 *     if <size_t>stream[0] > 127:
 *         return -1             # <<<<<<<<<<<<<<
 * 
 *     tmp_sid = sid12s[<size_t>stream[0]]
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":194
 *     cdef char *oid_part_char
 * 
 *     if <size_t>stream[0] > 127:             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  }

  /* "fastsnmp/snmp_parser.pyx":197
 *         return -1
 * 
 *     tmp_sid = sid12s[<size_t>stream[0]]             # <<<<<<<<<<<<<<
 * 
 *     sid12_enc_len = tmp_sid.strlen
 */
  __pyx_v_tmp_sid = (__pyx_v_8fastsnmp_11snmp_parser_sid12s[((size_t)(__pyx_v_stream[0]))]);

  /* "fastsnmp/snmp_parser.pyx":199
 *     tmp_sid = sid12s[<size_t>stream[0]]
 * 
 *     sid12_enc_len = tmp_sid.strlen             # <<<<<<<<<<<<<<
 * 
 *     memcpy(out, tmp_sid.str, sid12_enc_len)
 */
  __pyx_t_2 = __pyx_v_tmp_sid.strlen;
  __pyx_v_sid12_enc_len = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":201
 *     sid12_enc_len = tmp_sid.strlen
 * 
 *     memcpy(out, tmp_sid.str, sid12_enc_len)             # <<<<<<<<<<<<<<
 *     out += sid12_enc_len
 *     out_length[0] = sid12_enc_len
 */
  (void)(memcpy(__pyx_v_out, __pyx_v_tmp_sid.str, __pyx_v_sid12_enc_len));

  /* "fastsnmp/snmp_parser.pyx":202
 * 
 *     memcpy(out, tmp_sid.str, sid12_enc_len)
 *     out += sid12_enc_len             # <<<<<<<<<<<<<<
 *     out_length[0] = sid12_enc_len
 * 
 */
  __pyx_v_out = (__pyx_v_out + __pyx_v_sid12_enc_len);

  /* "fastsnmp/snmp_parser.pyx":203
 *     memcpy(out, tmp_sid.str, sid12_enc_len)
 *     out += sid12_enc_len
 *     out_length[0] = sid12_enc_len             # <<<<<<<<<<<<<<
 * 
 *     primitive_decode((<char *>stream)+1, stream_len-1, result, &result_len)
 */
  (__pyx_v_out_length[0]) = __pyx_v_sid12_enc_len;

  /* "fastsnmp/snmp_parser.pyx":205
 *     out_length[0] = sid12_enc_len
 * 
 *     primitive_decode((<char *>stream)+1, stream_len-1, result, &result_len)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(result_len):
 */
  (void)(__pyx_f_8fastsnmp_11snmp_parser_primitive_decode((((char *)__pyx_v_stream) + 1), (__pyx_v_stream_len - 1), __pyx_v_result, (&__pyx_v_result_len)));

  /* "fastsnmp/snmp_parser.pyx":207
 *     primitive_decode((<char *>stream)+1, stream_len-1, result, &result_len)
 * 
 *     for i in range(result_len):             # <<<<<<<<<<<<<<
 *         oid_part = result[i]
 *         out[0] = b'.'
 */
  __pyx_t_2 = __pyx_v_result_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "fastsnmp/snmp_parser.pyx":208
 * 
 *     for i in range(result_len):
 *         oid_part = result[i]             # <<<<<<<<<<<<<<
 *         out[0] = b'.'
 *         n = 1
 */
    __pyx_v_oid_part = (__pyx_v_result[__pyx_v_i]);

    /* "fastsnmp/snmp_parser.pyx":209
 *     for i in range(result_len):
 *         oid_part = result[i]
 *         out[0] = b'.'             # <<<<<<<<<<<<<<
 *         n = 1
 *         if oid_part < 100:
 */
    (__pyx_v_out[0]) = '.';

    /* "fastsnmp/snmp_parser.pyx":210
 *         oid_part = result[i]
 *         out[0] = b'.'
 *         n = 1             # <<<<<<<<<<<<<<
 *         if oid_part < 100:
 *             oid_part_char = INT_TO_STRING[oid_part]
 */
    __pyx_v_n = 1;

    /* "fastsnmp/snmp_parser.pyx":211
 *         out[0] = b'.'
 *         n = 1
 *         if oid_part < 100:             # <<<<<<<<<<<<<<
 *             oid_part_char = INT_TO_STRING[oid_part]
 *             if oid_part < 10:
 */
    __pyx_t_1 = ((__pyx_v_oid_part < 0x64) != 0);
    if (__pyx_t_1) {

      /* "fastsnmp/snmp_parser.pyx":212
 *         n = 1
 *         if oid_part < 100:
 *             oid_part_char = INT_TO_STRING[oid_part]             # <<<<<<<<<<<<<<
 *             if oid_part < 10:
 *                 cpy_len = 1
 */
      __pyx_v_oid_part_char = (__pyx_v_8fastsnmp_11snmp_parser_INT_TO_STRING[__pyx_v_oid_part]);

      /* "fastsnmp/snmp_parser.pyx":213
 *         if oid_part < 100:
 *             oid_part_char = INT_TO_STRING[oid_part]
 *             if oid_part < 10:             # <<<<<<<<<<<<<<
 *                 cpy_len = 1
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_oid_part < 10) != 0);
      if (__pyx_t_1) {

        /* "fastsnmp/snmp_parser.pyx":214
 *             oid_part_char = INT_TO_STRING[oid_part]
 *             if oid_part < 10:
 *                 cpy_len = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 cpy_len = 2
 */
        __pyx_v_cpy_len = 1;

        /* "fastsnmp/snmp_parser.pyx":213
 *         if oid_part < 100:
 *             oid_part_char = INT_TO_STRING[oid_part]
 *             if oid_part < 10:             # <<<<<<<<<<<<<<
 *                 cpy_len = 1
 *             else:
 */
        goto __pyx_L7;
      }

      /* "fastsnmp/snmp_parser.pyx":216
 *                 cpy_len = 1
 *             else:
 *                 cpy_len = 2             # <<<<<<<<<<<<<<
 *             n += cpy_len
 *             memcpy(out+1, oid_part_char, cpy_len)
 */
      /*else*/ {
        __pyx_v_cpy_len = 2;
      }
      __pyx_L7:;

      /* "fastsnmp/snmp_parser.pyx":217
 *             else:
 *                 cpy_len = 2
 *             n += cpy_len             # <<<<<<<<<<<<<<
 *             memcpy(out+1, oid_part_char, cpy_len)
 *         else:
 */
      __pyx_v_n = (__pyx_v_n + __pyx_v_cpy_len);

      /* "fastsnmp/snmp_parser.pyx":218
 *                 cpy_len = 2
 *             n += cpy_len
 *             memcpy(out+1, oid_part_char, cpy_len)             # <<<<<<<<<<<<<<
 *         else:
 *             tmp_n = sprintf(out+1, "%llu", oid_part)
 */
      (void)(memcpy((__pyx_v_out + 1), __pyx_v_oid_part_char, __pyx_v_cpy_len));

      /* "fastsnmp/snmp_parser.pyx":211
 *         out[0] = b'.'
 *         n = 1
 *         if oid_part < 100:             # <<<<<<<<<<<<<<
 *             oid_part_char = INT_TO_STRING[oid_part]
 *             if oid_part < 10:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":220
 *             memcpy(out+1, oid_part_char, cpy_len)
 *         else:
 *             tmp_n = sprintf(out+1, "%llu", oid_part)             # <<<<<<<<<<<<<<
 *             n += tmp_n
 *         out += n
 */
    /*else*/ {
      __pyx_v_tmp_n = sprintf((__pyx_v_out + 1), ((char const *)"%llu"), __pyx_v_oid_part);

      /* "fastsnmp/snmp_parser.pyx":221
 *         else:
 *             tmp_n = sprintf(out+1, "%llu", oid_part)
 *             n += tmp_n             # <<<<<<<<<<<<<<
 *         out += n
 *         out_length[0] += n
 */
      __pyx_v_n = (__pyx_v_n + __pyx_v_tmp_n);
    }
    __pyx_L6:;

    /* "fastsnmp/snmp_parser.pyx":222
 *             tmp_n = sprintf(out+1, "%llu", oid_part)
 *             n += tmp_n
 *         out += n             # <<<<<<<<<<<<<<
 *         out_length[0] += n
 *     return 0
 */
    __pyx_v_out = (__pyx_v_out + __pyx_v_n);

    /* "fastsnmp/snmp_parser.pyx":223
 *             n += tmp_n
 *         out += n
 *         out_length[0] += n             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
    __pyx_t_5 = 0;
    (__pyx_v_out_length[__pyx_t_5]) = ((__pyx_v_out_length[__pyx_t_5]) + __pyx_v_n);
  }

  /* "fastsnmp/snmp_parser.pyx":224
 *         out += n
 *         out_length[0] += n
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":187
 * 
 * 
 * cdef int objectid_decode_str(const unsigned char *stream, size_t stream_len, char *out, size_t *out_length) except -1:             # <<<<<<<<<<<<<<
 *     cdef uint64_t result[122]
 *     cdef uint64_t oid_part
 */

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

/* "fastsnmp/snmp_parser.pyx":227
 * 
 * 
 * def objectid_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_1objectid_decode(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_8fastsnmp_11snmp_parser_1objectid_decode = {"objectid_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_1objectid_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_1objectid_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("objectid_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "objectid_decode") < 0)) __PYX_ERR(0, 227, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("objectid_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 227, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.objectid_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_objectid_decode(__pyx_self, __pyx_v_stream);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_objectid_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  unsigned char const *__pyx_v_stream_char;
  size_t __pyx_v_stream_len;
  char __pyx_v_ret_str[0x1F4];
  size_t __pyx_v_ret_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned char const *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("objectid_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":228
 * 
 * def objectid_decode(stream):
 *     cdef const unsigned char *stream_char = stream             # <<<<<<<<<<<<<<
 *     cdef size_t stream_len = len(stream)
 *     cdef char ret_str[MAX_OID_LEN_STR]
 */
  __pyx_t_1 = __Pyx_PyObject_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 228, __pyx_L1_error)
  __pyx_v_stream_char = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":229
 * def objectid_decode(stream):
 *     cdef const unsigned char *stream_char = stream
 *     cdef size_t stream_len = len(stream)             # <<<<<<<<<<<<<<
 *     cdef char ret_str[MAX_OID_LEN_STR]
 *     cdef size_t ret_length
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 229, __pyx_L1_error)
  __pyx_v_stream_len = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":232
 *     cdef char ret_str[MAX_OID_LEN_STR]
 *     cdef size_t ret_length
 *     objectid_decode_str(stream_char, stream_len, ret_str, &ret_length)             # <<<<<<<<<<<<<<
 *     return <str>ret_str[:ret_length]
 * 
 */
  __pyx_t_3 = __pyx_f_8fastsnmp_11snmp_parser_objectid_decode_str(__pyx_v_stream_char, __pyx_v_stream_len, __pyx_v_ret_str, (&__pyx_v_ret_length)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 232, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":233
 *     cdef size_t ret_length
 *     objectid_decode_str(stream_char, stream_len, ret_str, &ret_length)
 *     return <str>ret_str[:ret_length]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyUnicode_FromStringAndSize(((const char*)__pyx_v_ret_str) + 0, __pyx_v_ret_length - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject*)__pyx_t_4));
  __pyx_r = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":227
 * 
 * 
 * def objectid_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.objectid_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":236
 * 
 * 
 * cdef inline tuple objectid_decode_tuple(char *stream, size_t stream_len):             # <<<<<<<<<<<<<<
 *     cdef size_t result_len=0
 *     cdef uint64_t result[120]
 */

static CYTHON_INLINE PyObject *__pyx_f_8fastsnmp_11snmp_parser_objectid_decode_tuple(char *__pyx_v_stream, size_t __pyx_v_stream_len) {
  size_t __pyx_v_result_len;
  uint64_t __pyx_v_result[0x78];
  PyObject *__pyx_v_ret = NULL;
  size_t __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("objectid_decode_tuple", 0);

  /* "fastsnmp/snmp_parser.pyx":237
 * 
 * cdef inline tuple objectid_decode_tuple(char *stream, size_t stream_len):
 *     cdef size_t result_len=0             # <<<<<<<<<<<<<<
 *     cdef uint64_t result[120]
 * 
 */
  __pyx_v_result_len = 0;

  /* "fastsnmp/snmp_parser.pyx":240
 *     cdef uint64_t result[120]
 * 
 *     objectid_decode_c(stream, stream_len, result, &result_len)             # <<<<<<<<<<<<<<
 *     ret = PyTuple_New(result_len)
 * 
 */
  (void)(__pyx_f_8fastsnmp_11snmp_parser_objectid_decode_c(__pyx_v_stream, __pyx_v_stream_len, __pyx_v_result, (&__pyx_v_result_len)));

  /* "fastsnmp/snmp_parser.pyx":241
 * 
 *     objectid_decode_c(stream, stream_len, result, &result_len)
 *     ret = PyTuple_New(result_len)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(result_len):
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_result_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":243
 *     ret = PyTuple_New(result_len)
 * 
 *     for i in range(result_len):             # <<<<<<<<<<<<<<
 *         val = PyInt_FromLong(result[i])
 *         Py_INCREF(val)
 */
  __pyx_t_2 = __pyx_v_result_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "fastsnmp/snmp_parser.pyx":244
 * 
 *     for i in range(result_len):
 *         val = PyInt_FromLong(result[i])             # <<<<<<<<<<<<<<
 *         Py_INCREF(val)
 *         PyTuple_SET_ITEM(ret, i, val)
 */
    __pyx_t_1 = PyInt_FromLong((__pyx_v_result[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "fastsnmp/snmp_parser.pyx":245
 *     for i in range(result_len):
 *         val = PyInt_FromLong(result[i])
 *         Py_INCREF(val)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(ret, i, val)
 *     return ret
 */
    Py_INCREF(__pyx_v_val);

    /* "fastsnmp/snmp_parser.pyx":246
 *         val = PyInt_FromLong(result[i])
 *         Py_INCREF(val)
 *         PyTuple_SET_ITEM(ret, i, val)             # <<<<<<<<<<<<<<
 *     return ret
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_ret, __pyx_v_i, __pyx_v_val);
  }

  /* "fastsnmp/snmp_parser.pyx":247
 *         Py_INCREF(val)
 *         PyTuple_SET_ITEM(ret, i, val)
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * cdef inline int objectid_decode_c(char *stream, size_t stream_len, uint64_t *result, size_t *result_len):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":236
 * 
 * 
 * cdef inline tuple objectid_decode_tuple(char *stream, size_t stream_len):             # <<<<<<<<<<<<<<
 *     cdef size_t result_len=0
 *     cdef uint64_t result[120]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.objectid_decode_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":249
 *     return ret
 * 
 * cdef inline int objectid_decode_c(char *stream, size_t stream_len, uint64_t *result, size_t *result_len):             # <<<<<<<<<<<<<<
 *     cdef object value
 *     cdef SID12_ti *sid12_ptr
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_objectid_decode_c(char *__pyx_v_stream, size_t __pyx_v_stream_len, uint64_t *__pyx_v_result, size_t *__pyx_v_result_len) {
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti *__pyx_v_sid12_ptr;
  size_t __pyx_v_enc_len;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  uint64_t __pyx_t_1;
  int __pyx_t_2;
  long __pyx_t_3;
  __Pyx_RefNannySetupContext("objectid_decode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":252
 *     cdef object value
 *     cdef SID12_ti *sid12_ptr
 *     cdef size_t i, enc_len=0             # <<<<<<<<<<<<<<
 *     cdef tuple ret
 *     sid12_ptr = &sid12i[<size_t>stream[0]]
 */
  __pyx_v_enc_len = 0;

  /* "fastsnmp/snmp_parser.pyx":254
 *     cdef size_t i, enc_len=0
 *     cdef tuple ret
 *     sid12_ptr = &sid12i[<size_t>stream[0]]             # <<<<<<<<<<<<<<
 *     result[0] = sid12_ptr.SID1
 *     result[1] = sid12_ptr.SID2
 */
  __pyx_v_sid12_ptr = (&(__pyx_v_8fastsnmp_11snmp_parser_sid12i[((size_t)(__pyx_v_stream[0]))]));

  /* "fastsnmp/snmp_parser.pyx":255
 *     cdef tuple ret
 *     sid12_ptr = &sid12i[<size_t>stream[0]]
 *     result[0] = sid12_ptr.SID1             # <<<<<<<<<<<<<<
 *     result[1] = sid12_ptr.SID2
 *     result_len[0] = 2
 */
  __pyx_t_1 = __pyx_v_sid12_ptr->SID1;
  (__pyx_v_result[0]) = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":256
 *     sid12_ptr = &sid12i[<size_t>stream[0]]
 *     result[0] = sid12_ptr.SID1
 *     result[1] = sid12_ptr.SID2             # <<<<<<<<<<<<<<
 *     result_len[0] = 2
 * 
 */
  __pyx_t_1 = __pyx_v_sid12_ptr->SID2;
  (__pyx_v_result[1]) = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":257
 *     result[0] = sid12_ptr.SID1
 *     result[1] = sid12_ptr.SID2
 *     result_len[0] = 2             # <<<<<<<<<<<<<<
 * 
 *     if stream_len > 1:
 */
  (__pyx_v_result_len[0]) = 2;

  /* "fastsnmp/snmp_parser.pyx":259
 *     result_len[0] = 2
 * 
 *     if stream_len > 1:             # <<<<<<<<<<<<<<
 *         primitive_decode(stream+1, stream_len-1, result+2, &enc_len)
 *         result_len[0] += enc_len
 */
  __pyx_t_2 = ((__pyx_v_stream_len > 1) != 0);
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":260
 * 
 *     if stream_len > 1:
 *         primitive_decode(stream+1, stream_len-1, result+2, &enc_len)             # <<<<<<<<<<<<<<
 *         result_len[0] += enc_len
 * 
 */
    (void)(__pyx_f_8fastsnmp_11snmp_parser_primitive_decode((__pyx_v_stream + 1), (__pyx_v_stream_len - 1), (__pyx_v_result + 2), (&__pyx_v_enc_len)));

    /* "fastsnmp/snmp_parser.pyx":261
 *     if stream_len > 1:
 *         primitive_decode(stream+1, stream_len-1, result+2, &enc_len)
 *         result_len[0] += enc_len             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    __pyx_t_3 = 0;
    (__pyx_v_result_len[__pyx_t_3]) = ((__pyx_v_result_len[__pyx_t_3]) + __pyx_v_enc_len);

    /* "fastsnmp/snmp_parser.pyx":259
 *     result_len[0] = 2
 * 
 *     if stream_len > 1:             # <<<<<<<<<<<<<<
 *         primitive_decode(stream+1, stream_len-1, result+2, &enc_len)
 *         result_len[0] += enc_len
 */
  }

  /* "fastsnmp/snmp_parser.pyx":263
 *         result_len[0] += enc_len
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":249
 *     return ret
 * 
 * cdef inline int objectid_decode_c(char *stream, size_t stream_len, uint64_t *result, size_t *result_len):             # <<<<<<<<<<<<<<
 *     cdef object value
 *     cdef SID12_ti *sid12_ptr
 */

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

/* "fastsnmp/snmp_parser.pyx":266
 * 
 * @cython.cdivision(True)
 * cdef inline int primitive_encode7(uint64_t *value, char *result_ptr) except -1:             # <<<<<<<<<<<<<<
 *     """
 *     Primitive encoding
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_primitive_encode7(uint64_t *__pyx_v_value, char *__pyx_v_result_ptr) {
  unsigned int __pyx_v_size;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("primitive_encode7", 0);

  /* "fastsnmp/snmp_parser.pyx":270
 *     Primitive encoding
 *     """
 *     cdef unsigned int size = 0             # <<<<<<<<<<<<<<
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit
 */
  __pyx_v_size = 0;

  /* "fastsnmp/snmp_parser.pyx":272
 *     cdef unsigned int size = 0
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0]
 *         size = 1
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x80)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":273
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit
 *         result_ptr[0] = value[0]             # <<<<<<<<<<<<<<
 *         size = 1
 *     elif value[0] < <uint64_t>0x4000:  # 14 bit
 */
    (__pyx_v_result_ptr[0]) = (__pyx_v_value[0]);

    /* "fastsnmp/snmp_parser.pyx":274
 *     if value[0] < <uint64_t>0x80:  # 7 bit
 *         result_ptr[0] = value[0]
 *         size = 1             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x4000:  # 14 bit
 *         result_ptr[0] = value[0] >> 7 | 0x80
 */
    __pyx_v_size = 1;

    /* "fastsnmp/snmp_parser.pyx":272
 *     cdef unsigned int size = 0
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0]
 *         size = 1
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":275
 *         result_ptr[0] = value[0]
 *         size = 1
 *     elif value[0] < <uint64_t>0x4000:  # 14 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 7 | 0x80
 *         result_ptr[1] = value[0] & 0x7f
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x4000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":276
 *         size = 1
 *     elif value[0] < <uint64_t>0x4000:  # 14 bit
 *         result_ptr[0] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] & 0x7f
 *         size = 2
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":277
 *     elif value[0] < <uint64_t>0x4000:  # 14 bit
 *         result_ptr[0] = value[0] >> 7 | 0x80
 *         result_ptr[1] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 2
 *     elif value[0] < <uint64_t>0x200000:  # 21 bit
 */
    (__pyx_v_result_ptr[1]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":278
 *         result_ptr[0] = value[0] >> 7 | 0x80
 *         result_ptr[1] = value[0] & 0x7f
 *         size = 2             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x200000:  # 21 bit
 *         result_ptr[0] = value[0] >> 14 & 0x7f | 0x80
 */
    __pyx_v_size = 2;

    /* "fastsnmp/snmp_parser.pyx":275
 *         result_ptr[0] = value[0]
 *         size = 1
 *     elif value[0] < <uint64_t>0x4000:  # 14 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 7 | 0x80
 *         result_ptr[1] = value[0] & 0x7f
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":279
 *         result_ptr[1] = value[0] & 0x7f
 *         size = 2
 *     elif value[0] < <uint64_t>0x200000:  # 21 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 7 | 0x80
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x200000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":280
 *         size = 2
 *     elif value[0] < <uint64_t>0x200000:  # 21 bit
 *         result_ptr[0] = value[0] >> 14 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 7 | 0x80
 *         result_ptr[2] = value[0] & 0x7f
 */
    (__pyx_v_result_ptr[0]) = ((((__pyx_v_value[0]) >> 14) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":281
 *     elif value[0] < <uint64_t>0x200000:  # 21 bit
 *         result_ptr[0] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] & 0x7f
 *         size = 3
 */
    (__pyx_v_result_ptr[1]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":282
 *         result_ptr[0] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 7 | 0x80
 *         result_ptr[2] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 3
 *     elif value[0] < <uint64_t>0x10000000:  # 28 bit
 */
    (__pyx_v_result_ptr[2]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":283
 *         result_ptr[1] = value[0] >> 7 | 0x80
 *         result_ptr[2] = value[0] & 0x7f
 *         size = 3             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x10000000:  # 28 bit
 *         result_ptr[0] = value[0] >> 21 & 0x7f | 0x80
 */
    __pyx_v_size = 3;

    /* "fastsnmp/snmp_parser.pyx":279
 *         result_ptr[1] = value[0] & 0x7f
 *         size = 2
 *     elif value[0] < <uint64_t>0x200000:  # 21 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 7 | 0x80
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":284
 *         result_ptr[2] = value[0] & 0x7f
 *         size = 3
 *     elif value[0] < <uint64_t>0x10000000:  # 28 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 14 & 0x7f | 0x80
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x10000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":285
 *         size = 3
 *     elif value[0] < <uint64_t>0x10000000:  # 28 bit
 *         result_ptr[0] = value[0] >> 21 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 7 | 0x80
 */
    (__pyx_v_result_ptr[0]) = ((((__pyx_v_value[0]) >> 21) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":286
 *     elif value[0] < <uint64_t>0x10000000:  # 28 bit
 *         result_ptr[0] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 14 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 7 | 0x80
 *         result_ptr[3] = value[0] & 0x7f
 */
    (__pyx_v_result_ptr[1]) = ((((__pyx_v_value[0]) >> 14) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":287
 *         result_ptr[0] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] & 0x7f
 *         size = 4
 */
    (__pyx_v_result_ptr[2]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":288
 *         result_ptr[1] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 7 | 0x80
 *         result_ptr[3] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 4
 *     elif value[0] < <uint64_t>0x800000000:  # 35 bit
 */
    (__pyx_v_result_ptr[3]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":289
 *         result_ptr[2] = value[0] >> 7 | 0x80
 *         result_ptr[3] = value[0] & 0x7f
 *         size = 4             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x800000000:  # 35 bit
 *         result_ptr[0] = value[0] >> 28 & 0x7f | 0x80
 */
    __pyx_v_size = 4;

    /* "fastsnmp/snmp_parser.pyx":284
 *         result_ptr[2] = value[0] & 0x7f
 *         size = 3
 *     elif value[0] < <uint64_t>0x10000000:  # 28 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 14 & 0x7f | 0x80
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":290
 *         result_ptr[3] = value[0] & 0x7f
 *         size = 4
 *     elif value[0] < <uint64_t>0x800000000:  # 35 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 21 & 0x7f | 0x80
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x800000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":291
 *         size = 4
 *     elif value[0] < <uint64_t>0x800000000:  # 35 bit
 *         result_ptr[0] = value[0] >> 28 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 14 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[0]) = ((((__pyx_v_value[0]) >> 28) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":292
 *     elif value[0] < <uint64_t>0x800000000:  # 35 bit
 *         result_ptr[0] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 21 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 7 | 0x80
 */
    (__pyx_v_result_ptr[1]) = ((((__pyx_v_value[0]) >> 21) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":293
 *         result_ptr[0] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 14 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 7 | 0x80
 *         result_ptr[4] = value[0] & 0x7f
 */
    (__pyx_v_result_ptr[2]) = ((((__pyx_v_value[0]) >> 14) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":294
 *         result_ptr[1] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] & 0x7f
 *         size = 5
 */
    (__pyx_v_result_ptr[3]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":295
 *         result_ptr[2] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 7 | 0x80
 *         result_ptr[4] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 5
 *     elif value[0] < <uint64_t>0x40000000000:  # 42 bit
 */
    (__pyx_v_result_ptr[4]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":296
 *         result_ptr[3] = value[0] >> 7 | 0x80
 *         result_ptr[4] = value[0] & 0x7f
 *         size = 5             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x40000000000:  # 42 bit
 *         result_ptr[0] = value[0] >> 35 & 0x7f | 0x80
 */
    __pyx_v_size = 5;

    /* "fastsnmp/snmp_parser.pyx":290
 *         result_ptr[3] = value[0] & 0x7f
 *         size = 4
 *     elif value[0] < <uint64_t>0x800000000:  # 35 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 21 & 0x7f | 0x80
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":297
 *         result_ptr[4] = value[0] & 0x7f
 *         size = 5
 *     elif value[0] < <uint64_t>0x40000000000:  # 42 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 28 & 0x7f | 0x80
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x40000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":298
 *         size = 5
 *     elif value[0] < <uint64_t>0x40000000000:  # 42 bit
 *         result_ptr[0] = value[0] >> 35 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 21 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[0]) = ((((__pyx_v_value[0]) >> 35) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":299
 *     elif value[0] < <uint64_t>0x40000000000:  # 42 bit
 *         result_ptr[0] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 28 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 14 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[1]) = ((((__pyx_v_value[0]) >> 28) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":300
 *         result_ptr[0] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 21 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 7 | 0x80
 */
    (__pyx_v_result_ptr[2]) = ((((__pyx_v_value[0]) >> 21) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":301
 *         result_ptr[1] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 14 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] >> 7 | 0x80
 *         result_ptr[5] = value[0] & 0x7f
 */
    (__pyx_v_result_ptr[3]) = ((((__pyx_v_value[0]) >> 14) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":302
 *         result_ptr[2] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[5] = value[0] & 0x7f
 *         size = 6
 */
    (__pyx_v_result_ptr[4]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":303
 *         result_ptr[3] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 7 | 0x80
 *         result_ptr[5] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 6
 *     elif value[0] < <uint64_t>0x2000000000000:  # 49 bit
 */
    (__pyx_v_result_ptr[5]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":304
 *         result_ptr[4] = value[0] >> 7 | 0x80
 *         result_ptr[5] = value[0] & 0x7f
 *         size = 6             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x2000000000000:  # 49 bit
 *         result_ptr[0] = value[0] >> 42 & 0x7f | 0x80
 */
    __pyx_v_size = 6;

    /* "fastsnmp/snmp_parser.pyx":297
 *         result_ptr[4] = value[0] & 0x7f
 *         size = 5
 *     elif value[0] < <uint64_t>0x40000000000:  # 42 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 28 & 0x7f | 0x80
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":305
 *         result_ptr[5] = value[0] & 0x7f
 *         size = 6
 *     elif value[0] < <uint64_t>0x2000000000000:  # 49 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 35 & 0x7f | 0x80
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x2000000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":306
 *         size = 6
 *     elif value[0] < <uint64_t>0x2000000000000:  # 49 bit
 *         result_ptr[0] = value[0] >> 42 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 28 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[0]) = ((((__pyx_v_value[0]) >> 42) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":307
 *     elif value[0] < <uint64_t>0x2000000000000:  # 49 bit
 *         result_ptr[0] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 35 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 21 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[1]) = ((((__pyx_v_value[0]) >> 35) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":308
 *         result_ptr[0] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 28 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 14 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[2]) = ((((__pyx_v_value[0]) >> 28) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":309
 *         result_ptr[1] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 21 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[5] = value[0] >> 7 | 0x80
 */
    (__pyx_v_result_ptr[3]) = ((((__pyx_v_value[0]) >> 21) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":310
 *         result_ptr[2] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 14 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[5] = value[0] >> 7 | 0x80
 *         result_ptr[6] = value[0] & 0x7f
 */
    (__pyx_v_result_ptr[4]) = ((((__pyx_v_value[0]) >> 14) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":311
 *         result_ptr[3] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[5] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[6] = value[0] & 0x7f
 *         size = 7
 */
    (__pyx_v_result_ptr[5]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":312
 *         result_ptr[4] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[5] = value[0] >> 7 | 0x80
 *         result_ptr[6] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 */
    (__pyx_v_result_ptr[6]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":313
 *         result_ptr[5] = value[0] >> 7 | 0x80
 *         result_ptr[6] = value[0] & 0x7f
 *         size = 7             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 *         result_ptr[0] = value[0] >> 56 & 0x7f | 0x80
 */
    __pyx_v_size = 7;

    /* "fastsnmp/snmp_parser.pyx":305
 *         result_ptr[5] = value[0] & 0x7f
 *         size = 6
 *     elif value[0] < <uint64_t>0x2000000000000:  # 49 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 35 & 0x7f | 0x80
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":314
 *         result_ptr[6] = value[0] & 0x7f
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 56 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 49 & 0x7f | 0x80
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x8000000000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":315
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 *         result_ptr[0] = value[0] >> 56 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 49 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 42 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[0]) = ((((__pyx_v_value[0]) >> 56) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":316
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 *         result_ptr[0] = value[0] >> 56 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 49 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 35 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[1]) = ((((__pyx_v_value[0]) >> 49) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":317
 *         result_ptr[0] = value[0] >> 56 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 49 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 42 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 28 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[2]) = ((((__pyx_v_value[0]) >> 42) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":318
 *         result_ptr[1] = value[0] >> 49 & 0x7f | 0x80
 *         result_ptr[2] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 35 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[5] = value[0] >> 21 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[3]) = ((((__pyx_v_value[0]) >> 35) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":319
 *         result_ptr[2] = value[0] >> 42 & 0x7f | 0x80
 *         result_ptr[3] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 28 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[5] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[6] = value[0] >> 14 & 0x7f | 0x80
 */
    (__pyx_v_result_ptr[4]) = ((((__pyx_v_value[0]) >> 28) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":320
 *         result_ptr[3] = value[0] >> 35 & 0x7f | 0x80
 *         result_ptr[4] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[5] = value[0] >> 21 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[6] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[7] = value[0] >> 7 | 0x80
 */
    (__pyx_v_result_ptr[5]) = ((((__pyx_v_value[0]) >> 21) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":321
 *         result_ptr[4] = value[0] >> 28 & 0x7f | 0x80
 *         result_ptr[5] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[6] = value[0] >> 14 & 0x7f | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[7] = value[0] >> 7 | 0x80
 *         result_ptr[8] = value[0] & 0x7f
 */
    (__pyx_v_result_ptr[6]) = ((((__pyx_v_value[0]) >> 14) & 0x7f) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":322
 *         result_ptr[5] = value[0] >> 21 & 0x7f | 0x80
 *         result_ptr[6] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[7] = value[0] >> 7 | 0x80             # <<<<<<<<<<<<<<
 *         result_ptr[8] = value[0] & 0x7f
 *         size = 8
 */
    (__pyx_v_result_ptr[7]) = (((__pyx_v_value[0]) >> 7) | 0x80);

    /* "fastsnmp/snmp_parser.pyx":323
 *         result_ptr[6] = value[0] >> 14 & 0x7f | 0x80
 *         result_ptr[7] = value[0] >> 7 | 0x80
 *         result_ptr[8] = value[0] & 0x7f             # <<<<<<<<<<<<<<
 *         size = 8
 *     else:  # 64 bit
 */
    (__pyx_v_result_ptr[8]) = ((__pyx_v_value[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":324
 *         result_ptr[7] = value[0] >> 7 | 0x80
 *         result_ptr[8] = value[0] & 0x7f
 *         size = 8             # <<<<<<<<<<<<<<
 *     else:  # 64 bit
 *         return -1
 */
    __pyx_v_size = 8;

    /* "fastsnmp/snmp_parser.pyx":314
 *         result_ptr[6] = value[0] & 0x7f
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 56 & 0x7f | 0x80
 *         result_ptr[1] = value[0] >> 49 & 0x7f | 0x80
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":326
 *         size = 8
 *     else:  # 64 bit
 *         return -1             # <<<<<<<<<<<<<<
 *     return size
 * 
 */
  /*else*/ {
    __pyx_r = -1;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "fastsnmp/snmp_parser.pyx":327
 *     else:  # 64 bit
 *         return -1
 *     return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":266
 * 
 * @cython.cdivision(True)
 * cdef inline int primitive_encode7(uint64_t *value, char *result_ptr) except -1:             # <<<<<<<<<<<<<<
 *     """
 *     Primitive encoding
 */

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

/* "fastsnmp/snmp_parser.pyx":331
 * 
 * @cython.cdivision(True)
 * cdef inline int primitive_encode(uint64_t *value, char *result_ptr) except -1:             # <<<<<<<<<<<<<<
 *     """
 *     Primitive encoding
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_primitive_encode(uint64_t *__pyx_v_value, char *__pyx_v_result_ptr) {
  unsigned int __pyx_v_size;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("primitive_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":335
 *     Primitive encoding
 *     """
 *     cdef unsigned int size = 0             # <<<<<<<<<<<<<<
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit
 */
  __pyx_v_size = 0;

  /* "fastsnmp/snmp_parser.pyx":337
 *     cdef unsigned int size = 0
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0]
 *         size = 1
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x80)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":338
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit
 *         result_ptr[0] = value[0]             # <<<<<<<<<<<<<<
 *         size = 1
 *     elif value[0] < <uint64_t>0x8000:  # 15 bit
 */
    (__pyx_v_result_ptr[0]) = (__pyx_v_value[0]);

    /* "fastsnmp/snmp_parser.pyx":339
 *     if value[0] < <uint64_t>0x80:  # 7 bit
 *         result_ptr[0] = value[0]
 *         size = 1             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x8000:  # 15 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 */
    __pyx_v_size = 1;

    /* "fastsnmp/snmp_parser.pyx":337
 *     cdef unsigned int size = 0
 * 
 *     if value[0] < <uint64_t>0x80:  # 7 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0]
 *         size = 1
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":340
 *         result_ptr[0] = value[0]
 *         size = 1
 *     elif value[0] < <uint64_t>0x8000:  # 15 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] & 0xFF
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x8000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":341
 *         size = 1
 *     elif value[0] < <uint64_t>0x8000:  # 15 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] & 0xFF
 *         size = 2
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 8) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":342
 *     elif value[0] < <uint64_t>0x8000:  # 15 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] & 0xFF             # <<<<<<<<<<<<<<
 *         size = 2
 *     elif value[0] < <uint64_t>0x800000:  # 23 bit
 */
    (__pyx_v_result_ptr[1]) = ((__pyx_v_value[0]) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":343
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] & 0xFF
 *         size = 2             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x800000:  # 23 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 */
    __pyx_v_size = 2;

    /* "fastsnmp/snmp_parser.pyx":340
 *         result_ptr[0] = value[0]
 *         size = 1
 *     elif value[0] < <uint64_t>0x8000:  # 15 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] & 0xFF
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":344
 *         result_ptr[1] = value[0] & 0xFF
 *         size = 2
 *     elif value[0] < <uint64_t>0x800000:  # 23 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x800000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":345
 *         size = 2
 *     elif value[0] < <uint64_t>0x800000:  # 23 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] & 0xFF
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 8) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":346
 *     elif value[0] < <uint64_t>0x800000:  # 23 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] & 0xFF
 *         size = 3
 */
    (__pyx_v_result_ptr[1]) = (((__pyx_v_value[0]) >> 16) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":347
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] & 0xFF             # <<<<<<<<<<<<<<
 *         size = 3
 *     elif value[0] < <uint64_t>0x80000000:  # 31 bit
 */
    (__pyx_v_result_ptr[2]) = ((__pyx_v_value[0]) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":348
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] & 0xFF
 *         size = 3             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x80000000:  # 31 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 */
    __pyx_v_size = 3;

    /* "fastsnmp/snmp_parser.pyx":344
 *         result_ptr[1] = value[0] & 0xFF
 *         size = 2
 *     elif value[0] < <uint64_t>0x800000:  # 23 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":349
 *         result_ptr[2] = value[0] & 0xFF
 *         size = 3
 *     elif value[0] < <uint64_t>0x80000000:  # 31 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x80000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":350
 *         size = 3
 *     elif value[0] < <uint64_t>0x80000000:  # 31 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 8) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":351
 *     elif value[0] < <uint64_t>0x80000000:  # 31 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] & 0xFF
 */
    (__pyx_v_result_ptr[1]) = (((__pyx_v_value[0]) >> 16) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":352
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] & 0xFF
 *         size = 4
 */
    (__pyx_v_result_ptr[2]) = (((__pyx_v_value[0]) >> 24) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":353
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] & 0xFF             # <<<<<<<<<<<<<<
 *         size = 4
 *     elif value[0] < <uint64_t>0x8000000000:  # 39 bit
 */
    (__pyx_v_result_ptr[3]) = ((__pyx_v_value[0]) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":354
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] & 0xFF
 *         size = 4             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x8000000000:  # 39 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 */
    __pyx_v_size = 4;

    /* "fastsnmp/snmp_parser.pyx":349
 *         result_ptr[2] = value[0] & 0xFF
 *         size = 3
 *     elif value[0] < <uint64_t>0x80000000:  # 31 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":355
 *         result_ptr[3] = value[0] & 0xFF
 *         size = 4
 *     elif value[0] < <uint64_t>0x8000000000:  # 39 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x8000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":356
 *         size = 4
 *     elif value[0] < <uint64_t>0x8000000000:  # 39 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 8) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":357
 *     elif value[0] < <uint64_t>0x8000000000:  # 39 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 */
    (__pyx_v_result_ptr[1]) = (((__pyx_v_value[0]) >> 16) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":358
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] & 0xFF
 */
    (__pyx_v_result_ptr[2]) = (((__pyx_v_value[0]) >> 24) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":359
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] & 0xFF
 *         size = 5
 */
    (__pyx_v_result_ptr[3]) = (((__pyx_v_value[0]) >> 32) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":360
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] & 0xFF             # <<<<<<<<<<<<<<
 *         size = 5
 *     elif value[0] < <uint64_t>0x800000000000:  # 47 bit
 */
    (__pyx_v_result_ptr[4]) = ((__pyx_v_value[0]) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":361
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] & 0xFF
 *         size = 5             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x800000000000:  # 47 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 */
    __pyx_v_size = 5;

    /* "fastsnmp/snmp_parser.pyx":355
 *         result_ptr[3] = value[0] & 0xFF
 *         size = 4
 *     elif value[0] < <uint64_t>0x8000000000:  # 39 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":362
 *         result_ptr[4] = value[0] & 0xFF
 *         size = 5
 *     elif value[0] < <uint64_t>0x800000000000:  # 47 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x800000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":363
 *         size = 5
 *     elif value[0] < <uint64_t>0x800000000000:  # 47 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 8) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":364
 *     elif value[0] < <uint64_t>0x800000000000:  # 47 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 */
    (__pyx_v_result_ptr[1]) = (((__pyx_v_value[0]) >> 16) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":365
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 */
    (__pyx_v_result_ptr[2]) = (((__pyx_v_value[0]) >> 24) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":366
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 *         result_ptr[5] = value[0] & 0xFF
 */
    (__pyx_v_result_ptr[3]) = (((__pyx_v_value[0]) >> 32) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":367
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] >> 40 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[5] = value[0] & 0xFF
 *         size = 6
 */
    (__pyx_v_result_ptr[4]) = (((__pyx_v_value[0]) >> 40) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":368
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 *         result_ptr[5] = value[0] & 0xFF             # <<<<<<<<<<<<<<
 *         size = 6
 *     elif value[0] < <uint64_t>0x80000000000000:  # 55 bit
 */
    (__pyx_v_result_ptr[5]) = ((__pyx_v_value[0]) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":369
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 *         result_ptr[5] = value[0] & 0xFF
 *         size = 6             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x80000000000000:  # 55 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 */
    __pyx_v_size = 6;

    /* "fastsnmp/snmp_parser.pyx":362
 *         result_ptr[4] = value[0] & 0xFF
 *         size = 5
 *     elif value[0] < <uint64_t>0x800000000000:  # 47 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":370
 *         result_ptr[5] = value[0] & 0xFF
 *         size = 6
 *     elif value[0] < <uint64_t>0x80000000000000:  # 55 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x80000000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":371
 *         size = 6
 *     elif value[0] < <uint64_t>0x80000000000000:  # 55 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 */
    (__pyx_v_result_ptr[0]) = (((__pyx_v_value[0]) >> 8) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":372
 *     elif value[0] < <uint64_t>0x80000000000000:  # 55 bit
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 */
    (__pyx_v_result_ptr[1]) = (((__pyx_v_value[0]) >> 16) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":373
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 */
    (__pyx_v_result_ptr[2]) = (((__pyx_v_value[0]) >> 24) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":374
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 *         result_ptr[5] = value[0] >> 48 & 0xFF
 */
    (__pyx_v_result_ptr[3]) = (((__pyx_v_value[0]) >> 32) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":375
 *         result_ptr[2] = value[0] >> 24 & 0xFF
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] >> 40 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[5] = value[0] >> 48 & 0xFF
 *         result_ptr[6] = value[0] & 0xFF
 */
    (__pyx_v_result_ptr[4]) = (((__pyx_v_value[0]) >> 40) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":376
 *         result_ptr[3] = value[0] >> 32 & 0xFF
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 *         result_ptr[5] = value[0] >> 48 & 0xFF             # <<<<<<<<<<<<<<
 *         result_ptr[6] = value[0] & 0xFF
 *         size = 7
 */
    (__pyx_v_result_ptr[5]) = (((__pyx_v_value[0]) >> 48) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":377
 *         result_ptr[4] = value[0] >> 40 & 0xFF
 *         result_ptr[5] = value[0] >> 48 & 0xFF
 *         result_ptr[6] = value[0] & 0xFF             # <<<<<<<<<<<<<<
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 */
    (__pyx_v_result_ptr[6]) = ((__pyx_v_value[0]) & 0xFF);

    /* "fastsnmp/snmp_parser.pyx":378
 *         result_ptr[5] = value[0] >> 48 & 0xFF
 *         result_ptr[6] = value[0] & 0xFF
 *         size = 7             # <<<<<<<<<<<<<<
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 *         memcpy(result_ptr, value, 8)
 */
    __pyx_v_size = 7;

    /* "fastsnmp/snmp_parser.pyx":370
 *         result_ptr[5] = value[0] & 0xFF
 *         size = 6
 *     elif value[0] < <uint64_t>0x80000000000000:  # 55 bit             # <<<<<<<<<<<<<<
 *         result_ptr[0] = value[0] >> 8 & 0xFF
 *         result_ptr[1] = value[0] >> 16 & 0xFF
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":379
 *         result_ptr[6] = value[0] & 0xFF
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit             # <<<<<<<<<<<<<<
 *         memcpy(result_ptr, value, 8)
 *         size = 9
 */
  __pyx_t_1 = (((__pyx_v_value[0]) < ((uint64_t)0x8000000000000000)) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":380
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 *         memcpy(result_ptr, value, 8)             # <<<<<<<<<<<<<<
 *         size = 9
 *         size = 8
 */
    (void)(memcpy(__pyx_v_result_ptr, __pyx_v_value, 8));

    /* "fastsnmp/snmp_parser.pyx":381
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit
 *         memcpy(result_ptr, value, 8)
 *         size = 9             # <<<<<<<<<<<<<<
 *         size = 8
 *     else:  # 64 bit
 */
    __pyx_v_size = 9;

    /* "fastsnmp/snmp_parser.pyx":382
 *         memcpy(result_ptr, value, 8)
 *         size = 9
 *         size = 8             # <<<<<<<<<<<<<<
 *     else:  # 64 bit
 *         result_ptr[0] = 0
 */
    __pyx_v_size = 8;

    /* "fastsnmp/snmp_parser.pyx":379
 *         result_ptr[6] = value[0] & 0xFF
 *         size = 7
 *     elif value[0] < <uint64_t>0x8000000000000000:  # 63 bit             # <<<<<<<<<<<<<<
 *         memcpy(result_ptr, value, 8)
 *         size = 9
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":384
 *         size = 8
 *     else:  # 64 bit
 *         result_ptr[0] = 0             # <<<<<<<<<<<<<<
 *         memcpy(result_ptr+1, value, 8)
 *         size = 9
 */
  /*else*/ {
    (__pyx_v_result_ptr[0]) = 0;

    /* "fastsnmp/snmp_parser.pyx":385
 *     else:  # 64 bit
 *         result_ptr[0] = 0
 *         memcpy(result_ptr+1, value, 8)             # <<<<<<<<<<<<<<
 *         size = 9
 *     return size
 */
    (void)(memcpy((__pyx_v_result_ptr + 1), __pyx_v_value, 8));

    /* "fastsnmp/snmp_parser.pyx":386
 *         result_ptr[0] = 0
 *         memcpy(result_ptr+1, value, 8)
 *         size = 9             # <<<<<<<<<<<<<<
 *     return size
 * 
 */
    __pyx_v_size = 9;
  }
  __pyx_L3:;

  /* "fastsnmp/snmp_parser.pyx":387
 *         memcpy(result_ptr+1, value, 8)
 *         size = 9
 *     return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":331
 * 
 * @cython.cdivision(True)
 * cdef inline int primitive_encode(uint64_t *value, char *result_ptr) except -1:             # <<<<<<<<<<<<<<
 *     """
 *     Primitive encoding
 */

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

/* "fastsnmp/snmp_parser.pyx":391
 * 
 * @cython.cdivision(True)
 * cdef inline int objectid_encode_array(uint64_t *subids, uint32_t subids_len,             # <<<<<<<<<<<<<<
 *                                       char *result, size_t *object_len):
 *     cdef uint32_t clen
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_objectid_encode_array(uint64_t *__pyx_v_subids, uint32_t __pyx_v_subids_len, char *__pyx_v_result, size_t *__pyx_v_object_len) {
  uint64_t __pyx_v_subid;
  size_t __pyx_v_i;
  int __pyx_v_retval;
  size_t __pyx_v_sid_len;
  char *__pyx_v_result_ptr;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  uint32_t __pyx_t_3;
  uint32_t __pyx_t_4;
  size_t __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("objectid_encode_array", 0);

  /* "fastsnmp/snmp_parser.pyx":396
 *     cdef uint64_t subid
 *     cdef size_t i
 *     cdef int retval = 0             # <<<<<<<<<<<<<<
 *     cdef size_t sid_len = 0
 *     cdef char *result_ptr
 */
  __pyx_v_retval = 0;

  /* "fastsnmp/snmp_parser.pyx":397
 *     cdef size_t i
 *     cdef int retval = 0
 *     cdef size_t sid_len = 0             # <<<<<<<<<<<<<<
 *     cdef char *result_ptr
 * 
 */
  __pyx_v_sid_len = 0;

  /* "fastsnmp/snmp_parser.pyx":400
 *     cdef char *result_ptr
 * 
 *     if subids[0] == 2 and subids[1] > 39:             # <<<<<<<<<<<<<<
 *         return -3  # long SID1 is not supported
 * 
 */
  __pyx_t_2 = (((__pyx_v_subids[0]) == 2) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_subids[1]) > 39) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":401
 * 
 *     if subids[0] == 2 and subids[1] > 39:
 *         return -3  # long SID1 is not supported             # <<<<<<<<<<<<<<
 * 
 *     if subids[0] > 2:
 */
    __pyx_r = -3;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":400
 *     cdef char *result_ptr
 * 
 *     if subids[0] == 2 and subids[1] > 39:             # <<<<<<<<<<<<<<
 *         return -3  # long SID1 is not supported
 * 
 */
  }

  /* "fastsnmp/snmp_parser.pyx":403
 *         return -3  # long SID1 is not supported
 * 
 *     if subids[0] > 2:             # <<<<<<<<<<<<<<
 *         return -1  # wrong SID1
 * 
 */
  __pyx_t_1 = (((__pyx_v_subids[0]) > 2) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":404
 * 
 *     if subids[0] > 2:
 *         return -1  # wrong SID1             # <<<<<<<<<<<<<<
 * 
 *     if subids[1] > 39:
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":403
 *         return -3  # long SID1 is not supported
 * 
 *     if subids[0] > 2:             # <<<<<<<<<<<<<<
 *         return -1  # wrong SID1
 * 
 */
  }

  /* "fastsnmp/snmp_parser.pyx":406
 *         return -1  # wrong SID1
 * 
 *     if subids[1] > 39:             # <<<<<<<<<<<<<<
 *         return -2  # wrong SID2
 * 
 */
  __pyx_t_1 = (((__pyx_v_subids[1]) > 39) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":407
 * 
 *     if subids[1] > 39:
 *         return -2  # wrong SID2             # <<<<<<<<<<<<<<
 * 
 *     result[0] = subids[0]*40 + subids[1]
 */
    __pyx_r = -2;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":406
 *         return -1  # wrong SID1
 * 
 *     if subids[1] > 39:             # <<<<<<<<<<<<<<
 *         return -2  # wrong SID2
 * 
 */
  }

  /* "fastsnmp/snmp_parser.pyx":409
 *         return -2  # wrong SID2
 * 
 *     result[0] = subids[0]*40 + subids[1]             # <<<<<<<<<<<<<<
 *     object_len[0] = 1
 *     result_ptr = result+1
 */
  (__pyx_v_result[0]) = (((__pyx_v_subids[0]) * 40) + (__pyx_v_subids[1]));

  /* "fastsnmp/snmp_parser.pyx":410
 * 
 *     result[0] = subids[0]*40 + subids[1]
 *     object_len[0] = 1             # <<<<<<<<<<<<<<
 *     result_ptr = result+1
 * 
 */
  (__pyx_v_object_len[0]) = 1;

  /* "fastsnmp/snmp_parser.pyx":411
 *     result[0] = subids[0]*40 + subids[1]
 *     object_len[0] = 1
 *     result_ptr = result+1             # <<<<<<<<<<<<<<
 * 
 *     for i in range(2, subids_len):
 */
  __pyx_v_result_ptr = (__pyx_v_result + 1);

  /* "fastsnmp/snmp_parser.pyx":413
 *     result_ptr = result+1
 * 
 *     for i in range(2, subids_len):             # <<<<<<<<<<<<<<
 *         subid = subids[i]
 *         sid_len = primitive_encode7(&subid, result_ptr)
 */
  __pyx_t_3 = __pyx_v_subids_len;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 2; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "fastsnmp/snmp_parser.pyx":414
 * 
 *     for i in range(2, subids_len):
 *         subid = subids[i]             # <<<<<<<<<<<<<<
 *         sid_len = primitive_encode7(&subid, result_ptr)
 *         object_len[0] += sid_len
 */
    __pyx_v_subid = (__pyx_v_subids[__pyx_v_i]);

    /* "fastsnmp/snmp_parser.pyx":415
 *     for i in range(2, subids_len):
 *         subid = subids[i]
 *         sid_len = primitive_encode7(&subid, result_ptr)             # <<<<<<<<<<<<<<
 *         object_len[0] += sid_len
 *         result_ptr = result_ptr+sid_len
 */
    __pyx_t_6 = __pyx_f_8fastsnmp_11snmp_parser_primitive_encode7((&__pyx_v_subid), __pyx_v_result_ptr); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L1_error)
    __pyx_v_sid_len = __pyx_t_6;

    /* "fastsnmp/snmp_parser.pyx":416
 *         subid = subids[i]
 *         sid_len = primitive_encode7(&subid, result_ptr)
 *         object_len[0] += sid_len             # <<<<<<<<<<<<<<
 *         result_ptr = result_ptr+sid_len
 *     return retval
 */
    __pyx_t_7 = 0;
    (__pyx_v_object_len[__pyx_t_7]) = ((__pyx_v_object_len[__pyx_t_7]) + __pyx_v_sid_len);

    /* "fastsnmp/snmp_parser.pyx":417
 *         sid_len = primitive_encode7(&subid, result_ptr)
 *         object_len[0] += sid_len
 *         result_ptr = result_ptr+sid_len             # <<<<<<<<<<<<<<
 *     return retval
 * 
 */
    __pyx_v_result_ptr = (__pyx_v_result_ptr + __pyx_v_sid_len);
  }

  /* "fastsnmp/snmp_parser.pyx":418
 *         object_len[0] += sid_len
 *         result_ptr = result_ptr+sid_len
 *     return retval             # <<<<<<<<<<<<<<
 * 
 * def objectid_encode(oid):
 */
  __pyx_r = __pyx_v_retval;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":391
 * 
 * @cython.cdivision(True)
 * cdef inline int objectid_encode_array(uint64_t *subids, uint32_t subids_len,             # <<<<<<<<<<<<<<
 *                                       char *result, size_t *object_len):
 *     cdef uint32_t clen
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("fastsnmp.snmp_parser.objectid_encode_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":420
 *     return retval
 * 
 * def objectid_encode(oid):             # <<<<<<<<<<<<<<
 *     """
 *     encode an ObjectID into stream
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_3objectid_encode(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_8fastsnmp_11snmp_parser_2objectid_encode, "\n    encode an ObjectID into stream\n    X.690, chapter 8.19\n    :param oid: OID\n    :type oid: str\n    :returns: stream\n    :rtype: bytearray\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_3objectid_encode = {"objectid_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_3objectid_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_2objectid_encode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_3objectid_encode(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_oid = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("objectid_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 420, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "objectid_encode") < 0)) __PYX_ERR(0, 420, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_oid = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("objectid_encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 420, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.objectid_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_2objectid_encode(__pyx_self, __pyx_v_oid);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_2objectid_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_oid) {
  uint64_t __pyx_v_idlist[0x80];
  size_t __pyx_v_pos;
  size_t __pyx_v_object_len;
  char __pyx_v_result[0x100];
  PyObject *__pyx_v_subid = 0;
  int __pyx_v_ret;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  uint64_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("objectid_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":432
 *     cdef uint64_t idlist[128]
 *     cdef list subidlist
 *     cdef size_t pos = 0             # <<<<<<<<<<<<<<
 *     cdef size_t object_len = 0
 *     cdef char result[256]
 */
  __pyx_v_pos = 0;

  /* "fastsnmp/snmp_parser.pyx":433
 *     cdef list subidlist
 *     cdef size_t pos = 0
 *     cdef size_t object_len = 0             # <<<<<<<<<<<<<<
 *     cdef char result[256]
 *     cdef str subid
 */
  __pyx_v_object_len = 0;

  /* "fastsnmp/snmp_parser.pyx":436
 *     cdef char result[256]
 *     cdef str subid
 *     for subid in oid.strip('.').split('.'):             # <<<<<<<<<<<<<<
 *         idlist[pos] = int(subid)
 *         pos += 1
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_oid, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 436, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_subid, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "fastsnmp/snmp_parser.pyx":437
 *     cdef str subid
 *     for subid in oid.strip('.').split('.'):
 *         idlist[pos] = int(subid)             # <<<<<<<<<<<<<<
 *         pos += 1
 *     ret = objectid_encode_array(idlist, pos, result, &object_len)
 */
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_subid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_8 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_idlist[__pyx_v_pos]) = __pyx_t_8;

    /* "fastsnmp/snmp_parser.pyx":438
 *     for subid in oid.strip('.').split('.'):
 *         idlist[pos] = int(subid)
 *         pos += 1             # <<<<<<<<<<<<<<
 *     ret = objectid_encode_array(idlist, pos, result, &object_len)
 * 
 */
    __pyx_v_pos = (__pyx_v_pos + 1);

    /* "fastsnmp/snmp_parser.pyx":436
 *     cdef char result[256]
 *     cdef str subid
 *     for subid in oid.strip('.').split('.'):             # <<<<<<<<<<<<<<
 *         idlist[pos] = int(subid)
 *         pos += 1
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "fastsnmp/snmp_parser.pyx":439
 *         idlist[pos] = int(subid)
 *         pos += 1
 *     ret = objectid_encode_array(idlist, pos, result, &object_len)             # <<<<<<<<<<<<<<
 * 
 *     if ret != 0:
 */
  __pyx_v_ret = __pyx_f_8fastsnmp_11snmp_parser_objectid_encode_array(__pyx_v_idlist, __pyx_v_pos, __pyx_v_result, (&__pyx_v_object_len));

  /* "fastsnmp/snmp_parser.pyx":441
 *     ret = objectid_encode_array(idlist, pos, result, &object_len)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         if ret == -1:
 *             raise Exception("wrong SID1")
 */
  __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_9) {

    /* "fastsnmp/snmp_parser.pyx":442
 * 
 *     if ret != 0:
 *         if ret == -1:             # <<<<<<<<<<<<<<
 *             raise Exception("wrong SID1")
 *         elif ret == -2:
 */
    switch (__pyx_v_ret) {
      case -1L:

      /* "fastsnmp/snmp_parser.pyx":443
 *     if ret != 0:
 *         if ret == -1:
 *             raise Exception("wrong SID1")             # <<<<<<<<<<<<<<
 *         elif ret == -2:
 *             raise Exception("wrong SID2")
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __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, 443, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":442
 * 
 *     if ret != 0:
 *         if ret == -1:             # <<<<<<<<<<<<<<
 *             raise Exception("wrong SID1")
 *         elif ret == -2:
 */
      break;
      case -2L:

      /* "fastsnmp/snmp_parser.pyx":445
 *             raise Exception("wrong SID1")
 *         elif ret == -2:
 *             raise Exception("wrong SID2")             # <<<<<<<<<<<<<<
 *         elif ret == -3:
 *             raise Exception("long SID1 is not supported")
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __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, 445, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":444
 *         if ret == -1:
 *             raise Exception("wrong SID1")
 *         elif ret == -2:             # <<<<<<<<<<<<<<
 *             raise Exception("wrong SID2")
 *         elif ret == -3:
 */
      break;
      case -3L:

      /* "fastsnmp/snmp_parser.pyx":447
 *             raise Exception("wrong SID2")
 *         elif ret == -3:
 *             raise Exception("long SID1 is not supported")             # <<<<<<<<<<<<<<
 * 
 *     return <bytes>result[:object_len]
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __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, 447, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":446
 *         elif ret == -2:
 *             raise Exception("wrong SID2")
 *         elif ret == -3:             # <<<<<<<<<<<<<<
 *             raise Exception("long SID1 is not supported")
 * 
 */
      break;
      default: break;
    }

    /* "fastsnmp/snmp_parser.pyx":441
 *     ret = objectid_encode_array(idlist, pos, result, &object_len)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         if ret == -1:
 *             raise Exception("wrong SID1")
 */
  }

  /* "fastsnmp/snmp_parser.pyx":449
 *             raise Exception("long SID1 is not supported")
 * 
 *     return <bytes>result[:object_len]             # <<<<<<<<<<<<<<
 * 
 * cdef inline bytes c_octetstring_decode(const unsigned char *data, size_t data_len):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_result) + 0, __pyx_v_object_len - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject*)__pyx_t_3));
  __pyx_r = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":420
 *     return retval
 * 
 * def objectid_encode(oid):             # <<<<<<<<<<<<<<
 *     """
 *     encode an ObjectID into stream
 */

  /* 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("fastsnmp.snmp_parser.objectid_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_subid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":451
 *     return <bytes>result[:object_len]
 * 
 * cdef inline bytes c_octetstring_decode(const unsigned char *data, size_t data_len):             # <<<<<<<<<<<<<<
 *     return <bytes> data[:data_len]
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_8fastsnmp_11snmp_parser_c_octetstring_decode(unsigned char const *__pyx_v_data, size_t __pyx_v_data_len) {
  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("c_octetstring_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":452
 * 
 * cdef inline bytes c_octetstring_decode(const unsigned char *data, size_t data_len):
 *     return <bytes> data[:data_len]             # <<<<<<<<<<<<<<
 * 
 * def octetstring_decode(bytes stream not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_data) + 0, __pyx_v_data_len - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject*)__pyx_t_1));
  __pyx_r = ((PyObject*)__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":451
 *     return <bytes>result[:object_len]
 * 
 * cdef inline bytes c_octetstring_decode(const unsigned char *data, size_t data_len):             # <<<<<<<<<<<<<<
 *     return <bytes> data[:data_len]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.c_octetstring_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":454
 *     return <bytes> data[:data_len]
 * 
 * def octetstring_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     return c_octetstring_decode(stream, len(stream))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_5octetstring_decode(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_8fastsnmp_11snmp_parser_5octetstring_decode = {"octetstring_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_5octetstring_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_5octetstring_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("octetstring_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "octetstring_decode") < 0)) __PYX_ERR(0, 454, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("octetstring_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 454, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.octetstring_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), (&PyBytes_Type), 0, "stream", 1))) __PYX_ERR(0, 454, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_4octetstring_decode(__pyx_self, __pyx_v_stream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_4octetstring_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned char const *__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("octetstring_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":455
 * 
 * def octetstring_decode(bytes stream not None):
 *     return c_octetstring_decode(stream, len(stream))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error)
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 455, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_8fastsnmp_11snmp_parser_c_octetstring_decode(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":454
 *     return <bytes> data[:data_len]
 * 
 * def octetstring_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     return c_octetstring_decode(stream, len(stream))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.octetstring_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":458
 * 
 * 
 * def octetstring_encode(string):             # <<<<<<<<<<<<<<
 *     """
 *     encode an octetstring into string
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_7octetstring_encode(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_8fastsnmp_11snmp_parser_6octetstring_encode, "\n    encode an octetstring into string\n\n    :param string: string\n    :type string: string\n    :returns: string\n    :rtype: bytes\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_7octetstring_encode = {"octetstring_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_7octetstring_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_6octetstring_encode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_7octetstring_encode(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_string = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("octetstring_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_string)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 458, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "octetstring_encode") < 0)) __PYX_ERR(0, 458, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_string = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("octetstring_encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 458, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.octetstring_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_6octetstring_encode(__pyx_self, __pyx_v_string);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_6octetstring_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("octetstring_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":467
 *     :rtype: bytes
 *     """
 *     return bytes(string.encode('ascii'))             # <<<<<<<<<<<<<<
 * 
 * def integer_encode(const int64_t value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_ascii};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":458
 * 
 * 
 * def octetstring_encode(string):             # <<<<<<<<<<<<<<
 *     """
 *     encode an octetstring into string
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.octetstring_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":469
 *     return bytes(string.encode('ascii'))
 * 
 * def integer_encode(const int64_t value):             # <<<<<<<<<<<<<<
 *     cdef char[MAX_INT_LEN] data
 *     cdef uint64_t data_len = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_9integer_encode(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_8fastsnmp_11snmp_parser_9integer_encode = {"integer_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_9integer_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_9integer_encode(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
) {
  int64_t __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integer_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "integer_encode") < 0)) __PYX_ERR(0, 469, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_value = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("integer_encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 469, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.integer_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_8integer_encode(__pyx_self, __pyx_v_value);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_8integer_encode(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_value) {
  char __pyx_v_data[30];
  uint64_t __pyx_v_data_len;
  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("integer_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":471
 * def integer_encode(const int64_t value):
 *     cdef char[MAX_INT_LEN] data
 *     cdef uint64_t data_len = 0             # <<<<<<<<<<<<<<
 *     integer_encode_c(value, data, &data_len)
 *     return <bytes> data[:data_len]
 */
  __pyx_v_data_len = 0;

  /* "fastsnmp/snmp_parser.pyx":472
 *     cdef char[MAX_INT_LEN] data
 *     cdef uint64_t data_len = 0
 *     integer_encode_c(value, data, &data_len)             # <<<<<<<<<<<<<<
 *     return <bytes> data[:data_len]
 * 
 */
  __pyx_f_8fastsnmp_11snmp_parser_integer_encode_c(__pyx_v_value, __pyx_v_data, (&__pyx_v_data_len));

  /* "fastsnmp/snmp_parser.pyx":473
 *     cdef uint64_t data_len = 0
 *     integer_encode_c(value, data, &data_len)
 *     return <bytes> data[:data_len]             # <<<<<<<<<<<<<<
 * 
 * cdef inline void integer_encode_c(const int64_t value, char *data, uint64_t *data_len):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_data) + 0, __pyx_v_data_len - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject*)__pyx_t_1));
  __pyx_r = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":469
 *     return bytes(string.encode('ascii'))
 * 
 * def integer_encode(const int64_t value):             # <<<<<<<<<<<<<<
 *     cdef char[MAX_INT_LEN] data
 *     cdef uint64_t data_len = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.integer_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":475
 *     return <bytes> data[:data_len]
 * 
 * cdef inline void integer_encode_c(const int64_t value, char *data, uint64_t *data_len):             # <<<<<<<<<<<<<<
 *     # little -> big
 *     cdef uint64_t slen, i
 */

static CYTHON_INLINE void __pyx_f_8fastsnmp_11snmp_parser_integer_encode_c(int64_t const __pyx_v_value, char *__pyx_v_data, uint64_t *__pyx_v_data_len) {
  uint64_t __pyx_v_slen;
  uint64_t __pyx_v_i;
  uint64_t __pyx_v_mod_value;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  uint64_t __pyx_t_3;
  uint64_t __pyx_t_4;
  uint64_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integer_encode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":478
 *     # little -> big
 *     cdef uint64_t slen, i
 *     cdef uint64_t mod_value = value             # <<<<<<<<<<<<<<
 *     if value < 0:
 *         mod_value = ~value + 1
 */
  __pyx_v_mod_value = __pyx_v_value;

  /* "fastsnmp/snmp_parser.pyx":479
 *     cdef uint64_t slen, i
 *     cdef uint64_t mod_value = value
 *     if value < 0:             # <<<<<<<<<<<<<<
 *         mod_value = ~value + 1
 *     slen = primitive_encode(<uint64_t*> &mod_value, data)
 */
  __pyx_t_1 = ((__pyx_v_value < 0) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":480
 *     cdef uint64_t mod_value = value
 *     if value < 0:
 *         mod_value = ~value + 1             # <<<<<<<<<<<<<<
 *     slen = primitive_encode(<uint64_t*> &mod_value, data)
 *     # copy the bytes from value to data backwards
 */
    __pyx_v_mod_value = ((~__pyx_v_value) + 1);

    /* "fastsnmp/snmp_parser.pyx":479
 *     cdef uint64_t slen, i
 *     cdef uint64_t mod_value = value
 *     if value < 0:             # <<<<<<<<<<<<<<
 *         mod_value = ~value + 1
 *     slen = primitive_encode(<uint64_t*> &mod_value, data)
 */
  }

  /* "fastsnmp/snmp_parser.pyx":481
 *     if value < 0:
 *         mod_value = ~value + 1
 *     slen = primitive_encode(<uint64_t*> &mod_value, data)             # <<<<<<<<<<<<<<
 *     # copy the bytes from value to data backwards
 *     for i in range(0, slen):
 */
  __pyx_t_2 = __pyx_f_8fastsnmp_11snmp_parser_primitive_encode(((uint64_t *)(&__pyx_v_mod_value)), __pyx_v_data); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 481, __pyx_L1_error)
  __pyx_v_slen = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":483
 *     slen = primitive_encode(<uint64_t*> &mod_value, data)
 *     # copy the bytes from value to data backwards
 *     for i in range(0, slen):             # <<<<<<<<<<<<<<
 *         data[slen - i - 1] = (<char *> &value)[i]
 *     data_len[0] = slen
 */
  __pyx_t_3 = __pyx_v_slen;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "fastsnmp/snmp_parser.pyx":484
 *     # copy the bytes from value to data backwards
 *     for i in range(0, slen):
 *         data[slen - i - 1] = (<char *> &value)[i]             # <<<<<<<<<<<<<<
 *     data_len[0] = slen
 * 
 */
    (__pyx_v_data[((__pyx_v_slen - __pyx_v_i) - 1)]) = (((char *)(&__pyx_v_value))[__pyx_v_i]);
  }

  /* "fastsnmp/snmp_parser.pyx":485
 *     for i in range(0, slen):
 *         data[slen - i - 1] = (<char *> &value)[i]
 *     data_len[0] = slen             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (__pyx_v_data_len[0]) = __pyx_v_slen;

  /* "fastsnmp/snmp_parser.pyx":475
 *     return <bytes> data[:data_len]
 * 
 * cdef inline void integer_encode_c(const int64_t value, char *data, uint64_t *data_len):             # <<<<<<<<<<<<<<
 *     # little -> big
 *     cdef uint64_t slen, i
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("fastsnmp.snmp_parser.integer_encode_c", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "fastsnmp/snmp_parser.pyx":488
 * 
 * 
 * def uinteger_encode(uint64_t value):             # <<<<<<<<<<<<<<
 *     # little -> big
 *     cdef size_t slen, i
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_11uinteger_encode(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_8fastsnmp_11snmp_parser_11uinteger_encode = {"uinteger_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_11uinteger_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_11uinteger_encode(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
) {
  uint64_t __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("uinteger_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "uinteger_encode") < 0)) __PYX_ERR(0, 488, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_value = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_value == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("uinteger_encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 488, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.uinteger_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_10uinteger_encode(__pyx_self, __pyx_v_value);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_10uinteger_encode(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_value) {
  size_t __pyx_v_slen;
  size_t __pyx_v_i;
  char __pyx_v_res[30];
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("uinteger_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":492
 *     cdef size_t slen, i
 *     cdef char[MAX_INT_LEN] res
 *     slen = primitive_encode(&value, res)             # <<<<<<<<<<<<<<
 * 
 *     # copy the bytes from value to data backwards
 */
  __pyx_t_1 = __pyx_f_8fastsnmp_11snmp_parser_primitive_encode((&__pyx_v_value), __pyx_v_res); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
  __pyx_v_slen = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":495
 * 
 *     # copy the bytes from value to data backwards
 *     for i in range(0, slen):             # <<<<<<<<<<<<<<
 *         res[slen - i - 1] = (<char *> &value)[i]
 *     return <bytes> res[:slen]
 */
  __pyx_t_2 = __pyx_v_slen;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "fastsnmp/snmp_parser.pyx":496
 *     # copy the bytes from value to data backwards
 *     for i in range(0, slen):
 *         res[slen - i - 1] = (<char *> &value)[i]             # <<<<<<<<<<<<<<
 *     return <bytes> res[:slen]
 * 
 */
    (__pyx_v_res[((__pyx_v_slen - __pyx_v_i) - 1)]) = (((char *)(&__pyx_v_value))[__pyx_v_i]);
  }

  /* "fastsnmp/snmp_parser.pyx":497
 *     for i in range(0, slen):
 *         res[slen - i - 1] = (<char *> &value)[i]
 *     return <bytes> res[:slen]             # <<<<<<<<<<<<<<
 * 
 * def uinteger_decode(bytes stream not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_res) + 0, __pyx_v_slen - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject*)__pyx_t_5));
  __pyx_r = __pyx_t_5;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":488
 * 
 * 
 * def uinteger_encode(uint64_t value):             # <<<<<<<<<<<<<<
 *     # little -> big
 *     cdef size_t slen, i
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.uinteger_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":499
 *     return <bytes> res[:slen]
 * 
 * def uinteger_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_13uinteger_decode(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_8fastsnmp_11snmp_parser_12uinteger_decode, "\n    Decode input stream into a integer\n\n    :param stream: encoded integer\n    :type stream: bytes\n    :returns: decoded integer\n    :rtype: int\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_13uinteger_decode = {"uinteger_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_13uinteger_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_12uinteger_decode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_13uinteger_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("uinteger_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "uinteger_decode") < 0)) __PYX_ERR(0, 499, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("uinteger_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 499, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.uinteger_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), (&PyBytes_Type), 0, "stream", 1))) __PYX_ERR(0, 499, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_12uinteger_decode(__pyx_self, __pyx_v_stream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_12uinteger_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  CYTHON_UNUSED uint64_t __pyx_v_value;
  size_t __pyx_v_stream_len;
  unsigned char const *__pyx_v_stream_char;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  unsigned char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("uinteger_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":508
 *     :rtype: int
 *     """
 *     cdef uint64_t value = 0             # <<<<<<<<<<<<<<
 *     cdef size_t stream_len = len(stream)
 *     cdef const unsigned char *stream_char = stream
 */
  __pyx_v_value = 0;

  /* "fastsnmp/snmp_parser.pyx":509
 *     """
 *     cdef uint64_t value = 0
 *     cdef size_t stream_len = len(stream)             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_char = stream
 *     return uinteger_decode_c(stream_char, &stream_len)
 */
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_stream); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_v_stream_len = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":510
 *     cdef uint64_t value = 0
 *     cdef size_t stream_len = len(stream)
 *     cdef const unsigned char *stream_char = stream             # <<<<<<<<<<<<<<
 *     return uinteger_decode_c(stream_char, &stream_len)
 * 
 */
  __pyx_t_2 = __Pyx_PyBytes_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error)
  __pyx_v_stream_char = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":511
 *     cdef size_t stream_len = len(stream)
 *     cdef const unsigned char *stream_char = stream
 *     return uinteger_decode_c(stream_char, &stream_len)             # <<<<<<<<<<<<<<
 * 
 * def integer_decode(bytes stream not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_f_8fastsnmp_11snmp_parser_uinteger_decode_c(__pyx_v_stream_char, (&__pyx_v_stream_len))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":499
 *     return <bytes> res[:slen]
 * 
 * def uinteger_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.uinteger_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":513
 *     return uinteger_decode_c(stream_char, &stream_len)
 * 
 * def integer_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_15integer_decode(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_8fastsnmp_11snmp_parser_14integer_decode, "\n    Decode input stream into a integer\n\n    :param stream: encoded integer\n    :type stream: bytes\n    :returns: decoded integer\n    :rtype: int\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_15integer_decode = {"integer_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_15integer_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_14integer_decode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_15integer_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integer_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "integer_decode") < 0)) __PYX_ERR(0, 513, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("integer_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 513, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.integer_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), (&PyBytes_Type), 0, "stream", 1))) __PYX_ERR(0, 513, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_14integer_decode(__pyx_self, __pyx_v_stream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_14integer_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  CYTHON_UNUSED int64_t __pyx_v_value;
  size_t __pyx_v_stream_len;
  unsigned char const *__pyx_v_stream_char;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  unsigned char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integer_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":522
 *     :rtype: int
 *     """
 *     cdef int64_t value = 0             # <<<<<<<<<<<<<<
 *     cdef size_t stream_len = len(stream)
 *     cdef const unsigned char *stream_char = stream
 */
  __pyx_v_value = 0;

  /* "fastsnmp/snmp_parser.pyx":523
 *     """
 *     cdef int64_t value = 0
 *     cdef size_t stream_len = len(stream)             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_char = stream
 *     return integer_decode_c(stream_char, &stream_len)
 */
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_stream); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 523, __pyx_L1_error)
  __pyx_v_stream_len = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":524
 *     cdef int64_t value = 0
 *     cdef size_t stream_len = len(stream)
 *     cdef const unsigned char *stream_char = stream             # <<<<<<<<<<<<<<
 *     return integer_decode_c(stream_char, &stream_len)
 * 
 */
  __pyx_t_2 = __Pyx_PyBytes_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 524, __pyx_L1_error)
  __pyx_v_stream_char = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":525
 *     cdef size_t stream_len = len(stream)
 *     cdef const unsigned char *stream_char = stream
 *     return integer_decode_c(stream_char, &stream_len)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t integer_decode_c(const unsigned char *stream, size_t *stream_len):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_f_8fastsnmp_11snmp_parser_integer_decode_c(__pyx_v_stream_char, (&__pyx_v_stream_len))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":513
 *     return uinteger_decode_c(stream_char, &stream_len)
 * 
 * def integer_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.integer_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":527
 *     return integer_decode_c(stream_char, &stream_len)
 * 
 * cdef inline int64_t integer_decode_c(const unsigned char *stream, size_t *stream_len):             # <<<<<<<<<<<<<<
 *     cdef int64_t value = 0
 *     cdef size_t i
 */

static CYTHON_INLINE int64_t __pyx_f_8fastsnmp_11snmp_parser_integer_decode_c(unsigned char const *__pyx_v_stream, size_t *__pyx_v_stream_len) {
  int64_t __pyx_v_value;
  size_t __pyx_v_i;
  int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  __Pyx_RefNannySetupContext("integer_decode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":528
 * 
 * cdef inline int64_t integer_decode_c(const unsigned char *stream, size_t *stream_len):
 *     cdef int64_t value = 0             # <<<<<<<<<<<<<<
 *     cdef size_t i
 * 
 */
  __pyx_v_value = 0;

  /* "fastsnmp/snmp_parser.pyx":531
 *     cdef size_t i
 * 
 *     if stream[0] & 0x80:  # copy sign bit into all bytes first             # <<<<<<<<<<<<<<
 *         value = INT64_MAX
 *     for i in range(stream_len[0]):
 */
  __pyx_t_1 = (((__pyx_v_stream[0]) & 0x80) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":532
 * 
 *     if stream[0] & 0x80:  # copy sign bit into all bytes first
 *         value = INT64_MAX             # <<<<<<<<<<<<<<
 *     for i in range(stream_len[0]):
 *         value <<= 8
 */
    __pyx_v_value = INT64_MAX;

    /* "fastsnmp/snmp_parser.pyx":531
 *     cdef size_t i
 * 
 *     if stream[0] & 0x80:  # copy sign bit into all bytes first             # <<<<<<<<<<<<<<
 *         value = INT64_MAX
 *     for i in range(stream_len[0]):
 */
  }

  /* "fastsnmp/snmp_parser.pyx":533
 *     if stream[0] & 0x80:  # copy sign bit into all bytes first
 *         value = INT64_MAX
 *     for i in range(stream_len[0]):             # <<<<<<<<<<<<<<
 *         value <<= 8
 *         value |= stream[i]
 */
  __pyx_t_2 = (__pyx_v_stream_len[0]);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "fastsnmp/snmp_parser.pyx":534
 *         value = INT64_MAX
 *     for i in range(stream_len[0]):
 *         value <<= 8             # <<<<<<<<<<<<<<
 *         value |= stream[i]
 *     return value
 */
    __pyx_v_value = (__pyx_v_value << 8);

    /* "fastsnmp/snmp_parser.pyx":535
 *     for i in range(stream_len[0]):
 *         value <<= 8
 *         value |= stream[i]             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
    __pyx_v_value = (__pyx_v_value | (__pyx_v_stream[__pyx_v_i]));
  }

  /* "fastsnmp/snmp_parser.pyx":536
 *         value <<= 8
 *         value |= stream[i]
 *     return value             # <<<<<<<<<<<<<<
 * 
 * cdef inline uint64_t uinteger_decode_c(const unsigned char *stream, size_t *stream_len):
 */
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":527
 *     return integer_decode_c(stream_char, &stream_len)
 * 
 * cdef inline int64_t integer_decode_c(const unsigned char *stream, size_t *stream_len):             # <<<<<<<<<<<<<<
 *     cdef int64_t value = 0
 *     cdef size_t i
 */

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

/* "fastsnmp/snmp_parser.pyx":538
 *     return value
 * 
 * cdef inline uint64_t uinteger_decode_c(const unsigned char *stream, size_t *stream_len):             # <<<<<<<<<<<<<<
 *     cdef uint64_t value = 0
 *     cdef uint8_t i
 */

static CYTHON_INLINE uint64_t __pyx_f_8fastsnmp_11snmp_parser_uinteger_decode_c(unsigned char const *__pyx_v_stream, size_t *__pyx_v_stream_len) {
  uint64_t __pyx_v_value;
  uint8_t __pyx_v_i;
  uint64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  uint8_t __pyx_t_3;
  __Pyx_RefNannySetupContext("uinteger_decode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":539
 * 
 * cdef inline uint64_t uinteger_decode_c(const unsigned char *stream, size_t *stream_len):
 *     cdef uint64_t value = 0             # <<<<<<<<<<<<<<
 *     cdef uint8_t i
 *     for i in range(stream_len[0]):
 */
  __pyx_v_value = 0;

  /* "fastsnmp/snmp_parser.pyx":541
 *     cdef uint64_t value = 0
 *     cdef uint8_t i
 *     for i in range(stream_len[0]):             # <<<<<<<<<<<<<<
 *         value <<= 8
 *         value |= <uint8_t>stream[i]
 */
  __pyx_t_1 = (__pyx_v_stream_len[0]);
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "fastsnmp/snmp_parser.pyx":542
 *     cdef uint8_t i
 *     for i in range(stream_len[0]):
 *         value <<= 8             # <<<<<<<<<<<<<<
 *         value |= <uint8_t>stream[i]
 *     return value
 */
    __pyx_v_value = (__pyx_v_value << 8);

    /* "fastsnmp/snmp_parser.pyx":543
 *     for i in range(stream_len[0]):
 *         value <<= 8
 *         value |= <uint8_t>stream[i]             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
    __pyx_v_value = (__pyx_v_value | ((uint8_t)(__pyx_v_stream[__pyx_v_i])));
  }

  /* "fastsnmp/snmp_parser.pyx":544
 *         value <<= 8
 *         value |= <uint8_t>stream[i]
 *     return value             # <<<<<<<<<<<<<<
 * 
 * def sequence_decode(bytes stream not None) -> list:
 */
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":538
 *     return value
 * 
 * cdef inline uint64_t uinteger_decode_c(const unsigned char *stream, size_t *stream_len):             # <<<<<<<<<<<<<<
 *     cdef uint64_t value = 0
 *     cdef uint8_t i
 */

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

/* "fastsnmp/snmp_parser.pyx":546
 *     return value
 * 
 * def sequence_decode(bytes stream not None) -> list:             # <<<<<<<<<<<<<<
 *     cdef const unsigned char * stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_17sequence_decode(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_8fastsnmp_11snmp_parser_17sequence_decode = {"sequence_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_17sequence_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_17sequence_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sequence_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sequence_decode") < 0)) __PYX_ERR(0, 546, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sequence_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 546, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.sequence_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), (&PyBytes_Type), 0, "stream", 1))) __PYX_ERR(0, 546, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_16sequence_decode(__pyx_self, __pyx_v_stream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_16sequence_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  unsigned char const *__pyx_v_stream_char;
  size_t __pyx_v_stream_len;
  PyObject *__pyx_v_ret = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned char const *__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("sequence_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":547
 * 
 * def sequence_decode(bytes stream not None) -> list:
 *     cdef const unsigned char * stream_char = stream             # <<<<<<<<<<<<<<
 *     cdef size_t stream_len = len(stream)
 *     cdef list ret
 */
  __pyx_t_1 = __Pyx_PyBytes_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L1_error)
  __pyx_v_stream_char = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":548
 * def sequence_decode(bytes stream not None) -> list:
 *     cdef const unsigned char * stream_char = stream
 *     cdef size_t stream_len = len(stream)             # <<<<<<<<<<<<<<
 *     cdef list ret
 *     ret = sequence_decode_c(stream_char, stream_len)
 */
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 548, __pyx_L1_error)
  __pyx_v_stream_len = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":550
 *     cdef size_t stream_len = len(stream)
 *     cdef list ret
 *     ret = sequence_decode_c(stream_char, stream_len)             # <<<<<<<<<<<<<<
 *     return ret
 * 
 */
  __pyx_t_3 = __pyx_f_8fastsnmp_11snmp_parser_sequence_decode_c(__pyx_v_stream_char, __pyx_v_stream_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_ret = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "fastsnmp/snmp_parser.pyx":551
 *     cdef list ret
 *     ret = sequence_decode_c(stream_char, stream_len)
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * cdef list sequence_decode_c(const unsigned char *stream, const size_t stream_len):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":546
 *     return value
 * 
 * def sequence_decode(bytes stream not None) -> list:             # <<<<<<<<<<<<<<
 *     cdef const unsigned char * stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.sequence_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":553
 *     return ret
 * 
 * cdef list sequence_decode_c(const unsigned char *stream, const size_t stream_len):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into as sequence
 */

static PyObject *__pyx_f_8fastsnmp_11snmp_parser_sequence_decode_c(unsigned char const *__pyx_v_stream, size_t const __pyx_v_stream_len) {
  uint64_t __pyx_v_tag;
  uint64_t __pyx_v_tmp_uint_val;
  int64_t __pyx_v_tmp_int_val;
  size_t __pyx_v_encode_length;
  size_t __pyx_v_length;
  size_t __pyx_v_current_stream_pos;
  PyObject *__pyx_v_bytes_val = 0;
  unsigned char const *__pyx_v_stream_char;
  PyObject *__pyx_v_objects = 0;
  PyObject *__pyx_v_tmp_list_val = 0;
  PyObject *__pyx_v_object_str = 0;
  char __pyx_v_ret_str[0x1F4];
  size_t __pyx_v_ret_length;
  PyObject *__pyx_v_opaque_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sequence_decode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":562
 *     :rtype: list
 *     """
 *     cdef uint64_t tag = 0, tmp_uint_val             # <<<<<<<<<<<<<<
 *     cdef int64_t tmp_int_val
 *     cdef size_t encode_length, length, current_stream_pos=0
 */
  __pyx_v_tag = 0;

  /* "fastsnmp/snmp_parser.pyx":564
 *     cdef uint64_t tag = 0, tmp_uint_val
 *     cdef int64_t tmp_int_val
 *     cdef size_t encode_length, length, current_stream_pos=0             # <<<<<<<<<<<<<<
 *     cdef bytes bytes_val
 *     cdef const unsigned char *stream_char = stream
 */
  __pyx_v_current_stream_pos = 0;

  /* "fastsnmp/snmp_parser.pyx":566
 *     cdef size_t encode_length, length, current_stream_pos=0
 *     cdef bytes bytes_val
 *     cdef const unsigned char *stream_char = stream             # <<<<<<<<<<<<<<
 *     cdef list objects=[], tmp_list_val
 *     cdef tuple tmp_tuple_val
 */
  __pyx_v_stream_char = __pyx_v_stream;

  /* "fastsnmp/snmp_parser.pyx":567
 *     cdef bytes bytes_val
 *     cdef const unsigned char *stream_char = stream
 *     cdef list objects=[], tmp_list_val             # <<<<<<<<<<<<<<
 *     cdef tuple tmp_tuple_val
 *     cdef str object_str
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_objects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":575
 *     # cdef char *result_str_ptr = result_str
 * 
 *     while current_stream_pos < stream_len:             # <<<<<<<<<<<<<<
 *         tag_decode_c(stream_char, &tag, &encode_length)
 *         stream_char += encode_length
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_current_stream_pos < __pyx_v_stream_len) != 0);
    if (!__pyx_t_2) break;

    /* "fastsnmp/snmp_parser.pyx":576
 * 
 *     while current_stream_pos < stream_len:
 *         tag_decode_c(stream_char, &tag, &encode_length)             # <<<<<<<<<<<<<<
 *         stream_char += encode_length
 *         current_stream_pos += encode_length
 */
    __pyx_t_3 = __pyx_f_8fastsnmp_11snmp_parser_tag_decode_c(__pyx_v_stream_char, (&__pyx_v_tag), (&__pyx_v_encode_length)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 576, __pyx_L1_error)

    /* "fastsnmp/snmp_parser.pyx":577
 *     while current_stream_pos < stream_len:
 *         tag_decode_c(stream_char, &tag, &encode_length)
 *         stream_char += encode_length             # <<<<<<<<<<<<<<
 *         current_stream_pos += encode_length
 *         length_decode_c(stream_char, &length, &encode_length)
 */
    __pyx_v_stream_char = (__pyx_v_stream_char + __pyx_v_encode_length);

    /* "fastsnmp/snmp_parser.pyx":578
 *         tag_decode_c(stream_char, &tag, &encode_length)
 *         stream_char += encode_length
 *         current_stream_pos += encode_length             # <<<<<<<<<<<<<<
 *         length_decode_c(stream_char, &length, &encode_length)
 *         stream_char += encode_length
 */
    __pyx_v_current_stream_pos = (__pyx_v_current_stream_pos + __pyx_v_encode_length);

    /* "fastsnmp/snmp_parser.pyx":579
 *         stream_char += encode_length
 *         current_stream_pos += encode_length
 *         length_decode_c(stream_char, &length, &encode_length)             # <<<<<<<<<<<<<<
 *         stream_char += encode_length
 *         current_stream_pos += encode_length
 */
    (void)(__pyx_f_8fastsnmp_11snmp_parser_length_decode_c(__pyx_v_stream_char, (&__pyx_v_length), (&__pyx_v_encode_length)));

    /* "fastsnmp/snmp_parser.pyx":580
 *         current_stream_pos += encode_length
 *         length_decode_c(stream_char, &length, &encode_length)
 *         stream_char += encode_length             # <<<<<<<<<<<<<<
 *         current_stream_pos += encode_length
 *         if (current_stream_pos + length) > stream_len:
 */
    __pyx_v_stream_char = (__pyx_v_stream_char + __pyx_v_encode_length);

    /* "fastsnmp/snmp_parser.pyx":581
 *         length_decode_c(stream_char, &length, &encode_length)
 *         stream_char += encode_length
 *         current_stream_pos += encode_length             # <<<<<<<<<<<<<<
 *         if (current_stream_pos + length) > stream_len:
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %
 */
    __pyx_v_current_stream_pos = (__pyx_v_current_stream_pos + __pyx_v_encode_length);

    /* "fastsnmp/snmp_parser.pyx":582
 *         stream_char += encode_length
 *         current_stream_pos += encode_length
 *         if (current_stream_pos + length) > stream_len:             # <<<<<<<<<<<<<<
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %
 *                             (current_stream_pos, length, stream_len, tag))
 */
    __pyx_t_2 = (((__pyx_v_current_stream_pos + __pyx_v_length) > __pyx_v_stream_len) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "fastsnmp/snmp_parser.pyx":583
 *         current_stream_pos += encode_length
 *         if (current_stream_pos + length) > stream_len:
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %             # <<<<<<<<<<<<<<
 *                             (current_stream_pos, length, stream_len, tag))
 *         if tag == ASN_U_INTEGER:
 */
      __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = 0;
      __pyx_t_5 = 127;
      __Pyx_INCREF(__pyx_kp_u_out_of_len_current_stream_pos);
      __pyx_t_4 += 31;
      __Pyx_GIVEREF(__pyx_kp_u_out_of_len_current_stream_pos);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_out_of_len_current_stream_pos);

      /* "fastsnmp/snmp_parser.pyx":584
 *         if (current_stream_pos + length) > stream_len:
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %
 *                             (current_stream_pos, length, stream_len, tag))             # <<<<<<<<<<<<<<
 *         if tag == ASN_U_INTEGER:
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 */
      __pyx_t_6 = __Pyx_PyUnicode_From_size_t(__pyx_v_current_stream_pos, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_length);
      __pyx_t_4 += 8;
      __Pyx_GIVEREF(__pyx_kp_u_length);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_length);
      __pyx_t_6 = __Pyx_PyUnicode_From_size_t(__pyx_v_length, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_stream_len);
      __pyx_t_4 += 12;
      __Pyx_GIVEREF(__pyx_kp_u_stream_len);
      PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_stream_len);
      __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_stream_len); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_kp_u_tag);
      __pyx_t_4 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_tag);
      PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_tag);
      __pyx_t_7 = __Pyx_PyInt_From_uint64_t(__pyx_v_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "fastsnmp/snmp_parser.pyx":583
 *         current_stream_pos += encode_length
 *         if (current_stream_pos + length) > stream_len:
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %             # <<<<<<<<<<<<<<
 *                             (current_stream_pos, length, stream_len, tag))
 *         if tag == ASN_U_INTEGER:
 */
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 8, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 583, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":582
 *         stream_char += encode_length
 *         current_stream_pos += encode_length
 *         if (current_stream_pos + length) > stream_len:             # <<<<<<<<<<<<<<
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %
 *                             (current_stream_pos, length, stream_len, tag))
 */
    }

    /* "fastsnmp/snmp_parser.pyx":585
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %
 *                             (current_stream_pos, length, stream_len, tag))
 *         if tag == ASN_U_INTEGER:             # <<<<<<<<<<<<<<
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 *             objects.append(tmp_int_val)
 */
    __pyx_t_2 = ((__pyx_v_tag == 2) != 0);
    if (__pyx_t_2) {

      /* "fastsnmp/snmp_parser.pyx":586
 *                             (current_stream_pos, length, stream_len, tag))
 *         if tag == ASN_U_INTEGER:
 *             tmp_int_val = integer_decode_c(stream_char, &length)             # <<<<<<<<<<<<<<
 *             objects.append(tmp_int_val)
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \
 */
      __pyx_v_tmp_int_val = __pyx_f_8fastsnmp_11snmp_parser_integer_decode_c(__pyx_v_stream_char, (&__pyx_v_length));

      /* "fastsnmp/snmp_parser.pyx":587
 *         if tag == ASN_U_INTEGER:
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 *             objects.append(tmp_int_val)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:
 */
      __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_tmp_int_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "fastsnmp/snmp_parser.pyx":585
 *             raise Exception("out of len. current_stream_pos=%s length=%s stream_len=%s tag=%s" %
 *                             (current_stream_pos, length, stream_len, tag))
 *         if tag == ASN_U_INTEGER:             # <<<<<<<<<<<<<<
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 *             objects.append(tmp_int_val)
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":588
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 *             objects.append(tmp_int_val)
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \             # <<<<<<<<<<<<<<
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 */
    __pyx_t_9 = ((__pyx_v_tag == 65) != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_2 = __pyx_t_9;
      goto __pyx_L7_bool_binop_done;
    }

    /* "fastsnmp/snmp_parser.pyx":589
 *             objects.append(tmp_int_val)
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:             # <<<<<<<<<<<<<<
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 *             objects.append(tmp_uint_val)
 */
    __pyx_t_9 = ((__pyx_v_tag == 66) != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_2 = __pyx_t_9;
      goto __pyx_L7_bool_binop_done;
    }
    switch (__pyx_v_tag) {
      case 66:
      case 70:
      case 67:
      __pyx_t_9 = 1;
      break;
      default:
      __pyx_t_9 = 0;
      break;
    }
    __pyx_t_2 = __pyx_t_9;
    __pyx_L7_bool_binop_done:;

    /* "fastsnmp/snmp_parser.pyx":588
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 *             objects.append(tmp_int_val)
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \             # <<<<<<<<<<<<<<
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 */
    if (__pyx_t_2) {

      /* "fastsnmp/snmp_parser.pyx":590
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)             # <<<<<<<<<<<<<<
 *             objects.append(tmp_uint_val)
 *         elif tag == ASN_U_OBJECTID:
 */
      __pyx_v_tmp_uint_val = __pyx_f_8fastsnmp_11snmp_parser_uinteger_decode_c(__pyx_v_stream_char, (&__pyx_v_length));

      /* "fastsnmp/snmp_parser.pyx":591
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 *             objects.append(tmp_uint_val)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_OBJECTID:
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 */
      __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_tmp_uint_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 591, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "fastsnmp/snmp_parser.pyx":588
 *             tmp_int_val = integer_decode_c(stream_char, &length)
 *             objects.append(tmp_int_val)
 *         elif tag == ASN_A_COUNTER32 or tag == ASN_A_UNSIGNED32 \             # <<<<<<<<<<<<<<
 *                 or tag == ASN_A_GAUGE32 or tag == ASN_A_COUNTER64 or tag == ASN_A_TIMETICKS:
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":592
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 *             objects.append(tmp_uint_val)
 *         elif tag == ASN_U_OBJECTID:             # <<<<<<<<<<<<<<
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 *             if ret_length > MAX_OID_LEN_STR:
 */
    __pyx_t_2 = ((__pyx_v_tag == 6) != 0);
    if (__pyx_t_2) {

      /* "fastsnmp/snmp_parser.pyx":593
 *             objects.append(tmp_uint_val)
 *         elif tag == ASN_U_OBJECTID:
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)             # <<<<<<<<<<<<<<
 *             if ret_length > MAX_OID_LEN_STR:
 *                 raise Exception("too long oid")
 */
      __pyx_t_3 = __pyx_f_8fastsnmp_11snmp_parser_objectid_decode_str(__pyx_v_stream_char, __pyx_v_length, __pyx_v_ret_str, (&__pyx_v_ret_length)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 593, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":594
 *         elif tag == ASN_U_OBJECTID:
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 *             if ret_length > MAX_OID_LEN_STR:             # <<<<<<<<<<<<<<
 *                 raise Exception("too long oid")
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 */
      __pyx_t_2 = ((__pyx_v_ret_length > 0x1F4) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "fastsnmp/snmp_parser.pyx":595
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 *             if ret_length > MAX_OID_LEN_STR:
 *                 raise Exception("too long oid")             # <<<<<<<<<<<<<<
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 *             objects.append(object_str)
 */
        __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __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, 595, __pyx_L1_error)

        /* "fastsnmp/snmp_parser.pyx":594
 *         elif tag == ASN_U_OBJECTID:
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 *             if ret_length > MAX_OID_LEN_STR:             # <<<<<<<<<<<<<<
 *                 raise Exception("too long oid")
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 */
      }

      /* "fastsnmp/snmp_parser.pyx":596
 *             if ret_length > MAX_OID_LEN_STR:
 *                 raise Exception("too long oid")
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')             # <<<<<<<<<<<<<<
 *             objects.append(object_str)
 *         elif tag == ASN_U_NULL:
 */
      __pyx_t_1 = PyUnicode_DecodeASCII(__pyx_v_ret_str, __pyx_v_ret_length, ((char *)"ignore")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_object_str, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "fastsnmp/snmp_parser.pyx":597
 *                 raise Exception("too long oid")
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 *             objects.append(object_str)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_NULL:
 *             objects.append(None)
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_object_str); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 597, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":592
 *             tmp_uint_val = uinteger_decode_c(stream_char, &length)
 *             objects.append(tmp_uint_val)
 *         elif tag == ASN_U_OBJECTID:             # <<<<<<<<<<<<<<
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 *             if ret_length > MAX_OID_LEN_STR:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":598
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 *             objects.append(object_str)
 *         elif tag == ASN_U_NULL:             # <<<<<<<<<<<<<<
 *             objects.append(None)
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
 */
    __pyx_t_2 = ((__pyx_v_tag == 5) != 0);
    if (__pyx_t_2) {

      /* "fastsnmp/snmp_parser.pyx":599
 *             objects.append(object_str)
 *         elif tag == ASN_U_NULL:
 *             objects.append(None)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
 *             tmp_list_val = sequence_decode_c(stream_char, length)
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, Py_None); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 599, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":598
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 *             objects.append(object_str)
 *         elif tag == ASN_U_NULL:             # <<<<<<<<<<<<<<
 *             objects.append(None)
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":600
 *         elif tag == ASN_U_NULL:
 *             objects.append(None)
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:             # <<<<<<<<<<<<<<
 *             tmp_list_val = sequence_decode_c(stream_char, length)
 *             if tmp_list_val is not None:
 */
    switch (__pyx_v_tag) {
      case 48:
      case 0xA2:
      case 0xA5:
      __pyx_t_2 = 1;
      break;
      default:
      __pyx_t_2 = 0;
      break;
    }
    if (__pyx_t_2) {

      /* "fastsnmp/snmp_parser.pyx":601
 *             objects.append(None)
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
 *             tmp_list_val = sequence_decode_c(stream_char, length)             # <<<<<<<<<<<<<<
 *             if tmp_list_val is not None:
 *                 objects.append(tmp_list_val)
 */
      __pyx_t_1 = __pyx_f_8fastsnmp_11snmp_parser_sequence_decode_c(__pyx_v_stream_char, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_tmp_list_val, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "fastsnmp/snmp_parser.pyx":602
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
 *             tmp_list_val = sequence_decode_c(stream_char, length)
 *             if tmp_list_val is not None:             # <<<<<<<<<<<<<<
 *                 objects.append(tmp_list_val)
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:
 */
      __pyx_t_2 = (__pyx_v_tmp_list_val != ((PyObject*)Py_None));
      __pyx_t_9 = (__pyx_t_2 != 0);
      if (__pyx_t_9) {

        /* "fastsnmp/snmp_parser.pyx":603
 *             tmp_list_val = sequence_decode_c(stream_char, length)
 *             if tmp_list_val is not None:
 *                 objects.append(tmp_list_val)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:
 *             bytes_val = <bytes> stream_char[:length]
 */
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_tmp_list_val); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 603, __pyx_L1_error)

        /* "fastsnmp/snmp_parser.pyx":602
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
 *             tmp_list_val = sequence_decode_c(stream_char, length)
 *             if tmp_list_val is not None:             # <<<<<<<<<<<<<<
 *                 objects.append(tmp_list_val)
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:
 */
      }

      /* "fastsnmp/snmp_parser.pyx":600
 *         elif tag == ASN_U_NULL:
 *             objects.append(None)
 *         elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:             # <<<<<<<<<<<<<<
 *             tmp_list_val = sequence_decode_c(stream_char, length)
 *             if tmp_list_val is not None:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":604
 *             if tmp_list_val is not None:
 *                 objects.append(tmp_list_val)
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:             # <<<<<<<<<<<<<<
 *             bytes_val = <bytes> stream_char[:length]
 *             objects.append(bytes_val)
 */
    switch (__pyx_v_tag) {
      case 4:
      case 64:
      __pyx_t_9 = 1;
      break;
      default:
      __pyx_t_9 = 0;
      break;
    }
    if (__pyx_t_9) {

      /* "fastsnmp/snmp_parser.pyx":605
 *                 objects.append(tmp_list_val)
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:
 *             bytes_val = <bytes> stream_char[:length]             # <<<<<<<<<<<<<<
 *             objects.append(bytes_val)
 *         elif tag == ASN_A_OPAQUE:
 */
      __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_stream_char) + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __pyx_t_1;
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_bytes_val, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "fastsnmp/snmp_parser.pyx":606
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:
 *             bytes_val = <bytes> stream_char[:length]
 *             objects.append(bytes_val)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_A_OPAQUE:
 *             opaque_obj = sequence_decode_c(stream_char, length)
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_bytes_val); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 606, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":604
 *             if tmp_list_val is not None:
 *                 objects.append(tmp_list_val)
 *         elif tag == ASN_U_OCTETSTRING or tag == ASN_A_IPADDRESS:             # <<<<<<<<<<<<<<
 *             bytes_val = <bytes> stream_char[:length]
 *             objects.append(bytes_val)
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":607
 *             bytes_val = <bytes> stream_char[:length]
 *             objects.append(bytes_val)
 *         elif tag == ASN_A_OPAQUE:             # <<<<<<<<<<<<<<
 *             opaque_obj = sequence_decode_c(stream_char, length)
 *             if len(opaque_obj) != 1:
 */
    __pyx_t_9 = ((__pyx_v_tag == 68) != 0);
    if (__pyx_t_9) {

      /* "fastsnmp/snmp_parser.pyx":608
 *             objects.append(bytes_val)
 *         elif tag == ASN_A_OPAQUE:
 *             opaque_obj = sequence_decode_c(stream_char, length)             # <<<<<<<<<<<<<<
 *             if len(opaque_obj) != 1:
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))
 */
      __pyx_t_6 = __pyx_f_8fastsnmp_11snmp_parser_sequence_decode_c(__pyx_v_stream_char, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_opaque_obj, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "fastsnmp/snmp_parser.pyx":609
 *         elif tag == ASN_A_OPAQUE:
 *             opaque_obj = sequence_decode_c(stream_char, length)
 *             if len(opaque_obj) != 1:             # <<<<<<<<<<<<<<
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))
 *             objects.append(opaque_obj[0])
 */
      if (unlikely(__pyx_v_opaque_obj == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 609, __pyx_L1_error)
      }
      __pyx_t_4 = PyList_GET_SIZE(__pyx_v_opaque_obj); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 609, __pyx_L1_error)
      __pyx_t_9 = ((__pyx_t_4 != 1) != 0);
      if (unlikely(__pyx_t_9)) {

        /* "fastsnmp/snmp_parser.pyx":610
 *             opaque_obj = sequence_decode_c(stream_char, length)
 *             if len(opaque_obj) != 1:
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))             # <<<<<<<<<<<<<<
 *             objects.append(opaque_obj[0])
 *         elif tag == ASN_U_END_OF_MIB_VIEW:
 */
        if (unlikely(__pyx_v_opaque_obj == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(0, 610, __pyx_L1_error)
        }
        __pyx_t_4 = PyList_GET_SIZE(__pyx_v_opaque_obj); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
        __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_opaque_len_s_1, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 610, __pyx_L1_error)

        /* "fastsnmp/snmp_parser.pyx":609
 *         elif tag == ASN_A_OPAQUE:
 *             opaque_obj = sequence_decode_c(stream_char, length)
 *             if len(opaque_obj) != 1:             # <<<<<<<<<<<<<<
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))
 *             objects.append(opaque_obj[0])
 */
      }

      /* "fastsnmp/snmp_parser.pyx":611
 *             if len(opaque_obj) != 1:
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))
 *             objects.append(opaque_obj[0])             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(end_of_mib_view)
 */
      if (unlikely(__pyx_v_opaque_obj == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 611, __pyx_L1_error)
      }
      __pyx_t_6 = PyList_GET_ITEM(__pyx_v_opaque_obj, 0);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "fastsnmp/snmp_parser.pyx":607
 *             bytes_val = <bytes> stream_char[:length]
 *             objects.append(bytes_val)
 *         elif tag == ASN_A_OPAQUE:             # <<<<<<<<<<<<<<
 *             opaque_obj = sequence_decode_c(stream_char, length)
 *             if len(opaque_obj) != 1:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":612
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))
 *             objects.append(opaque_obj[0])
 *         elif tag == ASN_U_END_OF_MIB_VIEW:             # <<<<<<<<<<<<<<
 *             objects.append(end_of_mib_view)
 *         elif tag == ASN_OPAQUE_FLOAT:
 */
    __pyx_t_9 = ((__pyx_v_tag == 0x82) != 0);
    if (__pyx_t_9) {

      /* "fastsnmp/snmp_parser.pyx":613
 *             objects.append(opaque_obj[0])
 *         elif tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(end_of_mib_view)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_OPAQUE_FLOAT:
 *             bytes_val = <bytes> stream_char[:length]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_end_of_mib_view); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "fastsnmp/snmp_parser.pyx":612
 *                 raise Exception("opaque len %s != 1" % len(opaque_obj))
 *             objects.append(opaque_obj[0])
 *         elif tag == ASN_U_END_OF_MIB_VIEW:             # <<<<<<<<<<<<<<
 *             objects.append(end_of_mib_view)
 *         elif tag == ASN_OPAQUE_FLOAT:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":614
 *         elif tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(end_of_mib_view)
 *         elif tag == ASN_OPAQUE_FLOAT:             # <<<<<<<<<<<<<<
 *             bytes_val = <bytes> stream_char[:length]
 *             if length == 4:
 */
    __pyx_t_9 = ((__pyx_v_tag == 0x9F78) != 0);
    if (__pyx_t_9) {

      /* "fastsnmp/snmp_parser.pyx":615
 *             objects.append(end_of_mib_view)
 *         elif tag == ASN_OPAQUE_FLOAT:
 *             bytes_val = <bytes> stream_char[:length]             # <<<<<<<<<<<<<<
 *             if length == 4:
 *                 objects.append(struct.unpack('>f', bytes_val)[0])
 */
      __pyx_t_6 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_stream_char) + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __pyx_t_6;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_bytes_val, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "fastsnmp/snmp_parser.pyx":616
 *         elif tag == ASN_OPAQUE_FLOAT:
 *             bytes_val = <bytes> stream_char[:length]
 *             if length == 4:             # <<<<<<<<<<<<<<
 *                 objects.append(struct.unpack('>f', bytes_val)[0])
 *             else:
 */
      __pyx_t_9 = ((__pyx_v_length == 4) != 0);
      if (likely(__pyx_t_9)) {

        /* "fastsnmp/snmp_parser.pyx":617
 *             bytes_val = <bytes> stream_char[:length]
 *             if length == 4:
 *                 objects.append(struct.unpack('>f', bytes_val)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 raise NotImplementedError("unknown float len %s" % length)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_struct); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_unpack); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_3 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_3 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_kp_u_f, __pyx_v_bytes_val};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_3, 2+__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "fastsnmp/snmp_parser.pyx":616
 *         elif tag == ASN_OPAQUE_FLOAT:
 *             bytes_val = <bytes> stream_char[:length]
 *             if length == 4:             # <<<<<<<<<<<<<<
 *                 objects.append(struct.unpack('>f', bytes_val)[0])
 *             else:
 */
        goto __pyx_L13;
      }

      /* "fastsnmp/snmp_parser.pyx":619
 *                 objects.append(struct.unpack('>f', bytes_val)[0])
 *             else:
 *                 raise NotImplementedError("unknown float len %s" % length)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_OPAQUE_BOOL:
 *             if stream_char[0] == b'\x01':
 */
      /*else*/ {
        __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_unknown_float_len_s, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 619, __pyx_L1_error)
      }
      __pyx_L13:;

      /* "fastsnmp/snmp_parser.pyx":614
 *         elif tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(end_of_mib_view)
 *         elif tag == ASN_OPAQUE_FLOAT:             # <<<<<<<<<<<<<<
 *             bytes_val = <bytes> stream_char[:length]
 *             if length == 4:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":620
 *             else:
 *                 raise NotImplementedError("unknown float len %s" % length)
 *         elif tag == ASN_OPAQUE_BOOL:             # <<<<<<<<<<<<<<
 *             if stream_char[0] == b'\x01':
 *                 objects.append(True)
 */
    __pyx_t_9 = ((__pyx_v_tag == 0x1F01) != 0);
    if (__pyx_t_9) {

      /* "fastsnmp/snmp_parser.pyx":621
 *                 raise NotImplementedError("unknown float len %s" % length)
 *         elif tag == ASN_OPAQUE_BOOL:
 *             if stream_char[0] == b'\x01':             # <<<<<<<<<<<<<<
 *                 objects.append(True)
 *             else:
 */
      __pyx_t_9 = (((__pyx_v_stream_char[0]) == '\x01') != 0);
      if (__pyx_t_9) {

        /* "fastsnmp/snmp_parser.pyx":622
 *         elif tag == ASN_OPAQUE_BOOL:
 *             if stream_char[0] == b'\x01':
 *                 objects.append(True)             # <<<<<<<<<<<<<<
 *             else:
 *                 objects.append(False)
 */
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, Py_True); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 622, __pyx_L1_error)

        /* "fastsnmp/snmp_parser.pyx":621
 *                 raise NotImplementedError("unknown float len %s" % length)
 *         elif tag == ASN_OPAQUE_BOOL:
 *             if stream_char[0] == b'\x01':             # <<<<<<<<<<<<<<
 *                 objects.append(True)
 *             else:
 */
        goto __pyx_L14;
      }

      /* "fastsnmp/snmp_parser.pyx":624
 *                 objects.append(True)
 *             else:
 *                 objects.append(False)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_NO_SUCH_OBJECT or tag == ASN_U_NO_SUCH_INSTANCE or tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(None)
 */
      /*else*/ {
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, Py_False); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 624, __pyx_L1_error)
      }
      __pyx_L14:;

      /* "fastsnmp/snmp_parser.pyx":620
 *             else:
 *                 raise NotImplementedError("unknown float len %s" % length)
 *         elif tag == ASN_OPAQUE_BOOL:             # <<<<<<<<<<<<<<
 *             if stream_char[0] == b'\x01':
 *                 objects.append(True)
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":625
 *             else:
 *                 objects.append(False)
 *         elif tag == ASN_U_NO_SUCH_OBJECT or tag == ASN_U_NO_SUCH_INSTANCE or tag == ASN_U_END_OF_MIB_VIEW:             # <<<<<<<<<<<<<<
 *             objects.append(None)
 *         elif tag == ASN_U_EOC:
 */
    switch (__pyx_v_tag) {
      case 0x80:
      case 0x81:
      case 0x82:
      __pyx_t_9 = 1;
      break;
      default:
      __pyx_t_9 = 0;
      break;
    }
    if (likely(__pyx_t_9)) {

      /* "fastsnmp/snmp_parser.pyx":626
 *                 objects.append(False)
 *         elif tag == ASN_U_NO_SUCH_OBJECT or tag == ASN_U_NO_SUCH_INSTANCE or tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(None)             # <<<<<<<<<<<<<<
 *         elif tag == ASN_U_EOC:
 *             raise Exception("end of content")
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objects, Py_None); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":625
 *             else:
 *                 objects.append(False)
 *         elif tag == ASN_U_NO_SUCH_OBJECT or tag == ASN_U_NO_SUCH_INSTANCE or tag == ASN_U_END_OF_MIB_VIEW:             # <<<<<<<<<<<<<<
 *             objects.append(None)
 *         elif tag == ASN_U_EOC:
 */
      goto __pyx_L6;
    }

    /* "fastsnmp/snmp_parser.pyx":627
 *         elif tag == ASN_U_NO_SUCH_OBJECT or tag == ASN_U_NO_SUCH_INSTANCE or tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(None)
 *         elif tag == ASN_U_EOC:             # <<<<<<<<<<<<<<
 *             raise Exception("end of content")
 *         else:
 */
    __pyx_t_9 = ((__pyx_v_tag == 0) != 0);
    if (unlikely(__pyx_t_9)) {

      /* "fastsnmp/snmp_parser.pyx":628
 *             objects.append(None)
 *         elif tag == ASN_U_EOC:
 *             raise Exception("end of content")             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError("unknown tag=%s" % tag)
 */
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 628, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":627
 *         elif tag == ASN_U_NO_SUCH_OBJECT or tag == ASN_U_NO_SUCH_INSTANCE or tag == ASN_U_END_OF_MIB_VIEW:
 *             objects.append(None)
 *         elif tag == ASN_U_EOC:             # <<<<<<<<<<<<<<
 *             raise Exception("end of content")
 *         else:
 */
    }

    /* "fastsnmp/snmp_parser.pyx":630
 *             raise Exception("end of content")
 *         else:
 *             raise NotImplementedError("unknown tag=%s" % tag)             # <<<<<<<<<<<<<<
 * 
 *         current_stream_pos += length
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyInt_From_uint64_t(__pyx_v_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_unknown_tag_s, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 630, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "fastsnmp/snmp_parser.pyx":632
 *             raise NotImplementedError("unknown tag=%s" % tag)
 * 
 *         current_stream_pos += length             # <<<<<<<<<<<<<<
 *         stream_char += length
 *     return objects
 */
    __pyx_v_current_stream_pos = (__pyx_v_current_stream_pos + __pyx_v_length);

    /* "fastsnmp/snmp_parser.pyx":633
 * 
 *         current_stream_pos += length
 *         stream_char += length             # <<<<<<<<<<<<<<
 *     return objects
 * 
 */
    __pyx_v_stream_char = (__pyx_v_stream_char + __pyx_v_length);
  }

  /* "fastsnmp/snmp_parser.pyx":634
 *         current_stream_pos += length
 *         stream_char += length
 *     return objects             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_objects);
  __pyx_r = __pyx_v_objects;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":553
 *     return ret
 * 
 * cdef list sequence_decode_c(const unsigned char *stream, const size_t stream_len):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into as sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.sequence_decode_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytes_val);
  __Pyx_XDECREF(__pyx_v_objects);
  __Pyx_XDECREF(__pyx_v_tmp_list_val);
  __Pyx_XDECREF(__pyx_v_object_str);
  __Pyx_XDECREF(__pyx_v_opaque_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":637
 * 
 * 
 * cdef inline int length_decode_c(const unsigned char *stream, size_t *length, size_t *enc_len):             # <<<<<<<<<<<<<<
 *     """
 *     X.690 8,1,3
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_length_decode_c(unsigned char const *__pyx_v_stream, size_t *__pyx_v_length, size_t *__pyx_v_enc_len) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  __Pyx_RefNannySetupContext("length_decode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":641
 *     X.690 8,1,3
 *     """
 *     length[0] = <uint8_t>stream[0]             # <<<<<<<<<<<<<<
 *     enc_len[0] = 1
 * 
 */
  (__pyx_v_length[0]) = ((uint8_t)(__pyx_v_stream[0]));

  /* "fastsnmp/snmp_parser.pyx":642
 *     """
 *     length[0] = <uint8_t>stream[0]
 *     enc_len[0] = 1             # <<<<<<<<<<<<<<
 * 
 *     if length[0] & 0x80 == 0x80:  # 8.1.3.5
 */
  (__pyx_v_enc_len[0]) = 1;

  /* "fastsnmp/snmp_parser.pyx":644
 *     enc_len[0] = 1
 * 
 *     if length[0] & 0x80 == 0x80:  # 8.1.3.5             # <<<<<<<<<<<<<<
 *         enc_len[0] = length[0] & 0x7f
 *         length[0] = uinteger_decode_c(stream+1, enc_len)
 */
  __pyx_t_1 = ((((__pyx_v_length[0]) & 0x80) == 0x80) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":645
 * 
 *     if length[0] & 0x80 == 0x80:  # 8.1.3.5
 *         enc_len[0] = length[0] & 0x7f             # <<<<<<<<<<<<<<
 *         length[0] = uinteger_decode_c(stream+1, enc_len)
 *         enc_len[0] += 1
 */
    (__pyx_v_enc_len[0]) = ((__pyx_v_length[0]) & 0x7f);

    /* "fastsnmp/snmp_parser.pyx":646
 *     if length[0] & 0x80 == 0x80:  # 8.1.3.5
 *         enc_len[0] = length[0] & 0x7f
 *         length[0] = uinteger_decode_c(stream+1, enc_len)             # <<<<<<<<<<<<<<
 *         enc_len[0] += 1
 * 
 */
    (__pyx_v_length[0]) = __pyx_f_8fastsnmp_11snmp_parser_uinteger_decode_c((__pyx_v_stream + 1), __pyx_v_enc_len);

    /* "fastsnmp/snmp_parser.pyx":647
 *         enc_len[0] = length[0] & 0x7f
 *         length[0] = uinteger_decode_c(stream+1, enc_len)
 *         enc_len[0] += 1             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    __pyx_t_2 = 0;
    (__pyx_v_enc_len[__pyx_t_2]) = ((__pyx_v_enc_len[__pyx_t_2]) + 1);

    /* "fastsnmp/snmp_parser.pyx":644
 *     enc_len[0] = 1
 * 
 *     if length[0] & 0x80 == 0x80:  # 8.1.3.5             # <<<<<<<<<<<<<<
 *         enc_len[0] = length[0] & 0x7f
 *         length[0] = uinteger_decode_c(stream+1, enc_len)
 */
  }

  /* "fastsnmp/snmp_parser.pyx":649
 *         enc_len[0] += 1
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":637
 * 
 * 
 * cdef inline int length_decode_c(const unsigned char *stream, size_t *length, size_t *enc_len):             # <<<<<<<<<<<<<<
 *     """
 *     X.690 8,1,3
 */

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

/* "fastsnmp/snmp_parser.pyx":652
 * 
 * 
 * def length_decode(bytes data):             # <<<<<<<<<<<<<<
 *     cdef size_t encode_length, length
 *     length_decode_c(data, &length, &encode_length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_19length_decode(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_8fastsnmp_11snmp_parser_19length_decode = {"length_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_19length_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_19length_decode(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_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "length_decode") < 0)) __PYX_ERR(0, 652, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_data = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("length_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 652, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.length_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_18length_decode(__pyx_self, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_18length_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  size_t __pyx_v_encode_length;
  size_t __pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":654
 * def length_decode(bytes data):
 *     cdef size_t encode_length, length
 *     length_decode_c(data, &length, &encode_length)             # <<<<<<<<<<<<<<
 *     return length, encode_length
 * 
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 654, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 654, __pyx_L1_error)
  (void)(__pyx_f_8fastsnmp_11snmp_parser_length_decode_c(__pyx_t_1, (&__pyx_v_length), (&__pyx_v_encode_length)));

  /* "fastsnmp/snmp_parser.pyx":655
 *     cdef size_t encode_length, length
 *     length_decode_c(data, &length, &encode_length)
 *     return length, encode_length             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_encode_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":652
 * 
 * 
 * def length_decode(bytes data):             # <<<<<<<<<<<<<<
 *     cdef size_t encode_length, length
 *     length_decode_c(data, &length, &encode_length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.length_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":658
 * 
 * 
 * def length_encode(uint64_t length):             # <<<<<<<<<<<<<<
 *     """
 *     Function takes the length of the contents and produces the encoding for that length.  Section 6.3 of ITU-T-X.209
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_21length_encode(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_8fastsnmp_11snmp_parser_20length_encode, "\n    Function takes the length of the contents and produces the encoding for that length.  Section 6.3 of ITU-T-X.209\n\n    :param length: length\n    :type length: int\n    :returns: encoded length\n    :rtype: bytes\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_21length_encode = {"length_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_21length_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_20length_encode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_21length_encode(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
) {
  uint64_t __pyx_v_length;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length_2,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length_2,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length_2)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "length_encode") < 0)) __PYX_ERR(0, 658, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_length = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_length == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("length_encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 658, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.length_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_20length_encode(__pyx_self, __pyx_v_length);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_20length_encode(CYTHON_UNUSED PyObject *__pyx_self, uint64_t __pyx_v_length) {
  uint64_t __pyx_v_tmp_length;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_resultlist = NULL;
  PyObject *__pyx_v_numOctets = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":667
 *     :rtype: bytes
 *     """
 *     if length in length_cache:             # <<<<<<<<<<<<<<
 *         return length_cache[length]
 *     cdef uint64_t tmp_length = length
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_length_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "fastsnmp/snmp_parser.pyx":668
 *     """
 *     if length in length_cache:
 *         return length_cache[length]             # <<<<<<<<<<<<<<
 *     cdef uint64_t tmp_length = length
 *     if length <= 127:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_length_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_length, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __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;

    /* "fastsnmp/snmp_parser.pyx":667
 *     :rtype: bytes
 *     """
 *     if length in length_cache:             # <<<<<<<<<<<<<<
 *         return length_cache[length]
 *     cdef uint64_t tmp_length = length
 */
  }

  /* "fastsnmp/snmp_parser.pyx":669
 *     if length in length_cache:
 *         return length_cache[length]
 *     cdef uint64_t tmp_length = length             # <<<<<<<<<<<<<<
 *     if length <= 127:
 *         result = bytes([length & 0xff])
 */
  __pyx_v_tmp_length = __pyx_v_length;

  /* "fastsnmp/snmp_parser.pyx":670
 *         return length_cache[length]
 *     cdef uint64_t tmp_length = length
 *     if length <= 127:             # <<<<<<<<<<<<<<
 *         result = bytes([length & 0xff])
 *     else:
 */
  __pyx_t_4 = ((__pyx_v_length <= 0x7F) != 0);
  if (__pyx_t_4) {

    /* "fastsnmp/snmp_parser.pyx":671
 *     cdef uint64_t tmp_length = length
 *     if length <= 127:
 *         result = bytes([length & 0xff])             # <<<<<<<<<<<<<<
 *     else:
 *         # Long form - Octet one is the number of octets used to
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t((__pyx_v_length & 0xff)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "fastsnmp/snmp_parser.pyx":670
 *         return length_cache[length]
 *     cdef uint64_t tmp_length = length
 *     if length <= 127:             # <<<<<<<<<<<<<<
 *         result = bytes([length & 0xff])
 *     else:
 */
    goto __pyx_L4;
  }

  /* "fastsnmp/snmp_parser.pyx":679
 *         # 8 bits to encode the length
 * 
 *         resultlist = bytearray()             # <<<<<<<<<<<<<<
 *         numOctets = 0
 *         while tmp_length > 0:
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_resultlist = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "fastsnmp/snmp_parser.pyx":680
 * 
 *         resultlist = bytearray()
 *         numOctets = 0             # <<<<<<<<<<<<<<
 *         while tmp_length > 0:
 *             resultlist.insert(0, tmp_length & 0xff)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_numOctets = __pyx_int_0;

    /* "fastsnmp/snmp_parser.pyx":681
 *         resultlist = bytearray()
 *         numOctets = 0
 *         while tmp_length > 0:             # <<<<<<<<<<<<<<
 *             resultlist.insert(0, tmp_length & 0xff)
 *             tmp_length >>= 8
 */
    while (1) {
      __pyx_t_4 = ((__pyx_v_tmp_length > 0) != 0);
      if (!__pyx_t_4) break;

      /* "fastsnmp/snmp_parser.pyx":682
 *         numOctets = 0
 *         while tmp_length > 0:
 *             resultlist.insert(0, tmp_length & 0xff)             # <<<<<<<<<<<<<<
 *             tmp_length >>= 8
 *             numOctets += 1
 */
      __pyx_t_1 = __Pyx_PyInt_From_uint64_t((__pyx_v_tmp_length & 0xff)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyByteArray_Type_insert, __pyx_v_resultlist, __pyx_int_0, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __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;

      /* "fastsnmp/snmp_parser.pyx":683
 *         while tmp_length > 0:
 *             resultlist.insert(0, tmp_length & 0xff)
 *             tmp_length >>= 8             # <<<<<<<<<<<<<<
 *             numOctets += 1
 *         # Add a 1 to the front of the octet
 */
      __pyx_v_tmp_length = (__pyx_v_tmp_length >> 8);

      /* "fastsnmp/snmp_parser.pyx":684
 *             resultlist.insert(0, tmp_length & 0xff)
 *             tmp_length >>= 8
 *             numOctets += 1             # <<<<<<<<<<<<<<
 *         # Add a 1 to the front of the octet
 *         numOctets |= 0x80
 */
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_numOctets, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_numOctets, __pyx_t_2);
      __pyx_t_2 = 0;
    }

    /* "fastsnmp/snmp_parser.pyx":686
 *             numOctets += 1
 *         # Add a 1 to the front of the octet
 *         numOctets |= 0x80             # <<<<<<<<<<<<<<
 *         resultlist.insert(0, numOctets & 0xff)
 *         result = bytes(resultlist)
 */
    __pyx_t_2 = __Pyx_PyInt_OrObjC(__pyx_v_numOctets, __pyx_int_128, 0x80, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_numOctets, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "fastsnmp/snmp_parser.pyx":687
 *         # Add a 1 to the front of the octet
 *         numOctets |= 0x80
 *         resultlist.insert(0, numOctets & 0xff)             # <<<<<<<<<<<<<<
 *         result = bytes(resultlist)
 *     length_cache[length] = result
 */
    __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_v_numOctets, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyByteArray_Type_insert, __pyx_v_resultlist, __pyx_int_0, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "fastsnmp/snmp_parser.pyx":688
 *         numOctets |= 0x80
 *         resultlist.insert(0, numOctets & 0xff)
 *         result = bytes(resultlist)             # <<<<<<<<<<<<<<
 *     length_cache[length] = result
 *     return result
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_resultlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "fastsnmp/snmp_parser.pyx":689
 *         resultlist.insert(0, numOctets & 0xff)
 *         result = bytes(resultlist)
 *     length_cache[length] = result             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_length_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_v_length, __pyx_v_result, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 0) < 0)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":690
 *         result = bytes(resultlist)
 *     length_cache[length] = result
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline int tag_decode_c(const unsigned char *stream, uint64_t *tag, size_t *enc_len) except -1:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":658
 * 
 * 
 * def length_encode(uint64_t length):             # <<<<<<<<<<<<<<
 *     """
 *     Function takes the length of the contents and produces the encoding for that length.  Section 6.3 of ITU-T-X.209
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.length_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_resultlist);
  __Pyx_XDECREF(__pyx_v_numOctets);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":692
 *     return result
 * 
 * cdef inline int tag_decode_c(const unsigned char *stream, uint64_t *tag, size_t *enc_len) except -1:             # <<<<<<<<<<<<<<
 *     """
 *     X.690 8.1.2
 */

static CYTHON_INLINE int __pyx_f_8fastsnmp_11snmp_parser_tag_decode_c(unsigned char const *__pyx_v_stream, uint64_t *__pyx_v_tag, size_t *__pyx_v_enc_len) {
  uint64_t __pyx_v_htag;
  size_t __pyx_v_henc_len;
  uint8_t __pyx_v_tagp;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  __Pyx_RefNannySetupContext("tag_decode_c", 0);

  /* "fastsnmp/snmp_parser.pyx":699
 *     of the stream
 *     """
 *     cdef uint64_t htag=0             # <<<<<<<<<<<<<<
 *     cdef size_t henc_len=0
 *     cdef uint8_t tagp
 */
  __pyx_v_htag = 0;

  /* "fastsnmp/snmp_parser.pyx":700
 *     """
 *     cdef uint64_t htag=0
 *     cdef size_t henc_len=0             # <<<<<<<<<<<<<<
 *     cdef uint8_t tagp
 * 
 */
  __pyx_v_henc_len = 0;

  /* "fastsnmp/snmp_parser.pyx":703
 *     cdef uint8_t tagp
 * 
 *     tag[0] = <uint8_t> stream[0]  # low-tag-number form             # <<<<<<<<<<<<<<
 *     enc_len[0] = 1
 *     if tag[0] & 0x1F == 0x1F: # 8.1.2.4 high-tag-number form
 */
  (__pyx_v_tag[0]) = ((uint8_t)(__pyx_v_stream[0]));

  /* "fastsnmp/snmp_parser.pyx":704
 * 
 *     tag[0] = <uint8_t> stream[0]  # low-tag-number form
 *     enc_len[0] = 1             # <<<<<<<<<<<<<<
 *     if tag[0] & 0x1F == 0x1F: # 8.1.2.4 high-tag-number form
 *         htag = tag[0]
 */
  (__pyx_v_enc_len[0]) = 1;

  /* "fastsnmp/snmp_parser.pyx":705
 *     tag[0] = <uint8_t> stream[0]  # low-tag-number form
 *     enc_len[0] = 1
 *     if tag[0] & 0x1F == 0x1F: # 8.1.2.4 high-tag-number form             # <<<<<<<<<<<<<<
 *         htag = tag[0]
 *         while True:
 */
  __pyx_t_1 = ((((__pyx_v_tag[0]) & 0x1F) == 0x1F) != 0);
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":706
 *     enc_len[0] = 1
 *     if tag[0] & 0x1F == 0x1F: # 8.1.2.4 high-tag-number form
 *         htag = tag[0]             # <<<<<<<<<<<<<<
 *         while True:
 *             tagp = stream[henc_len + 1]
 */
    __pyx_v_htag = (__pyx_v_tag[0]);

    /* "fastsnmp/snmp_parser.pyx":707
 *     if tag[0] & 0x1F == 0x1F: # 8.1.2.4 high-tag-number form
 *         htag = tag[0]
 *         while True:             # <<<<<<<<<<<<<<
 *             tagp = stream[henc_len + 1]
 *             htag <<= 8
 */
    while (1) {

      /* "fastsnmp/snmp_parser.pyx":708
 *         htag = tag[0]
 *         while True:
 *             tagp = stream[henc_len + 1]             # <<<<<<<<<<<<<<
 *             htag <<= 8
 *             htag |= tagp
 */
      __pyx_v_tagp = (__pyx_v_stream[(__pyx_v_henc_len + 1)]);

      /* "fastsnmp/snmp_parser.pyx":709
 *         while True:
 *             tagp = stream[henc_len + 1]
 *             htag <<= 8             # <<<<<<<<<<<<<<
 *             htag |= tagp
 *             henc_len += 1
 */
      __pyx_v_htag = (__pyx_v_htag << 8);

      /* "fastsnmp/snmp_parser.pyx":710
 *             tagp = stream[henc_len + 1]
 *             htag <<= 8
 *             htag |= tagp             # <<<<<<<<<<<<<<
 *             henc_len += 1
 *             if tagp & 0x80 == 0:
 */
      __pyx_v_htag = (__pyx_v_htag | __pyx_v_tagp);

      /* "fastsnmp/snmp_parser.pyx":711
 *             htag <<= 8
 *             htag |= tagp
 *             henc_len += 1             # <<<<<<<<<<<<<<
 *             if tagp & 0x80 == 0:
 *                 break
 */
      __pyx_v_henc_len = (__pyx_v_henc_len + 1);

      /* "fastsnmp/snmp_parser.pyx":712
 *             htag |= tagp
 *             henc_len += 1
 *             if tagp & 0x80 == 0:             # <<<<<<<<<<<<<<
 *                 break
 *         enc_len[0] += henc_len
 */
      __pyx_t_1 = (((__pyx_v_tagp & 0x80) == 0) != 0);
      if (__pyx_t_1) {

        /* "fastsnmp/snmp_parser.pyx":713
 *             henc_len += 1
 *             if tagp & 0x80 == 0:
 *                 break             # <<<<<<<<<<<<<<
 *         enc_len[0] += henc_len
 *         tag[0] = htag
 */
        goto __pyx_L5_break;

        /* "fastsnmp/snmp_parser.pyx":712
 *             htag |= tagp
 *             henc_len += 1
 *             if tagp & 0x80 == 0:             # <<<<<<<<<<<<<<
 *                 break
 *         enc_len[0] += henc_len
 */
      }
    }
    __pyx_L5_break:;

    /* "fastsnmp/snmp_parser.pyx":714
 *             if tagp & 0x80 == 0:
 *                 break
 *         enc_len[0] += henc_len             # <<<<<<<<<<<<<<
 *         tag[0] = htag
 * 
 */
    __pyx_t_2 = 0;
    (__pyx_v_enc_len[__pyx_t_2]) = ((__pyx_v_enc_len[__pyx_t_2]) + __pyx_v_henc_len);

    /* "fastsnmp/snmp_parser.pyx":715
 *                 break
 *         enc_len[0] += henc_len
 *         tag[0] = htag             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    (__pyx_v_tag[0]) = __pyx_v_htag;

    /* "fastsnmp/snmp_parser.pyx":705
 *     tag[0] = <uint8_t> stream[0]  # low-tag-number form
 *     enc_len[0] = 1
 *     if tag[0] & 0x1F == 0x1F: # 8.1.2.4 high-tag-number form             # <<<<<<<<<<<<<<
 *         htag = tag[0]
 *         while True:
 */
  }

  /* "fastsnmp/snmp_parser.pyx":717
 *         tag[0] = htag
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * def tag_decode(bytes stream not None):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":692
 *     return result
 * 
 * cdef inline int tag_decode_c(const unsigned char *stream, uint64_t *tag, size_t *enc_len) except -1:             # <<<<<<<<<<<<<<
 *     """
 *     X.690 8.1.2
 */

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

/* "fastsnmp/snmp_parser.pyx":719
 *     return 0
 * 
 * def tag_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_23tag_decode(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_8fastsnmp_11snmp_parser_23tag_decode = {"tag_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_23tag_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_23tag_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tag_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tag_decode") < 0)) __PYX_ERR(0, 719, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tag_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 719, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.tag_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), (&PyBytes_Type), 0, "stream", 1))) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_22tag_decode(__pyx_self, __pyx_v_stream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_22tag_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  uint64_t __pyx_v_tag;
  size_t __pyx_v_encode_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned char const *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tag_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":720
 * 
 * def tag_decode(bytes stream not None):
 *     cdef uint64_t tag=0             # <<<<<<<<<<<<<<
 *     cdef size_t encode_length
 *     tag_decode_c(stream, &tag, &encode_length)
 */
  __pyx_v_tag = 0;

  /* "fastsnmp/snmp_parser.pyx":722
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length
 *     tag_decode_c(stream, &tag, &encode_length)             # <<<<<<<<<<<<<<
 *     return tag, encode_length
 * 
 */
  __pyx_t_1 = __Pyx_PyBytes_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_8fastsnmp_11snmp_parser_tag_decode_c(__pyx_t_1, (&__pyx_v_tag), (&__pyx_v_encode_length)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 722, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":723
 *     cdef size_t encode_length
 *     tag_decode_c(stream, &tag, &encode_length)
 *     return tag, encode_length             # <<<<<<<<<<<<<<
 * 
 * # TODO: implement more encoders
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_encode_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":719
 *     return 0
 * 
 * def tag_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.tag_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":726
 * 
 * # TODO: implement more encoders
 * def value_encode(value=None, value_type='Null'):             # <<<<<<<<<<<<<<
 *     """
 *     Encoded value by ASN.1
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_25value_encode(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_8fastsnmp_11snmp_parser_24value_encode, "\n    Encoded value by ASN.1\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_25value_encode = {"value_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_25value_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_24value_encode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_25value_encode(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_value = 0;
  PyObject *__pyx_v_value_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_value_type,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_value_type,0};
    #endif
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)((PyObject *)Py_None));
    values[1] = ((PyObject *)((PyObject*)__pyx_n_u_Null));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value_type);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "value_encode") < 0)) __PYX_ERR(0, 726, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_value = values[0];
    __pyx_v_value_type = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("value_encode", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 726, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.value_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_24value_encode(__pyx_self, __pyx_v_value, __pyx_v_value_type);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_24value_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_value_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":730
 *     Encoded value by ASN.1
 *     """
 *     if value_type == 'Null':             # <<<<<<<<<<<<<<
 *         if value is not None:
 *             raise Exception('value must be None for Null type!')
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_value_type, __pyx_n_u_Null, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fastsnmp/snmp_parser.pyx":731
 *     """
 *     if value_type == 'Null':
 *         if value is not None:             # <<<<<<<<<<<<<<
 *             raise Exception('value must be None for Null type!')
 *         return b''
 */
    __pyx_t_1 = (__pyx_v_value != Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (unlikely(__pyx_t_2)) {

      /* "fastsnmp/snmp_parser.pyx":732
 *     if value_type == 'Null':
 *         if value is not None:
 *             raise Exception('value must be None for Null type!')             # <<<<<<<<<<<<<<
 *         return b''
 *     elif value_type == "Integer":
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __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, 732, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":731
 *     """
 *     if value_type == 'Null':
 *         if value is not None:             # <<<<<<<<<<<<<<
 *             raise Exception('value must be None for Null type!')
 *         return b''
 */
    }

    /* "fastsnmp/snmp_parser.pyx":733
 *         if value is not None:
 *             raise Exception('value must be None for Null type!')
 *         return b''             # <<<<<<<<<<<<<<
 *     elif value_type == "Integer":
 *         return integer_encode(value)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_b__8);
    __pyx_r = __pyx_kp_b__8;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":730
 *     Encoded value by ASN.1
 *     """
 *     if value_type == 'Null':             # <<<<<<<<<<<<<<
 *         if value is not None:
 *             raise Exception('value must be None for Null type!')
 */
  }

  /* "fastsnmp/snmp_parser.pyx":734
 *             raise Exception('value must be None for Null type!')
 *         return b''
 *     elif value_type == "Integer":             # <<<<<<<<<<<<<<
 *         return integer_encode(value)
 *     elif value_type == "Counter64":
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_value_type, __pyx_n_u_Integer, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":735
 *         return b''
 *     elif value_type == "Integer":
 *         return integer_encode(value)             # <<<<<<<<<<<<<<
 *     elif value_type == "Counter64":
 *         return uinteger_encode(value)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_integer_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_value};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":734
 *             raise Exception('value must be None for Null type!')
 *         return b''
 *     elif value_type == "Integer":             # <<<<<<<<<<<<<<
 *         return integer_encode(value)
 *     elif value_type == "Counter64":
 */
  }

  /* "fastsnmp/snmp_parser.pyx":736
 *     elif value_type == "Integer":
 *         return integer_encode(value)
 *     elif value_type == "Counter64":             # <<<<<<<<<<<<<<
 *         return uinteger_encode(value)
 *     elif value_type == "OctetString":
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_value_type, __pyx_n_u_Counter64, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":737
 *         return integer_encode(value)
 *     elif value_type == "Counter64":
 *         return uinteger_encode(value)             # <<<<<<<<<<<<<<
 *     elif value_type == "OctetString":
 *         return value.encode()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_uinteger_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_value};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":736
 *     elif value_type == "Integer":
 *         return integer_encode(value)
 *     elif value_type == "Counter64":             # <<<<<<<<<<<<<<
 *         return uinteger_encode(value)
 *     elif value_type == "OctetString":
 */
  }

  /* "fastsnmp/snmp_parser.pyx":738
 *     elif value_type == "Counter64":
 *         return uinteger_encode(value)
 *     elif value_type == "OctetString":             # <<<<<<<<<<<<<<
 *         return value.encode()
 *     else:
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_value_type, __pyx_n_u_OctetString, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 738, __pyx_L1_error)
  if (likely(__pyx_t_2)) {

    /* "fastsnmp/snmp_parser.pyx":739
 *         return uinteger_encode(value)
 *     elif value_type == "OctetString":
 *         return value.encode()             # <<<<<<<<<<<<<<
 *     else:
 *         raise NotImplementedError('not implement coder for %s' % type(value))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "fastsnmp/snmp_parser.pyx":738
 *     elif value_type == "Counter64":
 *         return uinteger_encode(value)
 *     elif value_type == "OctetString":             # <<<<<<<<<<<<<<
 *         return value.encode()
 *     else:
 */
  }

  /* "fastsnmp/snmp_parser.pyx":741
 *         return value.encode()
 *     else:
 *         raise NotImplementedError('not implement coder for %s' % type(value))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_not_implement_coder_for_s, ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 741, __pyx_L1_error)
  }

  /* "fastsnmp/snmp_parser.pyx":726
 * 
 * # TODO: implement more encoders
 * def value_encode(value=None, value_type='Null'):             # <<<<<<<<<<<<<<
 *     """
 *     Encoded value by ASN.1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.value_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":744
 * 
 * 
 * def encode_varbind(oid, value_type='Null', value=None):             # <<<<<<<<<<<<<<
 *     if value is None:
 *         value_type = 'Null'
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_27encode_varbind(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_8fastsnmp_11snmp_parser_27encode_varbind = {"encode_varbind", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_27encode_varbind, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_27encode_varbind(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_oid = 0;
  PyObject *__pyx_v_value_type = 0;
  PyObject *__pyx_v_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_varbind (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_value_type,&__pyx_n_s_value,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid,&__pyx_n_s_value_type,&__pyx_n_s_value,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_u_Null));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value_type);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "encode_varbind") < 0)) __PYX_ERR(0, 744, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oid = values[0];
    __pyx_v_value_type = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_varbind", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 744, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.encode_varbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_26encode_varbind(__pyx_self, __pyx_v_oid, __pyx_v_value_type, __pyx_v_value);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_26encode_varbind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_oid, PyObject *__pyx_v_value_type, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_obj_id_value = NULL;
  PyObject *__pyx_v_obj_id_type = NULL;
  PyObject *__pyx_v_obj_id_len = NULL;
  PyObject *__pyx_v_obj_value_value = NULL;
  PyObject *__pyx_v_obj_value_type = NULL;
  PyObject *__pyx_v_obj_value_len = NULL;
  PyObject *__pyx_v_varbinds_obj = NULL;
  PyObject *__pyx_v_seq_tag = NULL;
  PyObject *__pyx_v_varbind_enc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_varbind", 0);
  __Pyx_INCREF(__pyx_v_value_type);

  /* "fastsnmp/snmp_parser.pyx":745
 * 
 * def encode_varbind(oid, value_type='Null', value=None):
 *     if value is None:             # <<<<<<<<<<<<<<
 *         value_type = 'Null'
 *     obj_id_value = objectid_encode(oid)
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":746
 * def encode_varbind(oid, value_type='Null', value=None):
 *     if value is None:
 *         value_type = 'Null'             # <<<<<<<<<<<<<<
 *     obj_id_value = objectid_encode(oid)
 *     obj_id_type = ASN_U_OBJECTID_BYTE
 */
    __Pyx_INCREF(__pyx_n_u_Null);
    __Pyx_DECREF_SET(__pyx_v_value_type, __pyx_n_u_Null);

    /* "fastsnmp/snmp_parser.pyx":745
 * 
 * def encode_varbind(oid, value_type='Null', value=None):
 *     if value is None:             # <<<<<<<<<<<<<<
 *         value_type = 'Null'
 *     obj_id_value = objectid_encode(oid)
 */
  }

  /* "fastsnmp/snmp_parser.pyx":747
 *     if value is None:
 *         value_type = 'Null'
 *     obj_id_value = objectid_encode(oid)             # <<<<<<<<<<<<<<
 *     obj_id_type = ASN_U_OBJECTID_BYTE
 *     obj_id_len = length_encode(len(obj_id_value))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_objectid_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_oid};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_obj_id_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "fastsnmp/snmp_parser.pyx":748
 *         value_type = 'Null'
 *     obj_id_value = objectid_encode(oid)
 *     obj_id_type = ASN_U_OBJECTID_BYTE             # <<<<<<<<<<<<<<
 *     obj_id_len = length_encode(len(obj_id_value))
 * 
 */
  __Pyx_INCREF(__pyx_kp_b__9);
  __pyx_v_obj_id_type = __pyx_kp_b__9;

  /* "fastsnmp/snmp_parser.pyx":749
 *     obj_id_value = objectid_encode(oid)
 *     obj_id_type = ASN_U_OBJECTID_BYTE
 *     obj_id_len = length_encode(len(obj_id_value))             # <<<<<<<<<<<<<<
 * 
 *     obj_value_value = value_encode(value, value_type)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyObject_Length(__pyx_v_obj_id_value); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_obj_id_len = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "fastsnmp/snmp_parser.pyx":751
 *     obj_id_len = length_encode(len(obj_id_value))
 * 
 *     obj_value_value = value_encode(value, value_type)             # <<<<<<<<<<<<<<
 *     obj_value_type = TYPE_NAME_TO_TYPE[value_type]
 *     obj_value_len = length_encode(len(obj_value_value))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_value_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_value, __pyx_v_value_type};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_obj_value_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "fastsnmp/snmp_parser.pyx":752
 * 
 *     obj_value_value = value_encode(value, value_type)
 *     obj_value_type = TYPE_NAME_TO_TYPE[value_type]             # <<<<<<<<<<<<<<
 *     obj_value_len = length_encode(len(obj_value_value))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_TYPE_NAME_TO_TYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_value_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_obj_value_type = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":753
 *     obj_value_value = value_encode(value, value_type)
 *     obj_value_type = TYPE_NAME_TO_TYPE[value_type]
 *     obj_value_len = length_encode(len(obj_value_value))             # <<<<<<<<<<<<<<
 * 
 *     varbinds_obj = obj_id_type + obj_id_len + obj_id_value + obj_value_type + obj_value_len + obj_value_value
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyObject_Length(__pyx_v_obj_value_value); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_obj_value_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":755
 *     obj_value_len = length_encode(len(obj_value_value))
 * 
 *     varbinds_obj = obj_id_type + obj_id_len + obj_id_value + obj_value_type + obj_value_len + obj_value_value             # <<<<<<<<<<<<<<
 * 
 *     seq_tag = ASN_U_SEQUENCE_BYTE
 */
  __pyx_t_4 = PyNumber_Add(__pyx_v_obj_id_type, __pyx_v_obj_id_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_v_obj_id_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_obj_value_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_v_obj_value_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_obj_value_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_varbinds_obj = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":757
 *     varbinds_obj = obj_id_type + obj_id_len + obj_id_value + obj_value_type + obj_value_len + obj_value_value
 * 
 *     seq_tag = ASN_U_SEQUENCE_BYTE             # <<<<<<<<<<<<<<
 *     varbind_enc = seq_tag + length_encode(len(varbinds_obj)) + varbinds_obj
 *     return varbind_enc
 */
  __Pyx_INCREF(__pyx_kp_b_0);
  __pyx_v_seq_tag = __pyx_kp_b_0;

  /* "fastsnmp/snmp_parser.pyx":758
 * 
 *     seq_tag = ASN_U_SEQUENCE_BYTE
 *     varbind_enc = seq_tag + length_encode(len(varbinds_obj)) + varbinds_obj             # <<<<<<<<<<<<<<
 *     return varbind_enc
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyObject_Length(__pyx_v_varbinds_obj); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyNumber_Add(__pyx_v_seq_tag, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_varbinds_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_varbind_enc = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":759
 *     seq_tag = ASN_U_SEQUENCE_BYTE
 *     varbind_enc = seq_tag + length_encode(len(varbinds_obj)) + varbinds_obj
 *     return varbind_enc             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_varbind_enc);
  __pyx_r = __pyx_v_varbind_enc;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":744
 * 
 * 
 * def encode_varbind(oid, value_type='Null', value=None):             # <<<<<<<<<<<<<<
 *     if value is None:
 *         value_type = 'Null'
 */

  /* 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_8);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.encode_varbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj_id_value);
  __Pyx_XDECREF(__pyx_v_obj_id_type);
  __Pyx_XDECREF(__pyx_v_obj_id_len);
  __Pyx_XDECREF(__pyx_v_obj_value_value);
  __Pyx_XDECREF(__pyx_v_obj_value_type);
  __Pyx_XDECREF(__pyx_v_obj_value_len);
  __Pyx_XDECREF(__pyx_v_varbinds_obj);
  __Pyx_XDECREF(__pyx_v_seq_tag);
  __Pyx_XDECREF(__pyx_v_varbind_enc);
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":762
 * 
 * 
 * def varbinds_encode(varbinds):             # <<<<<<<<<<<<<<
 *     res = bytearray()
 *     for varbind in varbinds:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_29varbinds_encode(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_8fastsnmp_11snmp_parser_29varbinds_encode = {"varbinds_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_29varbinds_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_29varbinds_encode(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_varbinds = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("varbinds_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varbinds,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varbinds,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_varbinds)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "varbinds_encode") < 0)) __PYX_ERR(0, 762, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_varbinds = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("varbinds_encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 762, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.varbinds_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_28varbinds_encode(__pyx_self, __pyx_v_varbinds);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_28varbinds_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_varbinds) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_varbind = NULL;
  PyObject *__pyx_v_oid = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_value_type = 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;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("varbinds_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":763
 * 
 * def varbinds_encode(varbinds):
 *     res = bytearray()             # <<<<<<<<<<<<<<
 *     for varbind in varbinds:
 *         if isinstance(varbind, str):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":764
 * def varbinds_encode(varbinds):
 *     res = bytearray()
 *     for varbind in varbinds:             # <<<<<<<<<<<<<<
 *         if isinstance(varbind, str):
 *             oid = varbind
 */
  if (likely(PyList_CheckExact(__pyx_v_varbinds)) || PyTuple_CheckExact(__pyx_v_varbinds)) {
    __pyx_t_1 = __pyx_v_varbinds; __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_varbinds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 764, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_varbind, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "fastsnmp/snmp_parser.pyx":765
 *     res = bytearray()
 *     for varbind in varbinds:
 *         if isinstance(varbind, str):             # <<<<<<<<<<<<<<
 *             oid = varbind
 *             value = None
 */
    __pyx_t_5 = PyUnicode_Check(__pyx_v_varbind); 
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "fastsnmp/snmp_parser.pyx":766
 *     for varbind in varbinds:
 *         if isinstance(varbind, str):
 *             oid = varbind             # <<<<<<<<<<<<<<
 *             value = None
 *             value_type = "Null"
 */
      __Pyx_INCREF(__pyx_v_varbind);
      __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_v_varbind);

      /* "fastsnmp/snmp_parser.pyx":767
 *         if isinstance(varbind, str):
 *             oid = varbind
 *             value = None             # <<<<<<<<<<<<<<
 *             value_type = "Null"
 *         elif len(varbind) == 3:
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_value, Py_None);

      /* "fastsnmp/snmp_parser.pyx":768
 *             oid = varbind
 *             value = None
 *             value_type = "Null"             # <<<<<<<<<<<<<<
 *         elif len(varbind) == 3:
 *             oid, value_type, value = varbind
 */
      __Pyx_INCREF(__pyx_n_u_Null);
      __Pyx_XDECREF_SET(__pyx_v_value_type, __pyx_n_u_Null);

      /* "fastsnmp/snmp_parser.pyx":765
 *     res = bytearray()
 *     for varbind in varbinds:
 *         if isinstance(varbind, str):             # <<<<<<<<<<<<<<
 *             oid = varbind
 *             value = None
 */
      goto __pyx_L5;
    }

    /* "fastsnmp/snmp_parser.pyx":769
 *             value = None
 *             value_type = "Null"
 *         elif len(varbind) == 3:             # <<<<<<<<<<<<<<
 *             oid, value_type, value = varbind
 *         elif len(varbind) == 2:
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_varbind); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 769, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_7 == 3) != 0);
    if (__pyx_t_6) {

      /* "fastsnmp/snmp_parser.pyx":770
 *             value_type = "Null"
 *         elif len(varbind) == 3:
 *             oid, value_type, value = varbind             # <<<<<<<<<<<<<<
 *         elif len(varbind) == 2:
 *             oid, value_type = varbind
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_varbind))) || (PyList_CheckExact(__pyx_v_varbind))) {
        PyObject* sequence = __pyx_v_varbind;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 770, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_v_varbind); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
        index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) __PYX_ERR(0, 770, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 770, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value_type, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "fastsnmp/snmp_parser.pyx":769
 *             value = None
 *             value_type = "Null"
 *         elif len(varbind) == 3:             # <<<<<<<<<<<<<<
 *             oid, value_type, value = varbind
 *         elif len(varbind) == 2:
 */
      goto __pyx_L5;
    }

    /* "fastsnmp/snmp_parser.pyx":771
 *         elif len(varbind) == 3:
 *             oid, value_type, value = varbind
 *         elif len(varbind) == 2:             # <<<<<<<<<<<<<<
 *             oid, value_type = varbind
 *             value = None
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_varbind); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 771, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_7 == 2) != 0);
    if (__pyx_t_6) {

      /* "fastsnmp/snmp_parser.pyx":772
 *             oid, value_type, value = varbind
 *         elif len(varbind) == 2:
 *             oid, value_type = varbind             # <<<<<<<<<<<<<<
 *             value = None
 *         res += encode_varbind(oid, value_type, value)
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_varbind))) || (PyList_CheckExact(__pyx_v_varbind))) {
        PyObject* sequence = __pyx_v_varbind;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 772, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_v_varbind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
        index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_4), 2) < 0) __PYX_ERR(0, 772, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 772, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_oid, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value_type, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "fastsnmp/snmp_parser.pyx":773
 *         elif len(varbind) == 2:
 *             oid, value_type = varbind
 *             value = None             # <<<<<<<<<<<<<<
 *         res += encode_varbind(oid, value_type, value)
 *     return res
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_value, Py_None);

      /* "fastsnmp/snmp_parser.pyx":771
 *         elif len(varbind) == 3:
 *             oid, value_type, value = varbind
 *         elif len(varbind) == 2:             # <<<<<<<<<<<<<<
 *             oid, value_type = varbind
 *             value = None
 */
    }
    __pyx_L5:;

    /* "fastsnmp/snmp_parser.pyx":774
 *             oid, value_type = varbind
 *             value = None
 *         res += encode_varbind(oid, value_type, value)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_encode_varbind); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(!__pyx_v_oid)) { __Pyx_RaiseUnboundLocalError("oid"); __PYX_ERR(0, 774, __pyx_L1_error) }
    if (unlikely(!__pyx_v_value_type)) { __Pyx_RaiseUnboundLocalError("value_type"); __PYX_ERR(0, 774, __pyx_L1_error) }
    if (unlikely(!__pyx_v_value)) { __Pyx_RaiseUnboundLocalError("value"); __PYX_ERR(0, 774, __pyx_L1_error) }
    __pyx_t_4 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_12 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_oid, __pyx_v_value_type, __pyx_v_value};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_res, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "fastsnmp/snmp_parser.pyx":764
 * def varbinds_encode(varbinds):
 *     res = bytearray()
 *     for varbind in varbinds:             # <<<<<<<<<<<<<<
 *         if isinstance(varbind, str):
 *             oid = varbind
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":775
 *             value = None
 *         res += encode_varbind(oid, value_type, value)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":762
 * 
 * 
 * def varbinds_encode(varbinds):             # <<<<<<<<<<<<<<
 *     res = bytearray()
 *     for varbind in varbinds:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.varbinds_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_varbind);
  __Pyx_XDECREF(__pyx_v_oid);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":778
 * 
 * 
 * def varbinds_encode_tlv(varbinds):             # <<<<<<<<<<<<<<
 *     varbinds_data = varbinds_encode(varbinds)
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_31varbinds_encode_tlv(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_8fastsnmp_11snmp_parser_31varbinds_encode_tlv = {"varbinds_encode_tlv", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_31varbinds_encode_tlv, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_31varbinds_encode_tlv(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_varbinds = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("varbinds_encode_tlv (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varbinds,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varbinds,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_varbinds)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "varbinds_encode_tlv") < 0)) __PYX_ERR(0, 778, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_varbinds = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("varbinds_encode_tlv", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 778, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.varbinds_encode_tlv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_30varbinds_encode_tlv(__pyx_self, __pyx_v_varbinds);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_30varbinds_encode_tlv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_varbinds) {
  PyObject *__pyx_v_varbinds_data = NULL;
  PyObject *__pyx_v_varbinds_type = NULL;
  PyObject *__pyx_v_varbinds_len = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("varbinds_encode_tlv", 0);

  /* "fastsnmp/snmp_parser.pyx":779
 * 
 * def varbinds_encode_tlv(varbinds):
 *     varbinds_data = varbinds_encode(varbinds)             # <<<<<<<<<<<<<<
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 *     varbinds_len = length_encode(len(varbinds_data))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_varbinds_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_varbinds};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_varbinds_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":780
 * def varbinds_encode_tlv(varbinds):
 *     varbinds_data = varbinds_encode(varbinds)
 *     varbinds_type = ASN_U_SEQUENCE_BYTE             # <<<<<<<<<<<<<<
 *     varbinds_len = length_encode(len(varbinds_data))
 *     return varbinds_type + varbinds_len + varbinds_data
 */
  __Pyx_INCREF(__pyx_kp_b_0);
  __pyx_v_varbinds_type = __pyx_kp_b_0;

  /* "fastsnmp/snmp_parser.pyx":781
 *     varbinds_data = varbinds_encode(varbinds)
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 *     varbinds_len = length_encode(len(varbinds_data))             # <<<<<<<<<<<<<<
 *     return varbinds_type + varbinds_len + varbinds_data
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_Length(__pyx_v_varbinds_data); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_varbinds_len = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":782
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 *     varbinds_len = length_encode(len(varbinds_data))
 *     return varbinds_type + varbinds_len + varbinds_data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_varbinds_type, __pyx_v_varbinds_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_varbinds_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":778
 * 
 * 
 * def varbinds_encode_tlv(varbinds):             # <<<<<<<<<<<<<<
 *     varbinds_data = varbinds_encode(varbinds)
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 */

  /* 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_6);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.varbinds_encode_tlv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_varbinds_data);
  __Pyx_XDECREF(__pyx_v_varbinds_type);
  __Pyx_XDECREF(__pyx_v_varbinds_len);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":785
 * 
 * 
 * def msg_encode(req_id, community, varbinds, msg_type="GetBulk", max_repetitions=10, non_repeaters=0):             # <<<<<<<<<<<<<<
 *     """
 *     Build SNMP-message
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_33msg_encode(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_8fastsnmp_11snmp_parser_32msg_encode, "\n    Build SNMP-message\n\n    :param req_id: request identifier\n    :type req_id: int\n    :param community: snmp community\n    :type community: string\n    :param varbinds: list of oid to encode or bytes if encoded\n    :type varbinds: tuple\n    :param msg_type: index of ASN_SNMP_MSG_TYPES\n    :type msg_type: str\n    :param max_repetitions: max repetitions\n    :type community: int\n    :param non_repeaters: non repeaters\n    :type varbinds: int\n    :returns: encoded message\n    :rtype: bytes\n    ");
static PyMethodDef __pyx_mdef_8fastsnmp_11snmp_parser_33msg_encode = {"msg_encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_33msg_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8fastsnmp_11snmp_parser_32msg_encode};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_33msg_encode(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_req_id = 0;
  PyObject *__pyx_v_community = 0;
  PyObject *__pyx_v_varbinds = 0;
  PyObject *__pyx_v_msg_type = 0;
  PyObject *__pyx_v_max_repetitions = 0;
  PyObject *__pyx_v_non_repeaters = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("msg_encode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_req_id,&__pyx_n_s_community,&__pyx_n_s_varbinds,&__pyx_n_s_msg_type,&__pyx_n_s_max_repetitions,&__pyx_n_s_non_repeaters,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_req_id,&__pyx_n_s_community,&__pyx_n_s_varbinds,&__pyx_n_s_msg_type,&__pyx_n_s_max_repetitions,&__pyx_n_s_non_repeaters,0};
    #endif
    PyObject* values[6] = {0,0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_u_GetBulk));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_10));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_req_id)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_community)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("msg_encode", 0, 3, 6, 1); __PYX_ERR(0, 785, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_varbinds)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("msg_encode", 0, 3, 6, 2); __PYX_ERR(0, 785, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_msg_type);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_repetitions);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_non_repeaters);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "msg_encode") < 0)) __PYX_ERR(0, 785, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_req_id = values[0];
    __pyx_v_community = values[1];
    __pyx_v_varbinds = values[2];
    __pyx_v_msg_type = values[3];
    __pyx_v_max_repetitions = values[4];
    __pyx_v_non_repeaters = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("msg_encode", 0, 3, 6, __pyx_nargs); __PYX_ERR(0, 785, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.msg_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_32msg_encode(__pyx_self, __pyx_v_req_id, __pyx_v_community, __pyx_v_varbinds, __pyx_v_msg_type, __pyx_v_max_repetitions, __pyx_v_non_repeaters);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_32msg_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_req_id, PyObject *__pyx_v_community, PyObject *__pyx_v_varbinds, PyObject *__pyx_v_msg_type, PyObject *__pyx_v_max_repetitions, PyObject *__pyx_v_non_repeaters) {
  PyObject *__pyx_v_varbinds_tlv = NULL;
  PyObject *__pyx_v_request_id_type = NULL;
  PyObject *__pyx_v_request_id_value = NULL;
  PyObject *__pyx_v_request_id_len = NULL;
  PyObject *__pyx_v_non_repeaters_value = NULL;
  PyObject *__pyx_v_non_repeaters_type = NULL;
  PyObject *__pyx_v_non_repeaters_len = NULL;
  PyObject *__pyx_v_max_repetitions_value = NULL;
  PyObject *__pyx_v_max_repetitions_type = NULL;
  PyObject *__pyx_v_max_repetitions_len = NULL;
  PyObject *__pyx_v_pdu = NULL;
  PyObject *__pyx_v_pdu_type = NULL;
  PyObject *__pyx_v_error_status_value = NULL;
  PyObject *__pyx_v_error_status_type = NULL;
  PyObject *__pyx_v_error_status_len = NULL;
  PyObject *__pyx_v_error_index_value = NULL;
  PyObject *__pyx_v_error_index_type = NULL;
  PyObject *__pyx_v_error_index_len = NULL;
  PyObject *__pyx_v_pdu_len = NULL;
  PyObject *__pyx_v_community_value = NULL;
  PyObject *__pyx_v_community_type = NULL;
  PyObject *__pyx_v_community_len = NULL;
  PyObject *__pyx_v_version_value = NULL;
  PyObject *__pyx_v_version_type = NULL;
  PyObject *__pyx_v_version_len = NULL;
  PyObject *__pyx_v_snmp_message_type = NULL;
  PyObject *__pyx_v_snmp_message_value = NULL;
  PyObject *__pyx_v_snmp_message_len = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("msg_encode", 0);

  /* "fastsnmp/snmp_parser.pyx":804
 *     :rtype: bytes
 *     """
 *     if isinstance(varbinds, (list, tuple)):             # <<<<<<<<<<<<<<
 *         varbinds_tlv = varbinds_encode_tlv(varbinds)
 *     else:
 */
  __pyx_t_2 = PyList_Check(__pyx_v_varbinds); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_Check(__pyx_v_varbinds); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":805
 *     """
 *     if isinstance(varbinds, (list, tuple)):
 *         varbinds_tlv = varbinds_encode_tlv(varbinds)             # <<<<<<<<<<<<<<
 *     else:
 *         varbinds_tlv = varbinds
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_varbinds_encode_tlv); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_varbinds};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_v_varbinds_tlv = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "fastsnmp/snmp_parser.pyx":804
 *     :rtype: bytes
 *     """
 *     if isinstance(varbinds, (list, tuple)):             # <<<<<<<<<<<<<<
 *         varbinds_tlv = varbinds_encode_tlv(varbinds)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":807
 *         varbinds_tlv = varbinds_encode_tlv(varbinds)
 *     else:
 *         varbinds_tlv = varbinds             # <<<<<<<<<<<<<<
 *     request_id_type = ASN_U_INTEGER_BYTE
 *     request_id_value = integer_encode(req_id)
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_varbinds);
    __pyx_v_varbinds_tlv = __pyx_v_varbinds;
  }
  __pyx_L3:;

  /* "fastsnmp/snmp_parser.pyx":808
 *     else:
 *         varbinds_tlv = varbinds
 *     request_id_type = ASN_U_INTEGER_BYTE             # <<<<<<<<<<<<<<
 *     request_id_value = integer_encode(req_id)
 *     request_id_len = length_encode(len(request_id_value))
 */
  __Pyx_INCREF(__pyx_kp_b__10);
  __pyx_v_request_id_type = __pyx_kp_b__10;

  /* "fastsnmp/snmp_parser.pyx":809
 *         varbinds_tlv = varbinds
 *     request_id_type = ASN_U_INTEGER_BYTE
 *     request_id_value = integer_encode(req_id)             # <<<<<<<<<<<<<<
 *     request_id_len = length_encode(len(request_id_value))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_integer_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_req_id};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_request_id_value = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":810
 *     request_id_type = ASN_U_INTEGER_BYTE
 *     request_id_value = integer_encode(req_id)
 *     request_id_len = length_encode(len(request_id_value))             # <<<<<<<<<<<<<<
 * 
 *     if msg_type == "GetBulk":
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyObject_Length(__pyx_v_request_id_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_request_id_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":812
 *     request_id_len = length_encode(len(request_id_value))
 * 
 *     if msg_type == "GetBulk":             # <<<<<<<<<<<<<<
 *         if max_repetitions < 1:
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_msg_type, __pyx_n_u_GetBulk, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 812, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":813
 * 
 *     if msg_type == "GetBulk":
 *         if max_repetitions < 1:             # <<<<<<<<<<<<<<
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)
 *         non_repeaters_value = integer_encode(non_repeaters)
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_max_repetitions, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 813, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__pyx_t_2)) {

      /* "fastsnmp/snmp_parser.pyx":814
 *     if msg_type == "GetBulk":
 *         if max_repetitions < 1:
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)             # <<<<<<<<<<<<<<
 *         non_repeaters_value = integer_encode(non_repeaters)
 *         non_repeaters_type = ASN_U_INTEGER_BYTE
 */
      __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_max_repetitions_must_be_higher_t, __pyx_v_max_repetitions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 814, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":813
 * 
 *     if msg_type == "GetBulk":
 *         if max_repetitions < 1:             # <<<<<<<<<<<<<<
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)
 *         non_repeaters_value = integer_encode(non_repeaters)
 */
    }

    /* "fastsnmp/snmp_parser.pyx":815
 *         if max_repetitions < 1:
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)
 *         non_repeaters_value = integer_encode(non_repeaters)             # <<<<<<<<<<<<<<
 *         non_repeaters_type = ASN_U_INTEGER_BYTE
 *         non_repeaters_len = length_encode(len(non_repeaters_value))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_integer_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_non_repeaters};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_non_repeaters_value = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":816
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)
 *         non_repeaters_value = integer_encode(non_repeaters)
 *         non_repeaters_type = ASN_U_INTEGER_BYTE             # <<<<<<<<<<<<<<
 *         non_repeaters_len = length_encode(len(non_repeaters_value))
 *         max_repetitions_value = integer_encode(max_repetitions)
 */
    __Pyx_INCREF(__pyx_kp_b__10);
    __pyx_v_non_repeaters_type = __pyx_kp_b__10;

    /* "fastsnmp/snmp_parser.pyx":817
 *         non_repeaters_value = integer_encode(non_repeaters)
 *         non_repeaters_type = ASN_U_INTEGER_BYTE
 *         non_repeaters_len = length_encode(len(non_repeaters_value))             # <<<<<<<<<<<<<<
 *         max_repetitions_value = integer_encode(max_repetitions)
 *         max_repetitions_type = ASN_U_INTEGER_BYTE
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyObject_Length(__pyx_v_non_repeaters_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 817, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_non_repeaters_len = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":818
 *         non_repeaters_type = ASN_U_INTEGER_BYTE
 *         non_repeaters_len = length_encode(len(non_repeaters_value))
 *         max_repetitions_value = integer_encode(max_repetitions)             # <<<<<<<<<<<<<<
 *         max_repetitions_type = ASN_U_INTEGER_BYTE
 *         max_repetitions_len = length_encode(len(max_repetitions_value))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_integer_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_max_repetitions};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_max_repetitions_value = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":819
 *         non_repeaters_len = length_encode(len(non_repeaters_value))
 *         max_repetitions_value = integer_encode(max_repetitions)
 *         max_repetitions_type = ASN_U_INTEGER_BYTE             # <<<<<<<<<<<<<<
 *         max_repetitions_len = length_encode(len(max_repetitions_value))
 *         pdu = request_id_type + request_id_len + request_id_value + \
 */
    __Pyx_INCREF(__pyx_kp_b__10);
    __pyx_v_max_repetitions_type = __pyx_kp_b__10;

    /* "fastsnmp/snmp_parser.pyx":820
 *         max_repetitions_value = integer_encode(max_repetitions)
 *         max_repetitions_type = ASN_U_INTEGER_BYTE
 *         max_repetitions_len = length_encode(len(max_repetitions_value))             # <<<<<<<<<<<<<<
 *         pdu = request_id_type + request_id_len + request_id_value + \
 *               non_repeaters_type + non_repeaters_len + non_repeaters_value + \
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyObject_Length(__pyx_v_max_repetitions_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 820, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_max_repetitions_len = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":821
 *         max_repetitions_type = ASN_U_INTEGER_BYTE
 *         max_repetitions_len = length_encode(len(max_repetitions_value))
 *         pdu = request_id_type + request_id_len + request_id_value + \             # <<<<<<<<<<<<<<
 *               non_repeaters_type + non_repeaters_len + non_repeaters_value + \
 *               max_repetitions_type + max_repetitions_len + max_repetitions_value + \
 */
    __pyx_t_5 = PyNumber_Add(__pyx_v_request_id_type, __pyx_v_request_id_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_request_id_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":822
 *         max_repetitions_len = length_encode(len(max_repetitions_value))
 *         pdu = request_id_type + request_id_len + request_id_value + \
 *               non_repeaters_type + non_repeaters_len + non_repeaters_value + \             # <<<<<<<<<<<<<<
 *               max_repetitions_type + max_repetitions_len + max_repetitions_value + \
 *               varbinds_tlv
 */
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_non_repeaters_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_non_repeaters_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_non_repeaters_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "fastsnmp/snmp_parser.pyx":823
 *         pdu = request_id_type + request_id_len + request_id_value + \
 *               non_repeaters_type + non_repeaters_len + non_repeaters_value + \
 *               max_repetitions_type + max_repetitions_len + max_repetitions_value + \             # <<<<<<<<<<<<<<
 *               varbinds_tlv
 *         pdu_type = ASN_SNMP_GETBULK_BYTE
 */
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_max_repetitions_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_max_repetitions_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_max_repetitions_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":824
 *               non_repeaters_type + non_repeaters_len + non_repeaters_value + \
 *               max_repetitions_type + max_repetitions_len + max_repetitions_value + \
 *               varbinds_tlv             # <<<<<<<<<<<<<<
 *         pdu_type = ASN_SNMP_GETBULK_BYTE
 *     else:
 */
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_varbinds_tlv); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pdu = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":825
 *               max_repetitions_type + max_repetitions_len + max_repetitions_value + \
 *               varbinds_tlv
 *         pdu_type = ASN_SNMP_GETBULK_BYTE             # <<<<<<<<<<<<<<
 *     else:
 *         error_status_value = INT_0  # integer_encode(0)
 */
    __Pyx_INCREF(__pyx_kp_b__11);
    __pyx_v_pdu_type = __pyx_kp_b__11;

    /* "fastsnmp/snmp_parser.pyx":812
 *     request_id_len = length_encode(len(request_id_value))
 * 
 *     if msg_type == "GetBulk":             # <<<<<<<<<<<<<<
 *         if max_repetitions < 1:
 *             raise Exception("max_repetitions must be higher than %s" % max_repetitions)
 */
    goto __pyx_L6;
  }

  /* "fastsnmp/snmp_parser.pyx":827
 *         pdu_type = ASN_SNMP_GETBULK_BYTE
 *     else:
 *         error_status_value = INT_0  # integer_encode(0)             # <<<<<<<<<<<<<<
 *         error_status_type = ASN_U_INTEGER_BYTE
 *         error_status_len = length_encode(len(error_status_value))
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_b__12);
    __pyx_v_error_status_value = __pyx_kp_b__12;

    /* "fastsnmp/snmp_parser.pyx":828
 *     else:
 *         error_status_value = INT_0  # integer_encode(0)
 *         error_status_type = ASN_U_INTEGER_BYTE             # <<<<<<<<<<<<<<
 *         error_status_len = length_encode(len(error_status_value))
 *         error_index_value = INT_0  # integer_encode(0)
 */
    __Pyx_INCREF(__pyx_kp_b__10);
    __pyx_v_error_status_type = __pyx_kp_b__10;

    /* "fastsnmp/snmp_parser.pyx":829
 *         error_status_value = INT_0  # integer_encode(0)
 *         error_status_type = ASN_U_INTEGER_BYTE
 *         error_status_len = length_encode(len(error_status_value))             # <<<<<<<<<<<<<<
 *         error_index_value = INT_0  # integer_encode(0)
 *         error_index_type = ASN_U_INTEGER_BYTE
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_error_status_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 829, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_error_status_len = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":830
 *         error_status_type = ASN_U_INTEGER_BYTE
 *         error_status_len = length_encode(len(error_status_value))
 *         error_index_value = INT_0  # integer_encode(0)             # <<<<<<<<<<<<<<
 *         error_index_type = ASN_U_INTEGER_BYTE
 *         error_index_len = length_encode(len(error_index_value))
 */
    __Pyx_INCREF(__pyx_kp_b__12);
    __pyx_v_error_index_value = __pyx_kp_b__12;

    /* "fastsnmp/snmp_parser.pyx":831
 *         error_status_len = length_encode(len(error_status_value))
 *         error_index_value = INT_0  # integer_encode(0)
 *         error_index_type = ASN_U_INTEGER_BYTE             # <<<<<<<<<<<<<<
 *         error_index_len = length_encode(len(error_index_value))
 *         pdu = request_id_type + request_id_len + request_id_value + \
 */
    __Pyx_INCREF(__pyx_kp_b__10);
    __pyx_v_error_index_type = __pyx_kp_b__10;

    /* "fastsnmp/snmp_parser.pyx":832
 *         error_index_value = INT_0  # integer_encode(0)
 *         error_index_type = ASN_U_INTEGER_BYTE
 *         error_index_len = length_encode(len(error_index_value))             # <<<<<<<<<<<<<<
 *         pdu = request_id_type + request_id_len + request_id_value + \
 *               error_status_type + error_status_len + error_status_value + \
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_error_index_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 832, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_error_index_len = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":833
 *         error_index_type = ASN_U_INTEGER_BYTE
 *         error_index_len = length_encode(len(error_index_value))
 *         pdu = request_id_type + request_id_len + request_id_value + \             # <<<<<<<<<<<<<<
 *               error_status_type + error_status_len + error_status_value + \
 *               error_index_type + error_index_len + error_index_value + \
 */
    __pyx_t_5 = PyNumber_Add(__pyx_v_request_id_type, __pyx_v_request_id_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_request_id_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":834
 *         error_index_len = length_encode(len(error_index_value))
 *         pdu = request_id_type + request_id_len + request_id_value + \
 *               error_status_type + error_status_len + error_status_value + \             # <<<<<<<<<<<<<<
 *               error_index_type + error_index_len + error_index_value + \
 *               varbinds_tlv
 */
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_error_status_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_error_status_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_error_status_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "fastsnmp/snmp_parser.pyx":835
 *         pdu = request_id_type + request_id_len + request_id_value + \
 *               error_status_type + error_status_len + error_status_value + \
 *               error_index_type + error_index_len + error_index_value + \             # <<<<<<<<<<<<<<
 *               varbinds_tlv
 *         pdu_type = ASN_SNMP_MSG_TYPES[msg_type]
 */
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_error_index_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_error_index_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_error_index_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":836
 *               error_status_type + error_status_len + error_status_value + \
 *               error_index_type + error_index_len + error_index_value + \
 *               varbinds_tlv             # <<<<<<<<<<<<<<
 *         pdu_type = ASN_SNMP_MSG_TYPES[msg_type]
 * 
 */
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_varbinds_tlv); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pdu = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "fastsnmp/snmp_parser.pyx":837
 *               error_index_type + error_index_len + error_index_value + \
 *               varbinds_tlv
 *         pdu_type = ASN_SNMP_MSG_TYPES[msg_type]             # <<<<<<<<<<<<<<
 * 
 *     pdu_len = length_encode(len(pdu))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ASN_SNMP_MSG_TYPES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_msg_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdu_type = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "fastsnmp/snmp_parser.pyx":839
 *         pdu_type = ASN_SNMP_MSG_TYPES[msg_type]
 * 
 *     pdu_len = length_encode(len(pdu))             # <<<<<<<<<<<<<<
 * 
 *     community_value = octetstring_encode(community)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyObject_Length(__pyx_v_pdu); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 839, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_pdu_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":841
 *     pdu_len = length_encode(len(pdu))
 * 
 *     community_value = octetstring_encode(community)             # <<<<<<<<<<<<<<
 *     community_type = ASN_U_OCTETSTRING_BYTE
 *     community_len = length_encode(len(community_value))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_octetstring_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_community};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_community_value = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":842
 * 
 *     community_value = octetstring_encode(community)
 *     community_type = ASN_U_OCTETSTRING_BYTE             # <<<<<<<<<<<<<<
 *     community_len = length_encode(len(community_value))
 * 
 */
  __Pyx_INCREF(__pyx_kp_b__13);
  __pyx_v_community_type = __pyx_kp_b__13;

  /* "fastsnmp/snmp_parser.pyx":843
 *     community_value = octetstring_encode(community)
 *     community_type = ASN_U_OCTETSTRING_BYTE
 *     community_len = length_encode(len(community_value))             # <<<<<<<<<<<<<<
 * 
 *     version_value = INT_1  # v2c
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyObject_Length(__pyx_v_community_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 843, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_community_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":845
 *     community_len = length_encode(len(community_value))
 * 
 *     version_value = INT_1  # v2c             # <<<<<<<<<<<<<<
 *     version_type = ASN_U_INTEGER_BYTE
 *     version_len = INT_1  # length_encode(len(version_value))
 */
  __Pyx_INCREF(__pyx_kp_b__14);
  __pyx_v_version_value = __pyx_kp_b__14;

  /* "fastsnmp/snmp_parser.pyx":846
 * 
 *     version_value = INT_1  # v2c
 *     version_type = ASN_U_INTEGER_BYTE             # <<<<<<<<<<<<<<
 *     version_len = INT_1  # length_encode(len(version_value))
 * 
 */
  __Pyx_INCREF(__pyx_kp_b__10);
  __pyx_v_version_type = __pyx_kp_b__10;

  /* "fastsnmp/snmp_parser.pyx":847
 *     version_value = INT_1  # v2c
 *     version_type = ASN_U_INTEGER_BYTE
 *     version_len = INT_1  # length_encode(len(version_value))             # <<<<<<<<<<<<<<
 * 
 *     snmp_message_type = ASN_U_SEQUENCE_BYTE
 */
  __Pyx_INCREF(__pyx_kp_b__14);
  __pyx_v_version_len = __pyx_kp_b__14;

  /* "fastsnmp/snmp_parser.pyx":849
 *     version_len = INT_1  # length_encode(len(version_value))
 * 
 *     snmp_message_type = ASN_U_SEQUENCE_BYTE             # <<<<<<<<<<<<<<
 *     snmp_message_value = version_type + version_len + version_value + \
 *                          community_type + community_len + community_value + \
 */
  __Pyx_INCREF(__pyx_kp_b_0);
  __pyx_v_snmp_message_type = __pyx_kp_b_0;

  /* "fastsnmp/snmp_parser.pyx":850
 * 
 *     snmp_message_type = ASN_U_SEQUENCE_BYTE
 *     snmp_message_value = version_type + version_len + version_value + \             # <<<<<<<<<<<<<<
 *                          community_type + community_len + community_value + \
 *                          pdu_type + pdu_len + pdu
 */
  __pyx_t_4 = PyNumber_Add(__pyx_v_version_type, __pyx_v_version_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_version_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "fastsnmp/snmp_parser.pyx":851
 *     snmp_message_type = ASN_U_SEQUENCE_BYTE
 *     snmp_message_value = version_type + version_len + version_value + \
 *                          community_type + community_len + community_value + \             # <<<<<<<<<<<<<<
 *                          pdu_type + pdu_len + pdu
 *     snmp_message_len = length_encode(len(snmp_message_value))
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_community_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_community_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_community_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "fastsnmp/snmp_parser.pyx":852
 *     snmp_message_value = version_type + version_len + version_value + \
 *                          community_type + community_len + community_value + \
 *                          pdu_type + pdu_len + pdu             # <<<<<<<<<<<<<<
 *     snmp_message_len = length_encode(len(snmp_message_value))
 *     return snmp_message_type + snmp_message_len + snmp_message_value
 */
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_pdu_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_pdu_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_pdu); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_snmp_message_value = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "fastsnmp/snmp_parser.pyx":853
 *                          community_type + community_len + community_value + \
 *                          pdu_type + pdu_len + pdu
 *     snmp_message_len = length_encode(len(snmp_message_value))             # <<<<<<<<<<<<<<
 *     return snmp_message_type + snmp_message_len + snmp_message_value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = PyObject_Length(__pyx_v_snmp_message_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 853, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_snmp_message_len = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "fastsnmp/snmp_parser.pyx":854
 *                          pdu_type + pdu_len + pdu
 *     snmp_message_len = length_encode(len(snmp_message_value))
 *     return snmp_message_type + snmp_message_len + snmp_message_value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyNumber_Add(__pyx_v_snmp_message_type, __pyx_v_snmp_message_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_snmp_message_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":785
 * 
 * 
 * def msg_encode(req_id, community, varbinds, msg_type="GetBulk", max_repetitions=10, non_repeaters=0):             # <<<<<<<<<<<<<<
 *     """
 *     Build SNMP-message
 */

  /* 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_9);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.msg_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_varbinds_tlv);
  __Pyx_XDECREF(__pyx_v_request_id_type);
  __Pyx_XDECREF(__pyx_v_request_id_value);
  __Pyx_XDECREF(__pyx_v_request_id_len);
  __Pyx_XDECREF(__pyx_v_non_repeaters_value);
  __Pyx_XDECREF(__pyx_v_non_repeaters_type);
  __Pyx_XDECREF(__pyx_v_non_repeaters_len);
  __Pyx_XDECREF(__pyx_v_max_repetitions_value);
  __Pyx_XDECREF(__pyx_v_max_repetitions_type);
  __Pyx_XDECREF(__pyx_v_max_repetitions_len);
  __Pyx_XDECREF(__pyx_v_pdu);
  __Pyx_XDECREF(__pyx_v_pdu_type);
  __Pyx_XDECREF(__pyx_v_error_status_value);
  __Pyx_XDECREF(__pyx_v_error_status_type);
  __Pyx_XDECREF(__pyx_v_error_status_len);
  __Pyx_XDECREF(__pyx_v_error_index_value);
  __Pyx_XDECREF(__pyx_v_error_index_type);
  __Pyx_XDECREF(__pyx_v_error_index_len);
  __Pyx_XDECREF(__pyx_v_pdu_len);
  __Pyx_XDECREF(__pyx_v_community_value);
  __Pyx_XDECREF(__pyx_v_community_type);
  __Pyx_XDECREF(__pyx_v_community_len);
  __Pyx_XDECREF(__pyx_v_version_value);
  __Pyx_XDECREF(__pyx_v_version_type);
  __Pyx_XDECREF(__pyx_v_version_len);
  __Pyx_XDECREF(__pyx_v_snmp_message_type);
  __Pyx_XDECREF(__pyx_v_snmp_message_value);
  __Pyx_XDECREF(__pyx_v_snmp_message_len);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":857
 * 
 * 
 * def msg_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length, length
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_35msg_decode(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_8fastsnmp_11snmp_parser_35msg_decode = {"msg_decode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_35msg_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_35msg_decode(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_stream = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("msg_decode (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 857, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "msg_decode") < 0)) __PYX_ERR(0, 857, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_stream = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("msg_decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 857, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.msg_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_34msg_decode(__pyx_self, __pyx_v_stream);

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

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_34msg_decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  uint64_t __pyx_v_tag;
  size_t __pyx_v_encode_length;
  size_t __pyx_v_length;
  unsigned char const *__pyx_v_stream_char;
  unsigned char const *__pyx_v_stream_ptr;
  CYTHON_UNUSED size_t __pyx_v_stream_len;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_snmp_ver = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_community = NULL;
  PyObject *__pyx_v_req_id = NULL;
  PyObject *__pyx_v_error_status = NULL;
  PyObject *__pyx_v_error_index = NULL;
  PyObject *__pyx_v_varbinds = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned char const *__pyx_t_1;
  Py_ssize_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("msg_decode", 0);

  /* "fastsnmp/snmp_parser.pyx":858
 * 
 * def msg_decode(stream):
 *     cdef uint64_t tag=0             # <<<<<<<<<<<<<<
 *     cdef size_t encode_length, length
 *     cdef const unsigned char *stream_char = stream
 */
  __pyx_v_tag = 0;

  /* "fastsnmp/snmp_parser.pyx":860
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length, length
 *     cdef const unsigned char *stream_char = stream             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_ptr = stream_char
 *     cdef size_t stream_len = len(stream)
 */
  __pyx_t_1 = __Pyx_PyObject_AsUString(__pyx_v_stream); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L1_error)
  __pyx_v_stream_char = __pyx_t_1;

  /* "fastsnmp/snmp_parser.pyx":861
 *     cdef size_t encode_length, length
 *     cdef const unsigned char *stream_char = stream
 *     cdef const unsigned char *stream_ptr = stream_char             # <<<<<<<<<<<<<<
 *     cdef size_t stream_len = len(stream)
 *     cdef list data
 */
  __pyx_v_stream_ptr = __pyx_v_stream_char;

  /* "fastsnmp/snmp_parser.pyx":862
 *     cdef const unsigned char *stream_char = stream
 *     cdef const unsigned char *stream_ptr = stream_char
 *     cdef size_t stream_len = len(stream)             # <<<<<<<<<<<<<<
 *     cdef list data
 * 
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 862, __pyx_L1_error)
  __pyx_v_stream_len = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":865
 *     cdef list data
 * 
 *     tag_decode_c(stream_ptr, &tag, &encode_length)             # <<<<<<<<<<<<<<
 *     stream_ptr += encode_length
 *     length_decode_c(stream_ptr, &length, &encode_length)
 */
  __pyx_t_3 = __pyx_f_8fastsnmp_11snmp_parser_tag_decode_c(__pyx_v_stream_ptr, (&__pyx_v_tag), (&__pyx_v_encode_length)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 865, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":866
 * 
 *     tag_decode_c(stream_ptr, &tag, &encode_length)
 *     stream_ptr += encode_length             # <<<<<<<<<<<<<<
 *     length_decode_c(stream_ptr, &length, &encode_length)
 *     stream_ptr += encode_length
 */
  __pyx_v_stream_ptr = (__pyx_v_stream_ptr + __pyx_v_encode_length);

  /* "fastsnmp/snmp_parser.pyx":867
 *     tag_decode_c(stream_ptr, &tag, &encode_length)
 *     stream_ptr += encode_length
 *     length_decode_c(stream_ptr, &length, &encode_length)             # <<<<<<<<<<<<<<
 *     stream_ptr += encode_length
 *     snmp_ver, community, data = sequence_decode_c(stream_ptr, length)
 */
  (void)(__pyx_f_8fastsnmp_11snmp_parser_length_decode_c(__pyx_v_stream_ptr, (&__pyx_v_length), (&__pyx_v_encode_length)));

  /* "fastsnmp/snmp_parser.pyx":868
 *     stream_ptr += encode_length
 *     length_decode_c(stream_ptr, &length, &encode_length)
 *     stream_ptr += encode_length             # <<<<<<<<<<<<<<
 *     snmp_ver, community, data = sequence_decode_c(stream_ptr, length)
 *     req_id, error_status, error_index, varbinds = data
 */
  __pyx_v_stream_ptr = (__pyx_v_stream_ptr + __pyx_v_encode_length);

  /* "fastsnmp/snmp_parser.pyx":869
 *     length_decode_c(stream_ptr, &length, &encode_length)
 *     stream_ptr += encode_length
 *     snmp_ver, community, data = sequence_decode_c(stream_ptr, length)             # <<<<<<<<<<<<<<
 *     req_id, error_status, error_index, varbinds = data
 *     return req_id, error_status, error_index, varbinds
 */
  __pyx_t_4 = __pyx_f_8fastsnmp_11snmp_parser_sequence_decode_c(__pyx_v_stream_ptr, __pyx_v_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(__pyx_t_4 != Py_None)) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 869, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 869, __pyx_L1_error)
  }
  if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_7))) __PYX_ERR(0, 869, __pyx_L1_error)
  __pyx_v_snmp_ver = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_community = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_data = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "fastsnmp/snmp_parser.pyx":870
 *     stream_ptr += encode_length
 *     snmp_ver, community, data = sequence_decode_c(stream_ptr, length)
 *     req_id, error_status, error_index, varbinds = data             # <<<<<<<<<<<<<<
 *     return req_id, error_status, error_index, varbinds
 * 
 */
  if (likely(__pyx_v_data != Py_None)) {
    PyObject* sequence = __pyx_v_data;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 870, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_7,&__pyx_t_6,&__pyx_t_5};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 870, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 870, __pyx_L1_error)
  }
  __pyx_v_req_id = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_error_status = __pyx_t_7;
  __pyx_t_7 = 0;
  __pyx_v_error_index = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_varbinds = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "fastsnmp/snmp_parser.pyx":871
 *     snmp_ver, community, data = sequence_decode_c(stream_ptr, length)
 *     req_id, error_status, error_index, varbinds = data
 *     return req_id, error_status, error_index, varbinds             # <<<<<<<<<<<<<<
 * 
 * def check_is_growing(str oid_start not None, str oid_finish not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_req_id);
  __Pyx_GIVEREF(__pyx_v_req_id);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_req_id);
  __Pyx_INCREF(__pyx_v_error_status);
  __Pyx_GIVEREF(__pyx_v_error_status);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_error_status);
  __Pyx_INCREF(__pyx_v_error_index);
  __Pyx_GIVEREF(__pyx_v_error_index);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_error_index);
  __Pyx_INCREF(__pyx_v_varbinds);
  __Pyx_GIVEREF(__pyx_v_varbinds);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_varbinds);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":857
 * 
 * 
 * def msg_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length, 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("fastsnmp.snmp_parser.msg_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_snmp_ver);
  __Pyx_XDECREF(__pyx_v_community);
  __Pyx_XDECREF(__pyx_v_req_id);
  __Pyx_XDECREF(__pyx_v_error_status);
  __Pyx_XDECREF(__pyx_v_error_index);
  __Pyx_XDECREF(__pyx_v_varbinds);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":873
 *     return req_id, error_status, error_index, varbinds
 * 
 * def check_is_growing(str oid_start not None, str oid_finish not None):             # <<<<<<<<<<<<<<
 *     cdef bint is_growing = True
 *     if "." in oid_start:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_37check_is_growing(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_8fastsnmp_11snmp_parser_37check_is_growing = {"check_is_growing", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_37check_is_growing, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_37check_is_growing(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_oid_start = 0;
  PyObject *__pyx_v_oid_finish = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_is_growing (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid_start,&__pyx_n_s_oid_finish,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oid_start,&__pyx_n_s_oid_finish,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid_start)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oid_finish)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("check_is_growing", 1, 2, 2, 1); __PYX_ERR(0, 873, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "check_is_growing") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_oid_start = ((PyObject*)values[0]);
    __pyx_v_oid_finish = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check_is_growing", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.check_is_growing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oid_start), (&PyUnicode_Type), 0, "oid_start", 1))) __PYX_ERR(0, 873, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oid_finish), (&PyUnicode_Type), 0, "oid_finish", 1))) __PYX_ERR(0, 873, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_36check_is_growing(__pyx_self, __pyx_v_oid_start, __pyx_v_oid_finish);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_36check_is_growing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_oid_start, PyObject *__pyx_v_oid_finish) {
  int __pyx_v_is_growing;
  PyObject *__pyx_7genexpr__pyx_v_x = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_is_growing", 0);

  /* "fastsnmp/snmp_parser.pyx":874
 * 
 * def check_is_growing(str oid_start not None, str oid_finish not None):
 *     cdef bint is_growing = True             # <<<<<<<<<<<<<<
 *     if "." in oid_start:
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:
 */
  __pyx_v_is_growing = 1;

  /* "fastsnmp/snmp_parser.pyx":875
 * def check_is_growing(str oid_start not None, str oid_finish not None):
 *     cdef bint is_growing = True
 *     if "." in oid_start:             # <<<<<<<<<<<<<<
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:
 *             is_growing = False
 */
  __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_kp_u_, __pyx_v_oid_start, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":876
 *     cdef bint is_growing = True
 *     if "." in oid_start:
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:             # <<<<<<<<<<<<<<
 *             is_growing = False
 *     elif int(oid_finish) < int(oid_start):
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyUnicode_Split(__pyx_v_oid_finish, __pyx_kp_u_, -1L); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 876, __pyx_L7_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_7genexpr__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 876, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L10_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L10_exit_scope:;
    } /* exit inner scope */
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 876, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyUnicode_Split(__pyx_v_oid_start, __pyx_kp_u_, -1L); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 876, __pyx_L13_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_8genexpr1__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 876, __pyx_L13_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L16_exit_scope;
      __pyx_L13_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L16_exit_scope:;
    } /* exit inner scope */
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 876, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 876, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_2) {

      /* "fastsnmp/snmp_parser.pyx":877
 *     if "." in oid_start:
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:
 *             is_growing = False             # <<<<<<<<<<<<<<
 *     elif int(oid_finish) < int(oid_start):
 *         is_growing = False
 */
      __pyx_v_is_growing = 0;

      /* "fastsnmp/snmp_parser.pyx":876
 *     cdef bint is_growing = True
 *     if "." in oid_start:
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:             # <<<<<<<<<<<<<<
 *             is_growing = False
 *     elif int(oid_finish) < int(oid_start):
 */
    }

    /* "fastsnmp/snmp_parser.pyx":875
 * def check_is_growing(str oid_start not None, str oid_finish not None):
 *     cdef bint is_growing = True
 *     if "." in oid_start:             # <<<<<<<<<<<<<<
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:
 *             is_growing = False
 */
    goto __pyx_L3;
  }

  /* "fastsnmp/snmp_parser.pyx":878
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:
 *             is_growing = False
 *     elif int(oid_finish) < int(oid_start):             # <<<<<<<<<<<<<<
 *         is_growing = False
 *     return is_growing
 */
  __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_oid_finish); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_oid_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "fastsnmp/snmp_parser.pyx":879
 *             is_growing = False
 *     elif int(oid_finish) < int(oid_start):
 *         is_growing = False             # <<<<<<<<<<<<<<
 *     return is_growing
 * 
 */
    __pyx_v_is_growing = 0;

    /* "fastsnmp/snmp_parser.pyx":878
 *         if [int(x) for x in oid_finish.split(".")] < [int(x) for x in oid_start.split(".")]:
 *             is_growing = False
 *     elif int(oid_finish) < int(oid_start):             # <<<<<<<<<<<<<<
 *         is_growing = False
 *     return is_growing
 */
  }
  __pyx_L3:;

  /* "fastsnmp/snmp_parser.pyx":880
 *     elif int(oid_finish) < int(oid_start):
 *         is_growing = False
 *     return is_growing             # <<<<<<<<<<<<<<
 * 
 * def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tuple oids_to_poll not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_growing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":873
 *     return req_id, error_status, error_index, varbinds
 * 
 * def check_is_growing(str oid_start not None, str oid_finish not None):             # <<<<<<<<<<<<<<
 *     cdef bint is_growing = True
 *     if "." in oid_start:
 */

  /* 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_7);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.check_is_growing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fastsnmp/snmp_parser.pyx":882
 *     return is_growing
 * 
 * def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tuple oids_to_poll not None):             # <<<<<<<<<<<<<<
 *     cdef str oid, main_oid, index_part
 *     cdef list result = [], item
 */

/* Python wrapper */
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_39parse_varbind(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_8fastsnmp_11snmp_parser_39parse_varbind = {"parse_varbind", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8fastsnmp_11snmp_parser_39parse_varbind, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8fastsnmp_11snmp_parser_39parse_varbind(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_var_bind_list = 0;
  PyObject *__pyx_v_orig_main_oids = 0;
  PyObject *__pyx_v_oids_to_poll = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_varbind (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var_bind_list,&__pyx_n_s_orig_main_oids,&__pyx_n_s_oids_to_poll,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var_bind_list,&__pyx_n_s_orig_main_oids,&__pyx_n_s_oids_to_poll,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_var_bind_list)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_orig_main_oids)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("parse_varbind", 1, 3, 3, 1); __PYX_ERR(0, 882, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_oids_to_poll)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("parse_varbind", 1, 3, 3, 2); __PYX_ERR(0, 882, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_varbind") < 0)) __PYX_ERR(0, 882, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_var_bind_list = ((PyObject*)values[0]);
    __pyx_v_orig_main_oids = ((PyObject*)values[1]);
    __pyx_v_oids_to_poll = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_varbind", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 882, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("fastsnmp.snmp_parser.parse_varbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var_bind_list), (&PyList_Type), 0, "var_bind_list", 1))) __PYX_ERR(0, 882, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_orig_main_oids), (&PyTuple_Type), 0, "orig_main_oids", 1))) __PYX_ERR(0, 882, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oids_to_poll), (&PyTuple_Type), 0, "oids_to_poll", 1))) __PYX_ERR(0, 882, __pyx_L1_error)
  __pyx_r = __pyx_pf_8fastsnmp_11snmp_parser_38parse_varbind(__pyx_self, __pyx_v_var_bind_list, __pyx_v_orig_main_oids, __pyx_v_oids_to_poll);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8fastsnmp_11snmp_parser_38parse_varbind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_var_bind_list, PyObject *__pyx_v_orig_main_oids, PyObject *__pyx_v_oids_to_poll) {
  PyObject *__pyx_v_oid = 0;
  PyObject *__pyx_v_main_oid = 0;
  PyObject *__pyx_v_index_part = 0;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_next_oids = 0;
  PyObject *__pyx_v_orig_main_oids_doted = 0;
  PyObject *__pyx_v_orig_main_oids_len = 0;
  PyObject *__pyx_v_value = 0;
  uint64_t __pyx_v_main_oids_len;
  PyObject *__pyx_v_rest_oids_positions = NULL;
  PyObject *__pyx_v_main_oids_positions = NULL;
  Py_ssize_t __pyx_v_var_bind_list_len;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_skip_column = NULL;
  PyObject *__pyx_v_last_seen_index = NULL;
  PyObject *__pyx_v_first_seen_index = NULL;
  Py_ssize_t __pyx_v_var_bind_pos;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_main_oids_pos = NULL;
  PyObject *__pyx_v_pos = NULL;
  Py_ssize_t __pyx_8genexpr2__pyx_v_x;
  PyObject *__pyx_8genexpr3__pyx_v_p = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  Py_ssize_t __pyx_t_16;
  Py_UCS4 __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  char const *__pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_varbind", 0);

  /* "fastsnmp/snmp_parser.pyx":884
 * def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tuple oids_to_poll not None):
 *     cdef str oid, main_oid, index_part
 *     cdef list result = [], item             # <<<<<<<<<<<<<<
 *     cdef list next_oids = list()
 *     cdef list orig_main_oids_doted = list()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":885
 *     cdef str oid, main_oid, index_part
 *     cdef list result = [], item
 *     cdef list next_oids = list()             # <<<<<<<<<<<<<<
 *     cdef list orig_main_oids_doted = list()
 *     cdef list orig_main_oids_len = list()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_next_oids = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":886
 *     cdef list result = [], item
 *     cdef list next_oids = list()
 *     cdef list orig_main_oids_doted = list()             # <<<<<<<<<<<<<<
 *     cdef list orig_main_oids_len = list()
 *     cdef object value
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_orig_main_oids_doted = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":887
 *     cdef list next_oids = list()
 *     cdef list orig_main_oids_doted = list()
 *     cdef list orig_main_oids_len = list()             # <<<<<<<<<<<<<<
 *     cdef object value
 *     cdef uint64_t main_oids_len
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_orig_main_oids_len = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":890
 *     cdef object value
 *     cdef uint64_t main_oids_len
 *     rest_oids_positions = [x for x in range(len(oids_to_poll)) if oids_to_poll[x]]             # <<<<<<<<<<<<<<
 *     main_oids_len = len(rest_oids_positions)
 *     main_oids_positions = cycle(rest_oids_positions)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_oids_to_poll); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 890, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_8genexpr2__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(PyTuple_GET_ITEM(__pyx_v_oids_to_poll, __pyx_8genexpr2__pyx_v_x)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 890, __pyx_L1_error)
      if (__pyx_t_5) {
        __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
  } /* exit inner scope */
  __pyx_v_rest_oids_positions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":891
 *     cdef uint64_t main_oids_len
 *     rest_oids_positions = [x for x in range(len(oids_to_poll)) if oids_to_poll[x]]
 *     main_oids_len = len(rest_oids_positions)             # <<<<<<<<<<<<<<
 *     main_oids_positions = cycle(rest_oids_positions)
 *     var_bind_list_len = len(var_bind_list)
 */
  __pyx_t_2 = PyList_GET_SIZE(__pyx_v_rest_oids_positions); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
  __pyx_v_main_oids_len = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":892
 *     rest_oids_positions = [x for x in range(len(oids_to_poll)) if oids_to_poll[x]]
 *     main_oids_len = len(rest_oids_positions)
 *     main_oids_positions = cycle(rest_oids_positions)             # <<<<<<<<<<<<<<
 *     var_bind_list_len = len(var_bind_list)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_cycle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_rest_oids_positions};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_main_oids_positions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":893
 *     main_oids_len = len(rest_oids_positions)
 *     main_oids_positions = cycle(rest_oids_positions)
 *     var_bind_list_len = len(var_bind_list)             # <<<<<<<<<<<<<<
 * 
 *     for i in orig_main_oids:
 */
  __pyx_t_2 = PyList_GET_SIZE(__pyx_v_var_bind_list); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_v_var_bind_list_len = __pyx_t_2;

  /* "fastsnmp/snmp_parser.pyx":895
 *     var_bind_list_len = len(var_bind_list)
 * 
 *     for i in orig_main_oids:             # <<<<<<<<<<<<<<
 *         orig_main_oids_doted.append(i + ".")
 *         orig_main_oids_len.append(len(i))
 */
  __pyx_t_1 = __pyx_v_orig_main_oids; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 895, __pyx_L1_error)
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "fastsnmp/snmp_parser.pyx":896
 * 
 *     for i in orig_main_oids:
 *         orig_main_oids_doted.append(i + ".")             # <<<<<<<<<<<<<<
 *         orig_main_oids_len.append(len(i))
 * 
 */
    __pyx_t_6 = PyNumber_Add(__pyx_v_i, __pyx_kp_u_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_orig_main_oids_doted, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "fastsnmp/snmp_parser.pyx":897
 *     for i in orig_main_oids:
 *         orig_main_oids_doted.append(i + ".")
 *         orig_main_oids_len.append(len(i))             # <<<<<<<<<<<<<<
 * 
 *     skip_column = {}
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_i); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 897, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_orig_main_oids_len, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "fastsnmp/snmp_parser.pyx":895
 *     var_bind_list_len = len(var_bind_list)
 * 
 *     for i in orig_main_oids:             # <<<<<<<<<<<<<<
 *         orig_main_oids_doted.append(i + ".")
 *         orig_main_oids_len.append(len(i))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":899
 *         orig_main_oids_len.append(len(i))
 * 
 *     skip_column = {}             # <<<<<<<<<<<<<<
 *     # if some oid in requested oids is not supported, column with it is index will
 *     # be filled with another oid. need to skip
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_skip_column = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":902
 *     # if some oid in requested oids is not supported, column with it is index will
 *     # be filled with another oid. need to skip
 *     last_seen_index = {}             # <<<<<<<<<<<<<<
 *     first_seen_index = {}
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_last_seen_index = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":903
 *     # be filled with another oid. need to skip
 *     last_seen_index = {}
 *     first_seen_index = {}             # <<<<<<<<<<<<<<
 * 
 *     for var_bind_pos in range(var_bind_list_len):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_first_seen_index = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":905
 *     first_seen_index = {}
 * 
 *     for var_bind_pos in range(var_bind_list_len):             # <<<<<<<<<<<<<<
 *         item = var_bind_list[var_bind_pos]
 *         # if item is None:
 */
  __pyx_t_2 = __pyx_v_var_bind_list_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_var_bind_pos = __pyx_t_4;

    /* "fastsnmp/snmp_parser.pyx":906
 * 
 *     for var_bind_pos in range(var_bind_list_len):
 *         item = var_bind_list[var_bind_pos]             # <<<<<<<<<<<<<<
 *         # if item is None:
 *         #     raise VarBindUnpackException("bad value in %s at %s" % (var_bind_list, var_bind_pos))
 */
    if (!(likely(PyList_CheckExact(PyList_GET_ITEM(__pyx_v_var_bind_list, __pyx_v_var_bind_pos)))||((PyList_GET_ITEM(__pyx_v_var_bind_list, __pyx_v_var_bind_pos)) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", PyList_GET_ITEM(__pyx_v_var_bind_list, __pyx_v_var_bind_pos)))) __PYX_ERR(0, 906, __pyx_L1_error)
    __pyx_t_1 = PyList_GET_ITEM(__pyx_v_var_bind_list, __pyx_v_var_bind_pos);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_item, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "fastsnmp/snmp_parser.pyx":909
 *         # if item is None:
 *         #     raise VarBindUnpackException("bad value in %s at %s" % (var_bind_list, var_bind_pos))
 *         try:             # <<<<<<<<<<<<<<
 *             oid, value = item
 *         except (ValueError, TypeError) as e:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "fastsnmp/snmp_parser.pyx":910
 *         #     raise VarBindUnpackException("bad value in %s at %s" % (var_bind_list, var_bind_pos))
 *         try:
 *             oid, value = item             # <<<<<<<<<<<<<<
 *         except (ValueError, TypeError) as e:
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))
 */
        if (likely(__pyx_v_item != Py_None)) {
          PyObject* sequence = __pyx_v_item;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 910, __pyx_L10_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 910, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 910, __pyx_L10_error)
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 910, __pyx_L10_error)
        __Pyx_XDECREF_SET(__pyx_v_oid, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "fastsnmp/snmp_parser.pyx":909
 *         # if item is None:
 *         #     raise VarBindUnpackException("bad value in %s at %s" % (var_bind_list, var_bind_pos))
 *         try:             # <<<<<<<<<<<<<<
 *             oid, value = item
 *         except (ValueError, TypeError) as e:
 */
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L17_try_end;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "fastsnmp/snmp_parser.pyx":911
 *         try:
 *             oid, value = item
 *         except (ValueError, TypeError) as e:             # <<<<<<<<<<<<<<
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))
 *         if not isinstance(oid, str):
 */
      __pyx_t_8 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("fastsnmp.snmp_parser.parse_varbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 911, __pyx_L12_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_e = __pyx_t_1;
        /*try:*/ {

          /* "fastsnmp/snmp_parser.pyx":912
 *             oid, value = item
 *         except (ValueError, TypeError) as e:
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))             # <<<<<<<<<<<<<<
 *         if not isinstance(oid, str):
 *             raise VarBindContentException("expected oid in str. got %r" % oid)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_VarBindUnpackException); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 912, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 912, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = 0;
          __pyx_t_17 = 127;
          __Pyx_INCREF(__pyx_kp_u_Exception);
          __pyx_t_16 += 11;
          __Pyx_GIVEREF(__pyx_kp_u_Exception);
          PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_kp_u_Exception);
          __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_e), __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 912, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_17;
          __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_18);
          __pyx_t_18 = 0;
          __Pyx_INCREF(__pyx_kp_u_item);
          __pyx_t_16 += 7;
          __Pyx_GIVEREF(__pyx_kp_u_item);
          PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_kp_u_item);
          __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_item), __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 912, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_17;
          __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, __pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 912, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = NULL;
          __pyx_t_8 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_14, function);
              __pyx_t_8 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_18};
            __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 912, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          __Pyx_Raise(__pyx_t_13, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __PYX_ERR(0, 912, __pyx_L23_error)
        }

        /* "fastsnmp/snmp_parser.pyx":911
 *         try:
 *             oid, value = item
 *         except (ValueError, TypeError) as e:             # <<<<<<<<<<<<<<
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))
 *         if not isinstance(oid, str):
 */
        /*finally:*/ {
          __pyx_L23_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 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_18); __pyx_t_18 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __Pyx_XGOTREF(__pyx_t_26);
            __pyx_t_8 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
            }
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23);
            __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
            __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
            goto __pyx_L12_except_error;
          }
        }
      }
      goto __pyx_L12_except_error;
      __pyx_L12_except_error:;

      /* "fastsnmp/snmp_parser.pyx":909
 *         # if item is None:
 *         #     raise VarBindUnpackException("bad value in %s at %s" % (var_bind_list, var_bind_pos))
 *         try:             # <<<<<<<<<<<<<<
 *             oid, value = item
 *         except (ValueError, TypeError) as e:
 */
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L17_try_end:;
    }

    /* "fastsnmp/snmp_parser.pyx":913
 *         except (ValueError, TypeError) as e:
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))
 *         if not isinstance(oid, str):             # <<<<<<<<<<<<<<
 *             raise VarBindContentException("expected oid in str. got %r" % oid)
 *         main_oids_pos = next(main_oids_positions)
 */
    __pyx_t_5 = PyUnicode_Check(__pyx_v_oid); 
    __pyx_t_27 = ((!(__pyx_t_5 != 0)) != 0);
    if (unlikely(__pyx_t_27)) {

      /* "fastsnmp/snmp_parser.pyx":914
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))
 *         if not isinstance(oid, str):
 *             raise VarBindContentException("expected oid in str. got %r" % oid)             # <<<<<<<<<<<<<<
 *         main_oids_pos = next(main_oids_positions)
 *         if value is end_of_mib_view:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_VarBindContentException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_expected_oid_in_str_got_r, __pyx_v_oid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = NULL;
      __pyx_t_19 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_19 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_6};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_19, 1+__pyx_t_19);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 914, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":913
 *         except (ValueError, TypeError) as e:
 *             raise VarBindUnpackException("Exception='%s' item=%s" % (e, item))
 *         if not isinstance(oid, str):             # <<<<<<<<<<<<<<
 *             raise VarBindContentException("expected oid in str. got %r" % oid)
 *         main_oids_pos = next(main_oids_positions)
 */
    }

    /* "fastsnmp/snmp_parser.pyx":915
 *         if not isinstance(oid, str):
 *             raise VarBindContentException("expected oid in str. got %r" % oid)
 *         main_oids_pos = next(main_oids_positions)             # <<<<<<<<<<<<<<
 *         if value is end_of_mib_view:
 *             skip_column[main_oids_pos] = True
 */
    __pyx_t_7 = __Pyx_PyIter_Next(__pyx_v_main_oids_positions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_main_oids_pos, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "fastsnmp/snmp_parser.pyx":916
 *             raise VarBindContentException("expected oid in str. got %r" % oid)
 *         main_oids_pos = next(main_oids_positions)
 *         if value is end_of_mib_view:             # <<<<<<<<<<<<<<
 *             skip_column[main_oids_pos] = True
 *         if main_oids_pos in skip_column:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_end_of_mib_view); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_27 = (__pyx_v_value == __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = (__pyx_t_27 != 0);
    if (__pyx_t_5) {

      /* "fastsnmp/snmp_parser.pyx":917
 *         main_oids_pos = next(main_oids_positions)
 *         if value is end_of_mib_view:
 *             skip_column[main_oids_pos] = True             # <<<<<<<<<<<<<<
 *         if main_oids_pos in skip_column:
 *             continue
 */
      if (unlikely(PyDict_SetItem(__pyx_v_skip_column, __pyx_v_main_oids_pos, Py_True) < 0)) __PYX_ERR(0, 917, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":916
 *             raise VarBindContentException("expected oid in str. got %r" % oid)
 *         main_oids_pos = next(main_oids_positions)
 *         if value is end_of_mib_view:             # <<<<<<<<<<<<<<
 *             skip_column[main_oids_pos] = True
 *         if main_oids_pos in skip_column:
 */
    }

    /* "fastsnmp/snmp_parser.pyx":918
 *         if value is end_of_mib_view:
 *             skip_column[main_oids_pos] = True
 *         if main_oids_pos in skip_column:             # <<<<<<<<<<<<<<
 *             continue
 *         main_oid = orig_main_oids_doted[main_oids_pos]
 */
    __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_main_oids_pos, __pyx_v_skip_column, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
    __pyx_t_27 = (__pyx_t_5 != 0);
    if (__pyx_t_27) {

      /* "fastsnmp/snmp_parser.pyx":919
 *             skip_column[main_oids_pos] = True
 *         if main_oids_pos in skip_column:
 *             continue             # <<<<<<<<<<<<<<
 *         main_oid = orig_main_oids_doted[main_oids_pos]
 *         if oid.startswith(main_oid):
 */
      goto __pyx_L8_continue;

      /* "fastsnmp/snmp_parser.pyx":918
 *         if value is end_of_mib_view:
 *             skip_column[main_oids_pos] = True
 *         if main_oids_pos in skip_column:             # <<<<<<<<<<<<<<
 *             continue
 *         main_oid = orig_main_oids_doted[main_oids_pos]
 */
    }

    /* "fastsnmp/snmp_parser.pyx":920
 *         if main_oids_pos in skip_column:
 *             continue
 *         main_oid = orig_main_oids_doted[main_oids_pos]             # <<<<<<<<<<<<<<
 *         if oid.startswith(main_oid):
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]
 */
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids_doted, __pyx_v_main_oids_pos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_7))) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_main_oid, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "fastsnmp/snmp_parser.pyx":921
 *             continue
 *         main_oid = orig_main_oids_doted[main_oids_pos]
 *         if oid.startswith(main_oid):             # <<<<<<<<<<<<<<
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]
 *             last_seen_index[main_oids_pos] = index_part
 */
    if (unlikely(__pyx_v_oid == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith");
      __PYX_ERR(0, 921, __pyx_L1_error)
    }
    __pyx_t_27 = __Pyx_PyUnicode_Tailmatch(__pyx_v_oid, __pyx_v_main_oid, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_27 == ((int)-1))) __PYX_ERR(0, 921, __pyx_L1_error)
    if ((__pyx_t_27 != 0)) {

      /* "fastsnmp/snmp_parser.pyx":922
 *         main_oid = orig_main_oids_doted[main_oids_pos]
 *         if oid.startswith(main_oid):
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]             # <<<<<<<<<<<<<<
 *             last_seen_index[main_oids_pos] = index_part
 *             if main_oids_pos not in first_seen_index:
 */
      if (unlikely(__pyx_v_oid == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 922, __pyx_L1_error)
      }
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids_len, __pyx_v_main_oids_pos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_27 = (__pyx_t_1 == Py_None);
      if (__pyx_t_27) {
        __pyx_t_16 = 0;
      } else {
        __pyx_t_28 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_28 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
        __pyx_t_16 = __pyx_t_28;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_oid, __pyx_t_16, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_index_part, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "fastsnmp/snmp_parser.pyx":923
 *         if oid.startswith(main_oid):
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]
 *             last_seen_index[main_oids_pos] = index_part             # <<<<<<<<<<<<<<
 *             if main_oids_pos not in first_seen_index:
 *                 first_seen_index[main_oids_pos] = index_part
 */
      if (unlikely(PyDict_SetItem(__pyx_v_last_seen_index, __pyx_v_main_oids_pos, __pyx_v_index_part) < 0)) __PYX_ERR(0, 923, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":924
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]
 *             last_seen_index[main_oids_pos] = index_part
 *             if main_oids_pos not in first_seen_index:             # <<<<<<<<<<<<<<
 *                 first_seen_index[main_oids_pos] = index_part
 * 
 */
      __pyx_t_27 = (__Pyx_PyDict_ContainsTF(__pyx_v_main_oids_pos, __pyx_v_first_seen_index, Py_NE)); if (unlikely(__pyx_t_27 < 0)) __PYX_ERR(0, 924, __pyx_L1_error)
      __pyx_t_5 = (__pyx_t_27 != 0);
      if (__pyx_t_5) {

        /* "fastsnmp/snmp_parser.pyx":925
 *             last_seen_index[main_oids_pos] = index_part
 *             if main_oids_pos not in first_seen_index:
 *                 first_seen_index[main_oids_pos] = index_part             # <<<<<<<<<<<<<<
 * 
 *             result.append([orig_main_oids[main_oids_pos], index_part, value])
 */
        if (unlikely(PyDict_SetItem(__pyx_v_first_seen_index, __pyx_v_main_oids_pos, __pyx_v_index_part) < 0)) __PYX_ERR(0, 925, __pyx_L1_error)

        /* "fastsnmp/snmp_parser.pyx":924
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]
 *             last_seen_index[main_oids_pos] = index_part
 *             if main_oids_pos not in first_seen_index:             # <<<<<<<<<<<<<<
 *                 first_seen_index[main_oids_pos] = index_part
 * 
 */
      }

      /* "fastsnmp/snmp_parser.pyx":927
 *                 first_seen_index[main_oids_pos] = index_part
 * 
 *             result.append([orig_main_oids[main_oids_pos], index_part, value])             # <<<<<<<<<<<<<<
 *         else:
 *             skip_column[main_oids_pos] = True
 */
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids, __pyx_v_main_oids_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_index_part);
      __Pyx_GIVEREF(__pyx_v_index_part);
      PyList_SET_ITEM(__pyx_t_7, 1, __pyx_v_index_part);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyList_SET_ITEM(__pyx_t_7, 2, __pyx_v_value);
      __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "fastsnmp/snmp_parser.pyx":921
 *             continue
 *         main_oid = orig_main_oids_doted[main_oids_pos]
 *         if oid.startswith(main_oid):             # <<<<<<<<<<<<<<
 *             index_part = oid[orig_main_oids_len[main_oids_pos]+1:]
 *             last_seen_index[main_oids_pos] = index_part
 */
      goto __pyx_L32;
    }

    /* "fastsnmp/snmp_parser.pyx":929
 *             result.append([orig_main_oids[main_oids_pos], index_part, value])
 *         else:
 *             skip_column[main_oids_pos] = True             # <<<<<<<<<<<<<<
 *             if len(skip_column) == var_bind_list_len:
 *                 break
 */
    /*else*/ {
      if (unlikely(PyDict_SetItem(__pyx_v_skip_column, __pyx_v_main_oids_pos, Py_True) < 0)) __PYX_ERR(0, 929, __pyx_L1_error)

      /* "fastsnmp/snmp_parser.pyx":930
 *         else:
 *             skip_column[main_oids_pos] = True
 *             if len(skip_column) == var_bind_list_len:             # <<<<<<<<<<<<<<
 *                 break
 *     if len(skip_column) < main_oids_len:
 */
      __pyx_t_16 = PyDict_Size(__pyx_v_skip_column); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 930, __pyx_L1_error)
      __pyx_t_5 = ((__pyx_t_16 == __pyx_v_var_bind_list_len) != 0);
      if (__pyx_t_5) {

        /* "fastsnmp/snmp_parser.pyx":931
 *             skip_column[main_oids_pos] = True
 *             if len(skip_column) == var_bind_list_len:
 *                 break             # <<<<<<<<<<<<<<
 *     if len(skip_column) < main_oids_len:
 *         if len(skip_column):
 */
        goto __pyx_L9_break;

        /* "fastsnmp/snmp_parser.pyx":930
 *         else:
 *             skip_column[main_oids_pos] = True
 *             if len(skip_column) == var_bind_list_len:             # <<<<<<<<<<<<<<
 *                 break
 *     if len(skip_column) < main_oids_len:
 */
      }
    }
    __pyx_L32:;
    __pyx_L8_continue:;
  }
  __pyx_L9_break:;

  /* "fastsnmp/snmp_parser.pyx":932
 *             if len(skip_column) == var_bind_list_len:
 *                 break
 *     if len(skip_column) < main_oids_len:             # <<<<<<<<<<<<<<
 *         if len(skip_column):
 *             next_oids = [None,] * len(orig_main_oids)
 */
  __pyx_t_2 = PyDict_Size(__pyx_v_skip_column); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 932, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_2 < __pyx_v_main_oids_len) != 0);
  if (__pyx_t_5) {

    /* "fastsnmp/snmp_parser.pyx":933
 *                 break
 *     if len(skip_column) < main_oids_len:
 *         if len(skip_column):             # <<<<<<<<<<<<<<
 *             next_oids = [None,] * len(orig_main_oids)
 *             for pos in rest_oids_positions:
 */
    __pyx_t_2 = PyDict_Size(__pyx_v_skip_column); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 933, __pyx_L1_error)
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (__pyx_t_5) {

      /* "fastsnmp/snmp_parser.pyx":934
 *     if len(skip_column) < main_oids_len:
 *         if len(skip_column):
 *             next_oids = [None,] * len(orig_main_oids)             # <<<<<<<<<<<<<<
 *             for pos in rest_oids_positions:
 *                 if pos in skip_column:
 */
      __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_orig_main_oids); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 934, __pyx_L1_error)
      __pyx_t_7 = PyList_New(1 * ((__pyx_t_2<0) ? 0:__pyx_t_2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      { Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < __pyx_t_2; __pyx_temp++) {
          __Pyx_INCREF(Py_None);
          __Pyx_GIVEREF(Py_None);
          PyList_SET_ITEM(__pyx_t_7, __pyx_temp, Py_None);
        }
      }
      __Pyx_DECREF_SET(__pyx_v_next_oids, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "fastsnmp/snmp_parser.pyx":935
 *         if len(skip_column):
 *             next_oids = [None,] * len(orig_main_oids)
 *             for pos in rest_oids_positions:             # <<<<<<<<<<<<<<
 *                 if pos in skip_column:
 *                     continue
 */
      __pyx_t_7 = __pyx_v_rest_oids_positions; __Pyx_INCREF(__pyx_t_7); __pyx_t_2 = 0;
      for (;;) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 935, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "fastsnmp/snmp_parser.pyx":936
 *             next_oids = [None,] * len(orig_main_oids)
 *             for pos in rest_oids_positions:
 *                 if pos in skip_column:             # <<<<<<<<<<<<<<
 *                     continue
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 */
        __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_pos, __pyx_v_skip_column, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
        __pyx_t_27 = (__pyx_t_5 != 0);
        if (__pyx_t_27) {

          /* "fastsnmp/snmp_parser.pyx":937
 *             for pos in rest_oids_positions:
 *                 if pos in skip_column:
 *                     continue             # <<<<<<<<<<<<<<
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 */
          goto __pyx_L37_continue;

          /* "fastsnmp/snmp_parser.pyx":936
 *             next_oids = [None,] * len(orig_main_oids)
 *             for pos in rest_oids_positions:
 *                 if pos in skip_column:             # <<<<<<<<<<<<<<
 *                     continue
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 */
        }

        /* "fastsnmp/snmp_parser.pyx":938
 *                 if pos in skip_column:
 *                     continue
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])             # <<<<<<<<<<<<<<
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 */
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = 0;
        __pyx_t_17 = 127;
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids, __pyx_v_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_17;
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13);
        __pyx_t_13 = 0;
        __Pyx_INCREF(__pyx_kp_u_);
        __pyx_t_3 += 1;
        __Pyx_GIVEREF(__pyx_kp_u_);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_);
        __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_last_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_13), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_17;
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_17); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_next_oids, __pyx_v_pos, __pyx_t_6) < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "fastsnmp/snmp_parser.pyx":939
 *                     continue
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):             # <<<<<<<<<<<<<<
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_check_is_growing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_first_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_last_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_18 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_18)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_19 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_18, __pyx_t_13, __pyx_t_14};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_19, 2+__pyx_t_19);
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          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_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_27 < 0)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_5 = ((!__pyx_t_27) != 0);
        if (unlikely(__pyx_t_5)) {

          /* "fastsnmp/snmp_parser.pyx":940
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],             # <<<<<<<<<<<<<<
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))
 */
          __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = 0;
          __pyx_t_17 = 127;
          __Pyx_INCREF(__pyx_kp_u_not_increasing);
          __pyx_t_3 += 15;
          __Pyx_GIVEREF(__pyx_kp_u_not_increasing);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_not_increasing);
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_last_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 940, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14);
          __pyx_t_14 = 0;
          __Pyx_INCREF(__pyx_kp_u_vs);
          __pyx_t_3 += 4;
          __Pyx_GIVEREF(__pyx_kp_u_vs);
          PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_vs);

          /* "fastsnmp/snmp_parser.pyx":941
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],             # <<<<<<<<<<<<<<
 *                                                                         orig_main_oids[pos]))
 *         else:
 */
          __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_first_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 941, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_14), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_1);
          __pyx_t_1 = 0;
          __Pyx_INCREF(__pyx_kp_u_for);
          __pyx_t_3 += 5;
          __Pyx_GIVEREF(__pyx_kp_u_for);
          PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_for);

          /* "fastsnmp/snmp_parser.pyx":942
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))             # <<<<<<<<<<<<<<
 *         else:
 *             for pos in rest_oids_positions:
 */
          __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids, __pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 942, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_14);
          __pyx_t_14 = 0;

          /* "fastsnmp/snmp_parser.pyx":940
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],             # <<<<<<<<<<<<<<
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))
 */
          __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_6, 6, __pyx_t_3, __pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 940, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 940, __pyx_L1_error)

          /* "fastsnmp/snmp_parser.pyx":939
 *                     continue
 *                 next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos])
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):             # <<<<<<<<<<<<<<
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],
 */
        }

        /* "fastsnmp/snmp_parser.pyx":935
 *         if len(skip_column):
 *             next_oids = [None,] * len(orig_main_oids)
 *             for pos in rest_oids_positions:             # <<<<<<<<<<<<<<
 *                 if pos in skip_column:
 *                     continue
 */
        __pyx_L37_continue:;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "fastsnmp/snmp_parser.pyx":933
 *                 break
 *     if len(skip_column) < main_oids_len:
 *         if len(skip_column):             # <<<<<<<<<<<<<<
 *             next_oids = [None,] * len(orig_main_oids)
 *             for pos in rest_oids_positions:
 */
      goto __pyx_L36;
    }

    /* "fastsnmp/snmp_parser.pyx":944
 *                                                                         orig_main_oids[pos]))
 *         else:
 *             for pos in rest_oids_positions:             # <<<<<<<<<<<<<<
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 */
    /*else*/ {
      __pyx_t_7 = __pyx_v_rest_oids_positions; __Pyx_INCREF(__pyx_t_7); __pyx_t_2 = 0;
      for (;;) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 944, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "fastsnmp/snmp_parser.pyx":945
 *         else:
 *             for pos in rest_oids_positions:
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):             # <<<<<<<<<<<<<<
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],
 */
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_check_is_growing); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_first_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_last_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_18 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_18)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_19 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_18, __pyx_t_1, __pyx_t_13};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_19, 2+__pyx_t_19);
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_27 = ((!__pyx_t_5) != 0);
        if (unlikely(__pyx_t_27)) {

          /* "fastsnmp/snmp_parser.pyx":946
 *             for pos in rest_oids_positions:
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],             # <<<<<<<<<<<<<<
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))
 */
          __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = 0;
          __pyx_t_17 = 127;
          __Pyx_INCREF(__pyx_kp_u_not_increasing);
          __pyx_t_3 += 15;
          __Pyx_GIVEREF(__pyx_kp_u_not_increasing);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_not_increasing);
          __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_last_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 946, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_14), __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 946, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_13);
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_13);
          __pyx_t_13 = 0;
          __Pyx_INCREF(__pyx_kp_u_vs);
          __pyx_t_3 += 4;
          __Pyx_GIVEREF(__pyx_kp_u_vs);
          PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_vs);

          /* "fastsnmp/snmp_parser.pyx":947
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],             # <<<<<<<<<<<<<<
 *                                                                         orig_main_oids[pos]))
 *             next_oids = [
 */
          __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_first_seen_index, __pyx_v_pos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 947, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_13), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 947, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_14);
          __pyx_t_14 = 0;
          __Pyx_INCREF(__pyx_kp_u_for);
          __pyx_t_3 += 5;
          __Pyx_GIVEREF(__pyx_kp_u_for);
          PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_for);

          /* "fastsnmp/snmp_parser.pyx":948
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))             # <<<<<<<<<<<<<<
 *             next_oids = [
 *                 "%s.%s" % (orig_main_oids[p], last_seen_index[p]) for p in rest_oids_positions]
 */
          __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids, __pyx_v_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 948, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_14), __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 948, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_13);
          PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_13);
          __pyx_t_13 = 0;

          /* "fastsnmp/snmp_parser.pyx":946
 *             for pos in rest_oids_positions:
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],             # <<<<<<<<<<<<<<
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))
 */
          __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_6, 6, __pyx_t_3, __pyx_t_17); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 946, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 946, __pyx_L1_error)

          /* "fastsnmp/snmp_parser.pyx":945
 *         else:
 *             for pos in rest_oids_positions:
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):             # <<<<<<<<<<<<<<
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 *                                                                         first_seen_index[pos],
 */
        }

        /* "fastsnmp/snmp_parser.pyx":944
 *                                                                         orig_main_oids[pos]))
 *         else:
 *             for pos in rest_oids_positions:             # <<<<<<<<<<<<<<
 *                 if not check_is_growing(first_seen_index[pos], last_seen_index[pos]):
 *                     raise Exception("not increasing %s vs %s for %s" % (last_seen_index[pos],
 */
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "fastsnmp/snmp_parser.pyx":949
 *                                                                         first_seen_index[pos],
 *                                                                         orig_main_oids[pos]))
 *             next_oids = [             # <<<<<<<<<<<<<<
 *                 "%s.%s" % (orig_main_oids[p], last_seen_index[p]) for p in rest_oids_positions]
 *     return result, tuple(next_oids)
 */
      { /* enter inner scope */
        __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L46_error)
        __Pyx_GOTREF(__pyx_t_7);

        /* "fastsnmp/snmp_parser.pyx":950
 *                                                                         orig_main_oids[pos]))
 *             next_oids = [
 *                 "%s.%s" % (orig_main_oids[p], last_seen_index[p]) for p in rest_oids_positions]             # <<<<<<<<<<<<<<
 *     return result, tuple(next_oids)
 * 
 */
        __pyx_t_6 = __pyx_v_rest_oids_positions; __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = 0;
        for (;;) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_13 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_13); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 950, __pyx_L46_error)
          #else
          __pyx_t_13 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_13);
          #endif
          __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_p, __pyx_t_13);
          __pyx_t_13 = 0;
          __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_3 = 0;
          __pyx_t_17 = 127;
          __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_orig_main_oids, __pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_14), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1);
          __pyx_t_1 = 0;
          __Pyx_INCREF(__pyx_kp_u_);
          __pyx_t_3 += 1;
          __Pyx_GIVEREF(__pyx_kp_u_);
          PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_kp_u_);
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_last_seen_index, __pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_17;
          __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_14);
          __pyx_t_14 = 0;
          __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 3, __pyx_t_3, __pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 950, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_14))) __PYX_ERR(0, 949, __pyx_L46_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_p); __pyx_8genexpr3__pyx_v_p = 0;
        goto __pyx_L49_exit_scope;
        __pyx_L46_error:;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_p); __pyx_8genexpr3__pyx_v_p = 0;
        goto __pyx_L1_error;
        __pyx_L49_exit_scope:;
      } /* exit inner scope */
      __Pyx_DECREF_SET(__pyx_v_next_oids, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;
    }
    __pyx_L36:;

    /* "fastsnmp/snmp_parser.pyx":932
 *             if len(skip_column) == var_bind_list_len:
 *                 break
 *     if len(skip_column) < main_oids_len:             # <<<<<<<<<<<<<<
 *         if len(skip_column):
 *             next_oids = [None,] * len(orig_main_oids)
 */
  }

  /* "fastsnmp/snmp_parser.pyx":951
 *             next_oids = [
 *                 "%s.%s" % (orig_main_oids[p], last_seen_index[p]) for p in rest_oids_positions]
 *     return result, tuple(next_oids)             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyList_AsTuple(__pyx_v_next_oids); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "fastsnmp/snmp_parser.pyx":882
 *     return is_growing
 * 
 * def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tuple oids_to_poll not None):             # <<<<<<<<<<<<<<
 *     cdef str oid, main_oid, index_part
 *     cdef list result = [], item
 */

  /* 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_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("fastsnmp.snmp_parser.parse_varbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_oid);
  __Pyx_XDECREF(__pyx_v_main_oid);
  __Pyx_XDECREF(__pyx_v_index_part);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_next_oids);
  __Pyx_XDECREF(__pyx_v_orig_main_oids_doted);
  __Pyx_XDECREF(__pyx_v_orig_main_oids_len);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_rest_oids_positions);
  __Pyx_XDECREF(__pyx_v_main_oids_positions);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_skip_column);
  __Pyx_XDECREF(__pyx_v_last_seen_index);
  __Pyx_XDECREF(__pyx_v_first_seen_index);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_main_oids_pos);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_p);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#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
/* #### Code section: pystring_table ### */

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  #if CYTHON_COMPILING_IN_LIMITED_API
  {0, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 0, 0},
  {0, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 0, 1},
  {0, __pyx_k_ASN_SNMP_MSG_TYPES, sizeof(__pyx_k_ASN_SNMP_MSG_TYPES), 0, 0, 1, 1},
  {0, __pyx_k_Counter32, sizeof(__pyx_k_Counter32), 0, 1, 0, 1},
  {0, __pyx_k_Counter64, sizeof(__pyx_k_Counter64), 0, 1, 0, 1},
  {0, __pyx_k_EndOfMibView, sizeof(__pyx_k_EndOfMibView), 0, 0, 1, 1},
  {0, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 1, 0, 0},
  {0, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 0, 1},
  {0, __pyx_k_Get, sizeof(__pyx_k_Get), 0, 1, 0, 1},
  {0, __pyx_k_GetBulk, sizeof(__pyx_k_GetBulk), 0, 1, 0, 1},
  {0, __pyx_k_GetNext, sizeof(__pyx_k_GetNext), 0, 1, 0, 1},
  {0, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 1, 0, 1},
  {0, __pyx_k_NoSuchInstance, sizeof(__pyx_k_NoSuchInstance), 0, 0, 1, 1},
  {0, __pyx_k_NoSuchObject, sizeof(__pyx_k_NoSuchObject), 0, 0, 1, 1},
  {0, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {0, __pyx_k_Null, sizeof(__pyx_k_Null), 0, 1, 0, 1},
  {0, __pyx_k_ObjectID, sizeof(__pyx_k_ObjectID), 0, 1, 0, 1},
  {0, __pyx_k_OctetString, sizeof(__pyx_k_OctetString), 0, 1, 0, 1},
  {0, __pyx_k_Response, sizeof(__pyx_k_Response), 0, 1, 0, 1},
  {0, __pyx_k_SID1, sizeof(__pyx_k_SID1), 0, 1, 0, 1},
  {0, __pyx_k_SID2, sizeof(__pyx_k_SID2), 0, 1, 0, 1},
  {0, __pyx_k_SNMPException, sizeof(__pyx_k_SNMPException), 0, 0, 1, 1},
  {0, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 1, 0, 1},
  {0, __pyx_k_Set, sizeof(__pyx_k_Set), 0, 1, 0, 1},
  {0, __pyx_k_TYPE_NAME_TO_TYPE, sizeof(__pyx_k_TYPE_NAME_TO_TYPE), 0, 0, 1, 1},
  {0, __pyx_k_Trap, sizeof(__pyx_k_Trap), 0, 1, 0, 1},
  {0, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {0, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {0, __pyx_k_VarBindContentException, sizeof(__pyx_k_VarBindContentException), 0, 0, 1, 1},
  {0, __pyx_k_VarBindUnpackException, sizeof(__pyx_k_VarBindUnpackException), 0, 0, 1, 1},
  {0, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 0, 0},
  {0, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 0, 0},
  {0, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0},
  {0, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 0, 0},
  {0, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 0, 0},
  {0, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 1},
  {0, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 0, 0},
  {0, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 0, 0},
  {0, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 0, 0},
  {0, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 0, 0},
  {0, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 0, 0},
  {0, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 0, 0},
  {0, __pyx_k__65, sizeof(__pyx_k__65), 0, 0, 1, 1},
  {0, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 0, 0},
  {0, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 0, 0},
  {0, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1},
  {0, __pyx_k_check_is_growing, sizeof(__pyx_k_check_is_growing), 0, 0, 1, 1},
  {0, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
  {0, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {0, __pyx_k_community, sizeof(__pyx_k_community), 0, 0, 1, 1},
  {0, __pyx_k_community_len, sizeof(__pyx_k_community_len), 0, 0, 1, 1},
  {0, __pyx_k_community_type, sizeof(__pyx_k_community_type), 0, 0, 1, 1},
  {0, __pyx_k_community_value, sizeof(__pyx_k_community_value), 0, 0, 1, 1},
  {0, __pyx_k_cycle, sizeof(__pyx_k_cycle), 0, 0, 1, 1},
  {0, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {0, __pyx_k_data_len, sizeof(__pyx_k_data_len), 0, 0, 1, 1},
  {0, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {0, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {0, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {0, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {0, __pyx_k_encode_length, sizeof(__pyx_k_encode_length), 0, 0, 1, 1},
  {0, __pyx_k_encode_varbind, sizeof(__pyx_k_encode_varbind), 0, 0, 1, 1},
  {0, __pyx_k_end_of_content, sizeof(__pyx_k_end_of_content), 0, 1, 0, 0},
  {0, __pyx_k_end_of_mib_view, sizeof(__pyx_k_end_of_mib_view), 0, 0, 1, 1},
  {0, __pyx_k_error_index, sizeof(__pyx_k_error_index), 0, 0, 1, 1},
  {0, __pyx_k_error_index_len, sizeof(__pyx_k_error_index_len), 0, 0, 1, 1},
  {0, __pyx_k_error_index_type, sizeof(__pyx_k_error_index_type), 0, 0, 1, 1},
  {0, __pyx_k_error_index_value, sizeof(__pyx_k_error_index_value), 0, 0, 1, 1},
  {0, __pyx_k_error_status, sizeof(__pyx_k_error_status), 0, 0, 1, 1},
  {0, __pyx_k_error_status_len, sizeof(__pyx_k_error_status_len), 0, 0, 1, 1},
  {0, __pyx_k_error_status_type, sizeof(__pyx_k_error_status_type), 0, 0, 1, 1},
  {0, __pyx_k_error_status_value, sizeof(__pyx_k_error_status_value), 0, 0, 1, 1},
  {0, __pyx_k_expected_oid_in_str_got_r, sizeof(__pyx_k_expected_oid_in_str_got_r), 0, 1, 0, 0},
  {0, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 0},
  {0, __pyx_k_fastsnmp_snmp_parser, sizeof(__pyx_k_fastsnmp_snmp_parser), 0, 0, 1, 1},
  {0, __pyx_k_fastsnmp_snmp_parser_pyx, sizeof(__pyx_k_fastsnmp_snmp_parser_pyx), 0, 0, 1, 0},
  {0, __pyx_k_first_seen_index, sizeof(__pyx_k_first_seen_index), 0, 0, 1, 1},
  {0, __pyx_k_for, sizeof(__pyx_k_for), 0, 1, 0, 0},
  {0, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {0, __pyx_k_idlist, sizeof(__pyx_k_idlist), 0, 0, 1, 1},
  {0, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {0, __pyx_k_index_part, sizeof(__pyx_k_index_part), 0, 0, 1, 1},
  {0, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
  {0, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {0, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
  {0, __pyx_k_integer_decode, sizeof(__pyx_k_integer_decode), 0, 0, 1, 1},
  {0, __pyx_k_integer_encode, sizeof(__pyx_k_integer_encode), 0, 0, 1, 1},
  {0, __pyx_k_is_growing, sizeof(__pyx_k_is_growing), 0, 0, 1, 1},
  {0, __pyx_k_item, sizeof(__pyx_k_item), 0, 1, 0, 0},
  {0, __pyx_k_item_2, sizeof(__pyx_k_item_2), 0, 0, 1, 1},
  {0, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {0, __pyx_k_last_seen_index, sizeof(__pyx_k_last_seen_index), 0, 0, 1, 1},
  {0, __pyx_k_length, sizeof(__pyx_k_length), 0, 1, 0, 0},
  {0, __pyx_k_length_2, sizeof(__pyx_k_length_2), 0, 0, 1, 1},
  {0, __pyx_k_length_cache, sizeof(__pyx_k_length_cache), 0, 0, 1, 1},
  {0, __pyx_k_length_decode, sizeof(__pyx_k_length_decode), 0, 0, 1, 1},
  {0, __pyx_k_length_encode, sizeof(__pyx_k_length_encode), 0, 0, 1, 1},
  {0, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
  {0, __pyx_k_long_SID1_is_not_supported, sizeof(__pyx_k_long_SID1_is_not_supported), 0, 1, 0, 0},
  {0, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {0, __pyx_k_main_oid, sizeof(__pyx_k_main_oid), 0, 0, 1, 1},
  {0, __pyx_k_main_oids_len, sizeof(__pyx_k_main_oids_len), 0, 0, 1, 1},
  {0, __pyx_k_main_oids_pos, sizeof(__pyx_k_main_oids_pos), 0, 0, 1, 1},
  {0, __pyx_k_main_oids_positions, sizeof(__pyx_k_main_oids_positions), 0, 0, 1, 1},
  {0, __pyx_k_max_repetitions, sizeof(__pyx_k_max_repetitions), 0, 0, 1, 1},
  {0, __pyx_k_max_repetitions_len, sizeof(__pyx_k_max_repetitions_len), 0, 0, 1, 1},
  {0, __pyx_k_max_repetitions_must_be_higher_t, sizeof(__pyx_k_max_repetitions_must_be_higher_t), 0, 1, 0, 0},
  {0, __pyx_k_max_repetitions_type, sizeof(__pyx_k_max_repetitions_type), 0, 0, 1, 1},
  {0, __pyx_k_max_repetitions_value, sizeof(__pyx_k_max_repetitions_value), 0, 0, 1, 1},
  {0, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {0, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {0, __pyx_k_msg_decode, sizeof(__pyx_k_msg_decode), 0, 0, 1, 1},
  {0, __pyx_k_msg_encode, sizeof(__pyx_k_msg_encode), 0, 0, 1, 1},
  {0, __pyx_k_msg_type, sizeof(__pyx_k_msg_type), 0, 0, 1, 1},
  {0, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {0, __pyx_k_next_oids, sizeof(__pyx_k_next_oids), 0, 0, 1, 1},
  {0, __pyx_k_non_repeaters, sizeof(__pyx_k_non_repeaters), 0, 0, 1, 1},
  {0, __pyx_k_non_repeaters_len, sizeof(__pyx_k_non_repeaters_len), 0, 0, 1, 1},
  {0, __pyx_k_non_repeaters_type, sizeof(__pyx_k_non_repeaters_type), 0, 0, 1, 1},
  {0, __pyx_k_non_repeaters_value, sizeof(__pyx_k_non_repeaters_value), 0, 0, 1, 1},
  {0, __pyx_k_not_implement_coder_for_s, sizeof(__pyx_k_not_implement_coder_for_s), 0, 1, 0, 0},
  {0, __pyx_k_not_increasing, sizeof(__pyx_k_not_increasing), 0, 1, 0, 0},
  {0, __pyx_k_numOctets, sizeof(__pyx_k_numOctets), 0, 0, 1, 1},
  {0, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
  {0, __pyx_k_obj_id_len, sizeof(__pyx_k_obj_id_len), 0, 0, 1, 1},
  {0, __pyx_k_obj_id_type, sizeof(__pyx_k_obj_id_type), 0, 0, 1, 1},
  {0, __pyx_k_obj_id_value, sizeof(__pyx_k_obj_id_value), 0, 0, 1, 1},
  {0, __pyx_k_obj_value_len, sizeof(__pyx_k_obj_value_len), 0, 0, 1, 1},
  {0, __pyx_k_obj_value_type, sizeof(__pyx_k_obj_value_type), 0, 0, 1, 1},
  {0, __pyx_k_obj_value_value, sizeof(__pyx_k_obj_value_value), 0, 0, 1, 1},
  {0, __pyx_k_object_len, sizeof(__pyx_k_object_len), 0, 0, 1, 1},
  {0, __pyx_k_objectid_decode, sizeof(__pyx_k_objectid_decode), 0, 0, 1, 1},
  {0, __pyx_k_objectid_encode, sizeof(__pyx_k_objectid_encode), 0, 0, 1, 1},
  {0, __pyx_k_octetstring_decode, sizeof(__pyx_k_octetstring_decode), 0, 0, 1, 1},
  {0, __pyx_k_octetstring_encode, sizeof(__pyx_k_octetstring_encode), 0, 0, 1, 1},
  {0, __pyx_k_oid, sizeof(__pyx_k_oid), 0, 0, 1, 1},
  {0, __pyx_k_oid_finish, sizeof(__pyx_k_oid_finish), 0, 0, 1, 1},
  {0, __pyx_k_oid_start, sizeof(__pyx_k_oid_start), 0, 0, 1, 1},
  {0, __pyx_k_oids_to_poll, sizeof(__pyx_k_oids_to_poll), 0, 0, 1, 1},
  {0, __pyx_k_opaque_len_s_1, sizeof(__pyx_k_opaque_len_s_1), 0, 1, 0, 0},
  {0, __pyx_k_orig_main_oids, sizeof(__pyx_k_orig_main_oids), 0, 0, 1, 1},
  {0, __pyx_k_orig_main_oids_doted, sizeof(__pyx_k_orig_main_oids_doted), 0, 0, 1, 1},
  {0, __pyx_k_orig_main_oids_len, sizeof(__pyx_k_orig_main_oids_len), 0, 0, 1, 1},
  {0, __pyx_k_out_of_len_current_stream_pos, sizeof(__pyx_k_out_of_len_current_stream_pos), 0, 1, 0, 0},
  {0, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
  {0, __pyx_k_parse_varbind, sizeof(__pyx_k_parse_varbind), 0, 0, 1, 1},
  {0, __pyx_k_pdu, sizeof(__pyx_k_pdu), 0, 0, 1, 1},
  {0, __pyx_k_pdu_len, sizeof(__pyx_k_pdu_len), 0, 0, 1, 1},
  {0, __pyx_k_pdu_type, sizeof(__pyx_k_pdu_type), 0, 0, 1, 1},
  {0, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {0, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {0, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {0, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {0, __pyx_k_req_id, sizeof(__pyx_k_req_id), 0, 0, 1, 1},
  {0, __pyx_k_request_id_len, sizeof(__pyx_k_request_id_len), 0, 0, 1, 1},
  {0, __pyx_k_request_id_type, sizeof(__pyx_k_request_id_type), 0, 0, 1, 1},
  {0, __pyx_k_request_id_value, sizeof(__pyx_k_request_id_value), 0, 0, 1, 1},
  {0, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {0, __pyx_k_rest_oids_positions, sizeof(__pyx_k_rest_oids_positions), 0, 0, 1, 1},
  {0, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {0, __pyx_k_resultlist, sizeof(__pyx_k_resultlist), 0, 0, 1, 1},
  {0, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
  {0, __pyx_k_ret_length, sizeof(__pyx_k_ret_length), 0, 0, 1, 1},
  {0, __pyx_k_ret_str, sizeof(__pyx_k_ret_str), 0, 0, 1, 1},
  {0, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {0, __pyx_k_seq_tag, sizeof(__pyx_k_seq_tag), 0, 0, 1, 1},
  {0, __pyx_k_sequence_decode, sizeof(__pyx_k_sequence_decode), 0, 0, 1, 1},
  {0, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
  {0, __pyx_k_skip_column, sizeof(__pyx_k_skip_column), 0, 0, 1, 1},
  {0, __pyx_k_slen, sizeof(__pyx_k_slen), 0, 0, 1, 1},
  {0, __pyx_k_snmp_message_len, sizeof(__pyx_k_snmp_message_len), 0, 0, 1, 1},
  {0, __pyx_k_snmp_message_type, sizeof(__pyx_k_snmp_message_type), 0, 0, 1, 1},
  {0, __pyx_k_snmp_message_value, sizeof(__pyx_k_snmp_message_value), 0, 0, 1, 1},
  {0, __pyx_k_snmp_ver, sizeof(__pyx_k_snmp_ver), 0, 0, 1, 1},
  {0, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {0, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {0, __pyx_k_str, sizeof(__pyx_k_str), 0, 1, 0, 1},
  {0, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {0, __pyx_k_stream_char, sizeof(__pyx_k_stream_char), 0, 0, 1, 1},
  {0, __pyx_k_stream_len, sizeof(__pyx_k_stream_len), 0, 1, 0, 0},
  {0, __pyx_k_stream_len_2, sizeof(__pyx_k_stream_len_2), 0, 0, 1, 1},
  {0, __pyx_k_stream_ptr, sizeof(__pyx_k_stream_ptr), 0, 0, 1, 1},
  {0, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
  {0, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {0, __pyx_k_strlen, sizeof(__pyx_k_strlen), 0, 1, 0, 1},
  {0, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {0, __pyx_k_subid, sizeof(__pyx_k_subid), 0, 0, 1, 1},
  {0, __pyx_k_subidlist, sizeof(__pyx_k_subidlist), 0, 0, 1, 1},
  {0, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {0, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 1, 0, 0},
  {0, __pyx_k_tag_2, sizeof(__pyx_k_tag_2), 0, 0, 1, 1},
  {0, __pyx_k_tag_decode, sizeof(__pyx_k_tag_decode), 0, 0, 1, 1},
  {0, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, __pyx_k_tmp_length, sizeof(__pyx_k_tmp_length), 0, 0, 1, 1},
  {0, __pyx_k_too_long_oid, sizeof(__pyx_k_too_long_oid), 0, 1, 0, 0},
  {0, __pyx_k_uinteger_decode, sizeof(__pyx_k_uinteger_decode), 0, 0, 1, 1},
  {0, __pyx_k_uinteger_encode, sizeof(__pyx_k_uinteger_encode), 0, 0, 1, 1},
  {0, __pyx_k_unknown_float_len_s, sizeof(__pyx_k_unknown_float_len_s), 0, 1, 0, 0},
  {0, __pyx_k_unknown_tag_s, sizeof(__pyx_k_unknown_tag_s), 0, 1, 0, 0},
  {0, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
  {0, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {0, __pyx_k_value_encode, sizeof(__pyx_k_value_encode), 0, 0, 1, 1},
  {0, __pyx_k_value_must_be_None_for_Null_type, sizeof(__pyx_k_value_must_be_None_for_Null_type), 0, 1, 0, 0},
  {0, __pyx_k_value_type, sizeof(__pyx_k_value_type), 0, 0, 1, 1},
  {0, __pyx_k_var_bind_list, sizeof(__pyx_k_var_bind_list), 0, 0, 1, 1},
  {0, __pyx_k_var_bind_list_len, sizeof(__pyx_k_var_bind_list_len), 0, 0, 1, 1},
  {0, __pyx_k_var_bind_pos, sizeof(__pyx_k_var_bind_pos), 0, 0, 1, 1},
  {0, __pyx_k_varbind, sizeof(__pyx_k_varbind), 0, 0, 1, 1},
  {0, __pyx_k_varbind_enc, sizeof(__pyx_k_varbind_enc), 0, 0, 1, 1},
  {0, __pyx_k_varbinds, sizeof(__pyx_k_varbinds), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_data, sizeof(__pyx_k_varbinds_data), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_encode, sizeof(__pyx_k_varbinds_encode), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_encode_tlv, sizeof(__pyx_k_varbinds_encode_tlv), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_len, sizeof(__pyx_k_varbinds_len), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_obj, sizeof(__pyx_k_varbinds_obj), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_tlv, sizeof(__pyx_k_varbinds_tlv), 0, 0, 1, 1},
  {0, __pyx_k_varbinds_type, sizeof(__pyx_k_varbinds_type), 0, 0, 1, 1},
  {0, __pyx_k_version_len, sizeof(__pyx_k_version_len), 0, 0, 1, 1},
  {0, __pyx_k_version_type, sizeof(__pyx_k_version_type), 0, 0, 1, 1},
  {0, __pyx_k_version_value, sizeof(__pyx_k_version_value), 0, 0, 1, 1},
  {0, __pyx_k_vs, sizeof(__pyx_k_vs), 0, 1, 0, 0},
  {0, __pyx_k_wrong_SID1, sizeof(__pyx_k_wrong_SID1), 0, 1, 0, 0},
  {0, __pyx_k_wrong_SID2, sizeof(__pyx_k_wrong_SID2), 0, 1, 0, 0},
  {0, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  #else
  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {&__pyx_kp_b_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 0, 0},
  {&__pyx_n_b_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 0, 1},
  {&__pyx_n_s_ASN_SNMP_MSG_TYPES, __pyx_k_ASN_SNMP_MSG_TYPES, sizeof(__pyx_k_ASN_SNMP_MSG_TYPES), 0, 0, 1, 1},
  {&__pyx_n_u_Counter32, __pyx_k_Counter32, sizeof(__pyx_k_Counter32), 0, 1, 0, 1},
  {&__pyx_n_u_Counter64, __pyx_k_Counter64, sizeof(__pyx_k_Counter64), 0, 1, 0, 1},
  {&__pyx_n_s_EndOfMibView, __pyx_k_EndOfMibView, sizeof(__pyx_k_EndOfMibView), 0, 0, 1, 1},
  {&__pyx_kp_u_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 1, 0, 0},
  {&__pyx_n_b_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 0, 1},
  {&__pyx_n_u_Get, __pyx_k_Get, sizeof(__pyx_k_Get), 0, 1, 0, 1},
  {&__pyx_n_u_GetBulk, __pyx_k_GetBulk, sizeof(__pyx_k_GetBulk), 0, 1, 0, 1},
  {&__pyx_n_u_GetNext, __pyx_k_GetNext, sizeof(__pyx_k_GetNext), 0, 1, 0, 1},
  {&__pyx_n_u_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 1, 0, 1},
  {&__pyx_n_s_NoSuchInstance, __pyx_k_NoSuchInstance, sizeof(__pyx_k_NoSuchInstance), 0, 0, 1, 1},
  {&__pyx_n_s_NoSuchObject, __pyx_k_NoSuchObject, sizeof(__pyx_k_NoSuchObject), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_u_Null, __pyx_k_Null, sizeof(__pyx_k_Null), 0, 1, 0, 1},
  {&__pyx_n_u_ObjectID, __pyx_k_ObjectID, sizeof(__pyx_k_ObjectID), 0, 1, 0, 1},
  {&__pyx_n_u_OctetString, __pyx_k_OctetString, sizeof(__pyx_k_OctetString), 0, 1, 0, 1},
  {&__pyx_n_u_Response, __pyx_k_Response, sizeof(__pyx_k_Response), 0, 1, 0, 1},
  {&__pyx_n_u_SID1, __pyx_k_SID1, sizeof(__pyx_k_SID1), 0, 1, 0, 1},
  {&__pyx_n_u_SID2, __pyx_k_SID2, sizeof(__pyx_k_SID2), 0, 1, 0, 1},
  {&__pyx_n_s_SNMPException, __pyx_k_SNMPException, sizeof(__pyx_k_SNMPException), 0, 0, 1, 1},
  {&__pyx_n_u_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 1, 0, 1},
  {&__pyx_n_u_Set, __pyx_k_Set, sizeof(__pyx_k_Set), 0, 1, 0, 1},
  {&__pyx_n_s_TYPE_NAME_TO_TYPE, __pyx_k_TYPE_NAME_TO_TYPE, sizeof(__pyx_k_TYPE_NAME_TO_TYPE), 0, 0, 1, 1},
  {&__pyx_n_u_Trap, __pyx_k_Trap, sizeof(__pyx_k_Trap), 0, 1, 0, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_VarBindContentException, __pyx_k_VarBindContentException, sizeof(__pyx_k_VarBindContentException), 0, 0, 1, 1},
  {&__pyx_n_s_VarBindUnpackException, __pyx_k_VarBindUnpackException, sizeof(__pyx_k_VarBindUnpackException), 0, 0, 1, 1},
  {&__pyx_kp_b__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 0, 0},
  {&__pyx_kp_b__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 0, 0},
  {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0},
  {&__pyx_kp_b__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 0, 0},
  {&__pyx_kp_b__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 0, 0},
  {&__pyx_n_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 1},
  {&__pyx_kp_b__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 0, 0},
  {&__pyx_kp_b__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 0, 0},
  {&__pyx_kp_b__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 0, 0},
  {&__pyx_kp_b__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 0, 0},
  {&__pyx_kp_b__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 0, 0},
  {&__pyx_kp_b__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 0, 0},
  {&__pyx_n_s__65, __pyx_k__65, sizeof(__pyx_k__65), 0, 0, 1, 1},
  {&__pyx_kp_b__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 0, 0},
  {&__pyx_kp_b__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 0, 0},
  {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1},
  {&__pyx_n_s_check_is_growing, __pyx_k_check_is_growing, sizeof(__pyx_k_check_is_growing), 0, 0, 1, 1},
  {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_community, __pyx_k_community, sizeof(__pyx_k_community), 0, 0, 1, 1},
  {&__pyx_n_s_community_len, __pyx_k_community_len, sizeof(__pyx_k_community_len), 0, 0, 1, 1},
  {&__pyx_n_s_community_type, __pyx_k_community_type, sizeof(__pyx_k_community_type), 0, 0, 1, 1},
  {&__pyx_n_s_community_value, __pyx_k_community_value, sizeof(__pyx_k_community_value), 0, 0, 1, 1},
  {&__pyx_n_s_cycle, __pyx_k_cycle, sizeof(__pyx_k_cycle), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_data_len, __pyx_k_data_len, sizeof(__pyx_k_data_len), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_encode_length, __pyx_k_encode_length, sizeof(__pyx_k_encode_length), 0, 0, 1, 1},
  {&__pyx_n_s_encode_varbind, __pyx_k_encode_varbind, sizeof(__pyx_k_encode_varbind), 0, 0, 1, 1},
  {&__pyx_kp_u_end_of_content, __pyx_k_end_of_content, sizeof(__pyx_k_end_of_content), 0, 1, 0, 0},
  {&__pyx_n_s_end_of_mib_view, __pyx_k_end_of_mib_view, sizeof(__pyx_k_end_of_mib_view), 0, 0, 1, 1},
  {&__pyx_n_s_error_index, __pyx_k_error_index, sizeof(__pyx_k_error_index), 0, 0, 1, 1},
  {&__pyx_n_s_error_index_len, __pyx_k_error_index_len, sizeof(__pyx_k_error_index_len), 0, 0, 1, 1},
  {&__pyx_n_s_error_index_type, __pyx_k_error_index_type, sizeof(__pyx_k_error_index_type), 0, 0, 1, 1},
  {&__pyx_n_s_error_index_value, __pyx_k_error_index_value, sizeof(__pyx_k_error_index_value), 0, 0, 1, 1},
  {&__pyx_n_s_error_status, __pyx_k_error_status, sizeof(__pyx_k_error_status), 0, 0, 1, 1},
  {&__pyx_n_s_error_status_len, __pyx_k_error_status_len, sizeof(__pyx_k_error_status_len), 0, 0, 1, 1},
  {&__pyx_n_s_error_status_type, __pyx_k_error_status_type, sizeof(__pyx_k_error_status_type), 0, 0, 1, 1},
  {&__pyx_n_s_error_status_value, __pyx_k_error_status_value, sizeof(__pyx_k_error_status_value), 0, 0, 1, 1},
  {&__pyx_kp_u_expected_oid_in_str_got_r, __pyx_k_expected_oid_in_str_got_r, sizeof(__pyx_k_expected_oid_in_str_got_r), 0, 1, 0, 0},
  {&__pyx_kp_u_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 0},
  {&__pyx_n_s_fastsnmp_snmp_parser, __pyx_k_fastsnmp_snmp_parser, sizeof(__pyx_k_fastsnmp_snmp_parser), 0, 0, 1, 1},
  {&__pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_k_fastsnmp_snmp_parser_pyx, sizeof(__pyx_k_fastsnmp_snmp_parser_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_first_seen_index, __pyx_k_first_seen_index, sizeof(__pyx_k_first_seen_index), 0, 0, 1, 1},
  {&__pyx_kp_u_for, __pyx_k_for, sizeof(__pyx_k_for), 0, 1, 0, 0},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_idlist, __pyx_k_idlist, sizeof(__pyx_k_idlist), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index_part, __pyx_k_index_part, sizeof(__pyx_k_index_part), 0, 0, 1, 1},
  {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
  {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
  {&__pyx_n_s_integer_decode, __pyx_k_integer_decode, sizeof(__pyx_k_integer_decode), 0, 0, 1, 1},
  {&__pyx_n_s_integer_encode, __pyx_k_integer_encode, sizeof(__pyx_k_integer_encode), 0, 0, 1, 1},
  {&__pyx_n_s_is_growing, __pyx_k_is_growing, sizeof(__pyx_k_is_growing), 0, 0, 1, 1},
  {&__pyx_kp_u_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 1, 0, 0},
  {&__pyx_n_s_item_2, __pyx_k_item_2, sizeof(__pyx_k_item_2), 0, 0, 1, 1},
  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {&__pyx_n_s_last_seen_index, __pyx_k_last_seen_index, sizeof(__pyx_k_last_seen_index), 0, 0, 1, 1},
  {&__pyx_kp_u_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 1, 0, 0},
  {&__pyx_n_s_length_2, __pyx_k_length_2, sizeof(__pyx_k_length_2), 0, 0, 1, 1},
  {&__pyx_n_s_length_cache, __pyx_k_length_cache, sizeof(__pyx_k_length_cache), 0, 0, 1, 1},
  {&__pyx_n_s_length_decode, __pyx_k_length_decode, sizeof(__pyx_k_length_decode), 0, 0, 1, 1},
  {&__pyx_n_s_length_encode, __pyx_k_length_encode, sizeof(__pyx_k_length_encode), 0, 0, 1, 1},
  {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
  {&__pyx_kp_u_long_SID1_is_not_supported, __pyx_k_long_SID1_is_not_supported, sizeof(__pyx_k_long_SID1_is_not_supported), 0, 1, 0, 0},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_main_oid, __pyx_k_main_oid, sizeof(__pyx_k_main_oid), 0, 0, 1, 1},
  {&__pyx_n_s_main_oids_len, __pyx_k_main_oids_len, sizeof(__pyx_k_main_oids_len), 0, 0, 1, 1},
  {&__pyx_n_s_main_oids_pos, __pyx_k_main_oids_pos, sizeof(__pyx_k_main_oids_pos), 0, 0, 1, 1},
  {&__pyx_n_s_main_oids_positions, __pyx_k_main_oids_positions, sizeof(__pyx_k_main_oids_positions), 0, 0, 1, 1},
  {&__pyx_n_s_max_repetitions, __pyx_k_max_repetitions, sizeof(__pyx_k_max_repetitions), 0, 0, 1, 1},
  {&__pyx_n_s_max_repetitions_len, __pyx_k_max_repetitions_len, sizeof(__pyx_k_max_repetitions_len), 0, 0, 1, 1},
  {&__pyx_kp_u_max_repetitions_must_be_higher_t, __pyx_k_max_repetitions_must_be_higher_t, sizeof(__pyx_k_max_repetitions_must_be_higher_t), 0, 1, 0, 0},
  {&__pyx_n_s_max_repetitions_type, __pyx_k_max_repetitions_type, sizeof(__pyx_k_max_repetitions_type), 0, 0, 1, 1},
  {&__pyx_n_s_max_repetitions_value, __pyx_k_max_repetitions_value, sizeof(__pyx_k_max_repetitions_value), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_msg_decode, __pyx_k_msg_decode, sizeof(__pyx_k_msg_decode), 0, 0, 1, 1},
  {&__pyx_n_s_msg_encode, __pyx_k_msg_encode, sizeof(__pyx_k_msg_encode), 0, 0, 1, 1},
  {&__pyx_n_s_msg_type, __pyx_k_msg_type, sizeof(__pyx_k_msg_type), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_next_oids, __pyx_k_next_oids, sizeof(__pyx_k_next_oids), 0, 0, 1, 1},
  {&__pyx_n_s_non_repeaters, __pyx_k_non_repeaters, sizeof(__pyx_k_non_repeaters), 0, 0, 1, 1},
  {&__pyx_n_s_non_repeaters_len, __pyx_k_non_repeaters_len, sizeof(__pyx_k_non_repeaters_len), 0, 0, 1, 1},
  {&__pyx_n_s_non_repeaters_type, __pyx_k_non_repeaters_type, sizeof(__pyx_k_non_repeaters_type), 0, 0, 1, 1},
  {&__pyx_n_s_non_repeaters_value, __pyx_k_non_repeaters_value, sizeof(__pyx_k_non_repeaters_value), 0, 0, 1, 1},
  {&__pyx_kp_u_not_implement_coder_for_s, __pyx_k_not_implement_coder_for_s, sizeof(__pyx_k_not_implement_coder_for_s), 0, 1, 0, 0},
  {&__pyx_kp_u_not_increasing, __pyx_k_not_increasing, sizeof(__pyx_k_not_increasing), 0, 1, 0, 0},
  {&__pyx_n_s_numOctets, __pyx_k_numOctets, sizeof(__pyx_k_numOctets), 0, 0, 1, 1},
  {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
  {&__pyx_n_s_obj_id_len, __pyx_k_obj_id_len, sizeof(__pyx_k_obj_id_len), 0, 0, 1, 1},
  {&__pyx_n_s_obj_id_type, __pyx_k_obj_id_type, sizeof(__pyx_k_obj_id_type), 0, 0, 1, 1},
  {&__pyx_n_s_obj_id_value, __pyx_k_obj_id_value, sizeof(__pyx_k_obj_id_value), 0, 0, 1, 1},
  {&__pyx_n_s_obj_value_len, __pyx_k_obj_value_len, sizeof(__pyx_k_obj_value_len), 0, 0, 1, 1},
  {&__pyx_n_s_obj_value_type, __pyx_k_obj_value_type, sizeof(__pyx_k_obj_value_type), 0, 0, 1, 1},
  {&__pyx_n_s_obj_value_value, __pyx_k_obj_value_value, sizeof(__pyx_k_obj_value_value), 0, 0, 1, 1},
  {&__pyx_n_s_object_len, __pyx_k_object_len, sizeof(__pyx_k_object_len), 0, 0, 1, 1},
  {&__pyx_n_s_objectid_decode, __pyx_k_objectid_decode, sizeof(__pyx_k_objectid_decode), 0, 0, 1, 1},
  {&__pyx_n_s_objectid_encode, __pyx_k_objectid_encode, sizeof(__pyx_k_objectid_encode), 0, 0, 1, 1},
  {&__pyx_n_s_octetstring_decode, __pyx_k_octetstring_decode, sizeof(__pyx_k_octetstring_decode), 0, 0, 1, 1},
  {&__pyx_n_s_octetstring_encode, __pyx_k_octetstring_encode, sizeof(__pyx_k_octetstring_encode), 0, 0, 1, 1},
  {&__pyx_n_s_oid, __pyx_k_oid, sizeof(__pyx_k_oid), 0, 0, 1, 1},
  {&__pyx_n_s_oid_finish, __pyx_k_oid_finish, sizeof(__pyx_k_oid_finish), 0, 0, 1, 1},
  {&__pyx_n_s_oid_start, __pyx_k_oid_start, sizeof(__pyx_k_oid_start), 0, 0, 1, 1},
  {&__pyx_n_s_oids_to_poll, __pyx_k_oids_to_poll, sizeof(__pyx_k_oids_to_poll), 0, 0, 1, 1},
  {&__pyx_kp_u_opaque_len_s_1, __pyx_k_opaque_len_s_1, sizeof(__pyx_k_opaque_len_s_1), 0, 1, 0, 0},
  {&__pyx_n_s_orig_main_oids, __pyx_k_orig_main_oids, sizeof(__pyx_k_orig_main_oids), 0, 0, 1, 1},
  {&__pyx_n_s_orig_main_oids_doted, __pyx_k_orig_main_oids_doted, sizeof(__pyx_k_orig_main_oids_doted), 0, 0, 1, 1},
  {&__pyx_n_s_orig_main_oids_len, __pyx_k_orig_main_oids_len, sizeof(__pyx_k_orig_main_oids_len), 0, 0, 1, 1},
  {&__pyx_kp_u_out_of_len_current_stream_pos, __pyx_k_out_of_len_current_stream_pos, sizeof(__pyx_k_out_of_len_current_stream_pos), 0, 1, 0, 0},
  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
  {&__pyx_n_s_parse_varbind, __pyx_k_parse_varbind, sizeof(__pyx_k_parse_varbind), 0, 0, 1, 1},
  {&__pyx_n_s_pdu, __pyx_k_pdu, sizeof(__pyx_k_pdu), 0, 0, 1, 1},
  {&__pyx_n_s_pdu_len, __pyx_k_pdu_len, sizeof(__pyx_k_pdu_len), 0, 0, 1, 1},
  {&__pyx_n_s_pdu_type, __pyx_k_pdu_type, sizeof(__pyx_k_pdu_type), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_req_id, __pyx_k_req_id, sizeof(__pyx_k_req_id), 0, 0, 1, 1},
  {&__pyx_n_s_request_id_len, __pyx_k_request_id_len, sizeof(__pyx_k_request_id_len), 0, 0, 1, 1},
  {&__pyx_n_s_request_id_type, __pyx_k_request_id_type, sizeof(__pyx_k_request_id_type), 0, 0, 1, 1},
  {&__pyx_n_s_request_id_value, __pyx_k_request_id_value, sizeof(__pyx_k_request_id_value), 0, 0, 1, 1},
  {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {&__pyx_n_s_rest_oids_positions, __pyx_k_rest_oids_positions, sizeof(__pyx_k_rest_oids_positions), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_resultlist, __pyx_k_resultlist, sizeof(__pyx_k_resultlist), 0, 0, 1, 1},
  {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
  {&__pyx_n_s_ret_length, __pyx_k_ret_length, sizeof(__pyx_k_ret_length), 0, 0, 1, 1},
  {&__pyx_n_s_ret_str, __pyx_k_ret_str, sizeof(__pyx_k_ret_str), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_n_s_seq_tag, __pyx_k_seq_tag, sizeof(__pyx_k_seq_tag), 0, 0, 1, 1},
  {&__pyx_n_s_sequence_decode, __pyx_k_sequence_decode, sizeof(__pyx_k_sequence_decode), 0, 0, 1, 1},
  {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
  {&__pyx_n_s_skip_column, __pyx_k_skip_column, sizeof(__pyx_k_skip_column), 0, 0, 1, 1},
  {&__pyx_n_s_slen, __pyx_k_slen, sizeof(__pyx_k_slen), 0, 0, 1, 1},
  {&__pyx_n_s_snmp_message_len, __pyx_k_snmp_message_len, sizeof(__pyx_k_snmp_message_len), 0, 0, 1, 1},
  {&__pyx_n_s_snmp_message_type, __pyx_k_snmp_message_type, sizeof(__pyx_k_snmp_message_type), 0, 0, 1, 1},
  {&__pyx_n_s_snmp_message_value, __pyx_k_snmp_message_value, sizeof(__pyx_k_snmp_message_value), 0, 0, 1, 1},
  {&__pyx_n_s_snmp_ver, __pyx_k_snmp_ver, sizeof(__pyx_k_snmp_ver), 0, 0, 1, 1},
  {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 1, 0, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_n_s_stream_char, __pyx_k_stream_char, sizeof(__pyx_k_stream_char), 0, 0, 1, 1},
  {&__pyx_kp_u_stream_len, __pyx_k_stream_len, sizeof(__pyx_k_stream_len), 0, 1, 0, 0},
  {&__pyx_n_s_stream_len_2, __pyx_k_stream_len_2, sizeof(__pyx_k_stream_len_2), 0, 0, 1, 1},
  {&__pyx_n_s_stream_ptr, __pyx_k_stream_ptr, sizeof(__pyx_k_stream_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_u_strlen, __pyx_k_strlen, sizeof(__pyx_k_strlen), 0, 1, 0, 1},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_subid, __pyx_k_subid, sizeof(__pyx_k_subid), 0, 0, 1, 1},
  {&__pyx_n_s_subidlist, __pyx_k_subidlist, sizeof(__pyx_k_subidlist), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_kp_u_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 1, 0, 0},
  {&__pyx_n_s_tag_2, __pyx_k_tag_2, sizeof(__pyx_k_tag_2), 0, 0, 1, 1},
  {&__pyx_n_s_tag_decode, __pyx_k_tag_decode, sizeof(__pyx_k_tag_decode), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tmp_length, __pyx_k_tmp_length, sizeof(__pyx_k_tmp_length), 0, 0, 1, 1},
  {&__pyx_kp_u_too_long_oid, __pyx_k_too_long_oid, sizeof(__pyx_k_too_long_oid), 0, 1, 0, 0},
  {&__pyx_n_s_uinteger_decode, __pyx_k_uinteger_decode, sizeof(__pyx_k_uinteger_decode), 0, 0, 1, 1},
  {&__pyx_n_s_uinteger_encode, __pyx_k_uinteger_encode, sizeof(__pyx_k_uinteger_encode), 0, 0, 1, 1},
  {&__pyx_kp_u_unknown_float_len_s, __pyx_k_unknown_float_len_s, sizeof(__pyx_k_unknown_float_len_s), 0, 1, 0, 0},
  {&__pyx_kp_u_unknown_tag_s, __pyx_k_unknown_tag_s, sizeof(__pyx_k_unknown_tag_s), 0, 1, 0, 0},
  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_encode, __pyx_k_value_encode, sizeof(__pyx_k_value_encode), 0, 0, 1, 1},
  {&__pyx_kp_u_value_must_be_None_for_Null_type, __pyx_k_value_must_be_None_for_Null_type, sizeof(__pyx_k_value_must_be_None_for_Null_type), 0, 1, 0, 0},
  {&__pyx_n_s_value_type, __pyx_k_value_type, sizeof(__pyx_k_value_type), 0, 0, 1, 1},
  {&__pyx_n_s_var_bind_list, __pyx_k_var_bind_list, sizeof(__pyx_k_var_bind_list), 0, 0, 1, 1},
  {&__pyx_n_s_var_bind_list_len, __pyx_k_var_bind_list_len, sizeof(__pyx_k_var_bind_list_len), 0, 0, 1, 1},
  {&__pyx_n_s_var_bind_pos, __pyx_k_var_bind_pos, sizeof(__pyx_k_var_bind_pos), 0, 0, 1, 1},
  {&__pyx_n_s_varbind, __pyx_k_varbind, sizeof(__pyx_k_varbind), 0, 0, 1, 1},
  {&__pyx_n_s_varbind_enc, __pyx_k_varbind_enc, sizeof(__pyx_k_varbind_enc), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds, __pyx_k_varbinds, sizeof(__pyx_k_varbinds), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_data, __pyx_k_varbinds_data, sizeof(__pyx_k_varbinds_data), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_encode, __pyx_k_varbinds_encode, sizeof(__pyx_k_varbinds_encode), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_encode_tlv, __pyx_k_varbinds_encode_tlv, sizeof(__pyx_k_varbinds_encode_tlv), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_len, __pyx_k_varbinds_len, sizeof(__pyx_k_varbinds_len), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_obj, __pyx_k_varbinds_obj, sizeof(__pyx_k_varbinds_obj), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_tlv, __pyx_k_varbinds_tlv, sizeof(__pyx_k_varbinds_tlv), 0, 0, 1, 1},
  {&__pyx_n_s_varbinds_type, __pyx_k_varbinds_type, sizeof(__pyx_k_varbinds_type), 0, 0, 1, 1},
  {&__pyx_n_s_version_len, __pyx_k_version_len, sizeof(__pyx_k_version_len), 0, 0, 1, 1},
  {&__pyx_n_s_version_type, __pyx_k_version_type, sizeof(__pyx_k_version_type), 0, 0, 1, 1},
  {&__pyx_n_s_version_value, __pyx_k_version_value, sizeof(__pyx_k_version_value), 0, 0, 1, 1},
  {&__pyx_kp_u_vs, __pyx_k_vs, sizeof(__pyx_k_vs), 0, 1, 0, 0},
  {&__pyx_kp_u_wrong_SID1, __pyx_k_wrong_SID1, sizeof(__pyx_k_wrong_SID1), 0, 1, 0, 0},
  {&__pyx_kp_u_wrong_SID2, __pyx_k_wrong_SID2, sizeof(__pyx_k_wrong_SID2), 0, 1, 0, 0},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  #endif
  {0, 0, 0, 0, 0, 0, 0}
};
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 176, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 619, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 911, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 911, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "fastsnmp/snmp_parser.pyx":443
 *     if ret != 0:
 *         if ret == -1:
 *             raise Exception("wrong SID1")             # <<<<<<<<<<<<<<
 *         elif ret == -2:
 *             raise Exception("wrong SID2")
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_wrong_SID1); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "fastsnmp/snmp_parser.pyx":445
 *             raise Exception("wrong SID1")
 *         elif ret == -2:
 *             raise Exception("wrong SID2")             # <<<<<<<<<<<<<<
 *         elif ret == -3:
 *             raise Exception("long SID1 is not supported")
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_wrong_SID2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "fastsnmp/snmp_parser.pyx":447
 *             raise Exception("wrong SID2")
 *         elif ret == -3:
 *             raise Exception("long SID1 is not supported")             # <<<<<<<<<<<<<<
 * 
 *     return <bytes>result[:object_len]
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_long_SID1_is_not_supported); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "fastsnmp/snmp_parser.pyx":595
 *             objectid_decode_str(stream_char, length, ret_str, &ret_length)
 *             if ret_length > MAX_OID_LEN_STR:
 *                 raise Exception("too long oid")             # <<<<<<<<<<<<<<
 *             object_str = PyUnicode_DecodeASCII(ret_str, ret_length, 'ignore')
 *             objects.append(object_str)
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_too_long_oid); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "fastsnmp/snmp_parser.pyx":628
 *             objects.append(None)
 *         elif tag == ASN_U_EOC:
 *             raise Exception("end of content")             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError("unknown tag=%s" % tag)
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_end_of_content); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "fastsnmp/snmp_parser.pyx":732
 *     if value_type == 'Null':
 *         if value is not None:
 *             raise Exception('value must be None for Null type!')             # <<<<<<<<<<<<<<
 *         return b''
 *     elif value_type == "Integer":
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_value_must_be_None_for_Null_type); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "fastsnmp/snmp_parser.pyx":227
 * 
 * 
 * def objectid_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */
  __pyx_tuple__22 = PyTuple_Pack(5, __pyx_n_s_stream, __pyx_n_s_stream_char, __pyx_n_s_stream_len_2, __pyx_n_s_ret_str, __pyx_n_s_ret_length); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_objectid_decode, 227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 227, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":420
 *     return retval
 * 
 * def objectid_encode(oid):             # <<<<<<<<<<<<<<
 *     """
 *     encode an ObjectID into stream
 */
  __pyx_tuple__24 = PyTuple_Pack(9, __pyx_n_s_oid, __pyx_n_s_number, __pyx_n_s_idlist, __pyx_n_s_subidlist, __pyx_n_s_pos, __pyx_n_s_object_len, __pyx_n_s_result, __pyx_n_s_subid, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_objectid_encode, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 420, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":454
 *     return <bytes> data[:data_len]
 * 
 * def octetstring_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     return c_octetstring_decode(stream, len(stream))
 * 
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_stream); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_octetstring_decode, 454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 454, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":458
 * 
 * 
 * def octetstring_encode(string):             # <<<<<<<<<<<<<<
 *     """
 *     encode an octetstring into string
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_string); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_octetstring_encode, 458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 458, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":469
 *     return bytes(string.encode('ascii'))
 * 
 * def integer_encode(const int64_t value):             # <<<<<<<<<<<<<<
 *     cdef char[MAX_INT_LEN] data
 *     cdef uint64_t data_len = 0
 */
  __pyx_tuple__30 = PyTuple_Pack(3, __pyx_n_s_value, __pyx_n_s_data, __pyx_n_s_data_len); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_integer_encode, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 469, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":488
 * 
 * 
 * def uinteger_encode(uint64_t value):             # <<<<<<<<<<<<<<
 *     # little -> big
 *     cdef size_t slen, i
 */
  __pyx_tuple__32 = PyTuple_Pack(4, __pyx_n_s_value, __pyx_n_s_slen, __pyx_n_s_i, __pyx_n_s_res); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_uinteger_encode, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 488, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":499
 *     return <bytes> res[:slen]
 * 
 * def uinteger_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */
  __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_stream, __pyx_n_s_value, __pyx_n_s_stream_len_2, __pyx_n_s_stream_char); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_uinteger_decode, 499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 499, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":513
 *     return uinteger_decode_c(stream_char, &stream_len)
 * 
 * def integer_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */
  __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_s_stream, __pyx_n_s_value, __pyx_n_s_stream_len_2, __pyx_n_s_stream_char); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_integer_decode, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 513, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":546
 *     return value
 * 
 * def sequence_decode(bytes stream not None) -> list:             # <<<<<<<<<<<<<<
 *     cdef const unsigned char * stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */
  __pyx_tuple__38 = PyTuple_Pack(4, __pyx_n_s_stream, __pyx_n_s_stream_char, __pyx_n_s_stream_len_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_sequence_decode, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 546, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":652
 * 
 * 
 * def length_decode(bytes data):             # <<<<<<<<<<<<<<
 *     cdef size_t encode_length, length
 *     length_decode_c(data, &length, &encode_length)
 */
  __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_data, __pyx_n_s_encode_length, __pyx_n_s_length_2); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_length_decode, 652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 652, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":658
 * 
 * 
 * def length_encode(uint64_t length):             # <<<<<<<<<<<<<<
 *     """
 *     Function takes the length of the contents and produces the encoding for that length.  Section 6.3 of ITU-T-X.209
 */
  __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_length_2, __pyx_n_s_tmp_length, __pyx_n_s_result, __pyx_n_s_resultlist, __pyx_n_s_numOctets); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_length_encode, 658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 658, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":719
 *     return 0
 * 
 * def tag_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length
 */
  __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_stream, __pyx_n_s_tag_2, __pyx_n_s_encode_length); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_tag_decode, 719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 719, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":726
 * 
 * # TODO: implement more encoders
 * def value_encode(value=None, value_type='Null'):             # <<<<<<<<<<<<<<
 *     """
 *     Encoded value by ASN.1
 */
  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_value, __pyx_n_s_value_type); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_value_encode, 726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 726, __pyx_L1_error)
  __pyx_tuple__48 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_u_Null)); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "fastsnmp/snmp_parser.pyx":744
 * 
 * 
 * def encode_varbind(oid, value_type='Null', value=None):             # <<<<<<<<<<<<<<
 *     if value is None:
 *         value_type = 'Null'
 */
  __pyx_tuple__49 = PyTuple_Pack(12, __pyx_n_s_oid, __pyx_n_s_value_type, __pyx_n_s_value, __pyx_n_s_obj_id_value, __pyx_n_s_obj_id_type, __pyx_n_s_obj_id_len, __pyx_n_s_obj_value_value, __pyx_n_s_obj_value_type, __pyx_n_s_obj_value_len, __pyx_n_s_varbinds_obj, __pyx_n_s_seq_tag, __pyx_n_s_varbind_enc); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_encode_varbind, 744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 744, __pyx_L1_error)
  __pyx_tuple__51 = PyTuple_Pack(2, ((PyObject*)__pyx_n_u_Null), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "fastsnmp/snmp_parser.pyx":762
 * 
 * 
 * def varbinds_encode(varbinds):             # <<<<<<<<<<<<<<
 *     res = bytearray()
 *     for varbind in varbinds:
 */
  __pyx_tuple__52 = PyTuple_Pack(6, __pyx_n_s_varbinds, __pyx_n_s_res, __pyx_n_s_varbind, __pyx_n_s_oid, __pyx_n_s_value, __pyx_n_s_value_type); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_varbinds_encode, 762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 762, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":778
 * 
 * 
 * def varbinds_encode_tlv(varbinds):             # <<<<<<<<<<<<<<
 *     varbinds_data = varbinds_encode(varbinds)
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 */
  __pyx_tuple__54 = PyTuple_Pack(4, __pyx_n_s_varbinds, __pyx_n_s_varbinds_data, __pyx_n_s_varbinds_type, __pyx_n_s_varbinds_len); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_varbinds_encode_tlv, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 778, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":785
 * 
 * 
 * def msg_encode(req_id, community, varbinds, msg_type="GetBulk", max_repetitions=10, non_repeaters=0):             # <<<<<<<<<<<<<<
 *     """
 *     Build SNMP-message
 */
  __pyx_tuple__56 = PyTuple_Pack(34, __pyx_n_s_req_id, __pyx_n_s_community, __pyx_n_s_varbinds, __pyx_n_s_msg_type, __pyx_n_s_max_repetitions, __pyx_n_s_non_repeaters, __pyx_n_s_varbinds_tlv, __pyx_n_s_request_id_type, __pyx_n_s_request_id_value, __pyx_n_s_request_id_len, __pyx_n_s_non_repeaters_value, __pyx_n_s_non_repeaters_type, __pyx_n_s_non_repeaters_len, __pyx_n_s_max_repetitions_value, __pyx_n_s_max_repetitions_type, __pyx_n_s_max_repetitions_len, __pyx_n_s_pdu, __pyx_n_s_pdu_type, __pyx_n_s_error_status_value, __pyx_n_s_error_status_type, __pyx_n_s_error_status_len, __pyx_n_s_error_index_value, __pyx_n_s_error_index_type, __pyx_n_s_error_index_len, __pyx_n_s_pdu_len, __pyx_n_s_community_value, __pyx_n_s_community_type, __pyx_n_s_community_len, __pyx_n_s_version_value, __pyx_n_s_version_type, __pyx_n_s_version_len, __pyx_n_s_snmp_message_type, __pyx_n_s_snmp_message_value, __pyx_n_s_snmp_message_len); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 34, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_msg_encode, 785, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_tuple__58 = PyTuple_Pack(3, ((PyObject*)__pyx_n_u_GetBulk), ((PyObject *)__pyx_int_10), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "fastsnmp/snmp_parser.pyx":857
 * 
 * 
 * def msg_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length, length
 */
  __pyx_tuple__59 = PyTuple_Pack(14, __pyx_n_s_stream, __pyx_n_s_tag_2, __pyx_n_s_encode_length, __pyx_n_s_length_2, __pyx_n_s_stream_char, __pyx_n_s_stream_ptr, __pyx_n_s_stream_len_2, __pyx_n_s_data, __pyx_n_s_snmp_ver, __pyx_n_s_community, __pyx_n_s_req_id, __pyx_n_s_error_status, __pyx_n_s_error_index, __pyx_n_s_varbinds); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_msg_decode, 857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 857, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":873
 *     return req_id, error_status, error_index, varbinds
 * 
 * def check_is_growing(str oid_start not None, str oid_finish not None):             # <<<<<<<<<<<<<<
 *     cdef bint is_growing = True
 *     if "." in oid_start:
 */
  __pyx_tuple__61 = PyTuple_Pack(5, __pyx_n_s_oid_start, __pyx_n_s_oid_finish, __pyx_n_s_is_growing, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_check_is_growing, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 873, __pyx_L1_error)

  /* "fastsnmp/snmp_parser.pyx":882
 *     return is_growing
 * 
 * def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tuple oids_to_poll not None):             # <<<<<<<<<<<<<<
 *     cdef str oid, main_oid, index_part
 *     cdef list result = [], item
 */
  __pyx_tuple__63 = PyTuple_Pack(26, __pyx_n_s_var_bind_list, __pyx_n_s_orig_main_oids, __pyx_n_s_oids_to_poll, __pyx_n_s_oid, __pyx_n_s_main_oid, __pyx_n_s_index_part, __pyx_n_s_result, __pyx_n_s_item_2, __pyx_n_s_next_oids, __pyx_n_s_orig_main_oids_doted, __pyx_n_s_orig_main_oids_len, __pyx_n_s_value, __pyx_n_s_main_oids_len, __pyx_n_s_rest_oids_positions, __pyx_n_s_main_oids_positions, __pyx_n_s_var_bind_list_len, __pyx_n_s_i, __pyx_n_s_skip_column, __pyx_n_s_last_seen_index, __pyx_n_s_first_seen_index, __pyx_n_s_var_bind_pos, __pyx_n_s_e, __pyx_n_s_main_oids_pos, __pyx_n_s_pos, __pyx_n_s_x, __pyx_n_s_p); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fastsnmp_snmp_parser_pyx, __pyx_n_s_parse_varbind, 882, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyByteArray_Type_insert.type = (PyObject*)&PyByteArray_Type;
  __pyx_umethod_PyByteArray_Type_insert.method_name = &__pyx_n_s_insert;
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_InitString(__pyx_string_tab[0], &__pyx_kp_u_) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[1], &__pyx_kp_b_0) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[2], &__pyx_n_b_A) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[3], &__pyx_n_s_ASN_SNMP_MSG_TYPES) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[4], &__pyx_n_u_Counter32) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[5], &__pyx_n_u_Counter64) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[6], &__pyx_n_s_EndOfMibView) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[7], &__pyx_kp_u_Exception) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[8], &__pyx_n_b_F) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[9], &__pyx_n_u_Get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[10], &__pyx_n_u_GetBulk) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[11], &__pyx_n_u_GetNext) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[12], &__pyx_n_u_Integer) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[13], &__pyx_n_s_NoSuchInstance) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[14], &__pyx_n_s_NoSuchObject) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[15], &__pyx_n_s_NotImplementedError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[16], &__pyx_n_u_Null) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[17], &__pyx_n_u_ObjectID) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[18], &__pyx_n_u_OctetString) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[19], &__pyx_n_u_Response) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[20], &__pyx_n_u_SID1) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[21], &__pyx_n_u_SID2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[22], &__pyx_n_s_SNMPException) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[23], &__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[24], &__pyx_n_u_Set) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[25], &__pyx_n_s_TYPE_NAME_TO_TYPE) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[26], &__pyx_n_u_Trap) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[27], &__pyx_n_s_TypeError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[28], &__pyx_n_s_ValueError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[29], &__pyx_n_s_VarBindContentException) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[30], &__pyx_n_s_VarBindUnpackException) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[31], &__pyx_kp_b__10) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[32], &__pyx_kp_b__11) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[33], &__pyx_kp_b__12) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[34], &__pyx_kp_b__13) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[35], &__pyx_kp_b__14) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[36], &__pyx_n_s__15) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[37], &__pyx_kp_b__16) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[38], &__pyx_kp_b__17) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[39], &__pyx_kp_b__18) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[40], &__pyx_kp_b__19) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[41], &__pyx_kp_b__20) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[42], &__pyx_kp_b__21) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[43], &__pyx_n_s__65) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[44], &__pyx_kp_b__8) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[45], &__pyx_kp_b__9) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[46], &__pyx_n_u_ascii) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[47], &__pyx_n_s_check_is_growing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[48], &__pyx_n_s_class_getitem) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[49], &__pyx_n_s_cline_in_traceback) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[50], &__pyx_n_s_community) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[51], &__pyx_n_s_community_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[52], &__pyx_n_s_community_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[53], &__pyx_n_s_community_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[54], &__pyx_n_s_cycle) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[55], &__pyx_n_s_data) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[56], &__pyx_n_s_data_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[57], &__pyx_n_s_dict) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[58], &__pyx_n_s_doc) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[59], &__pyx_n_s_e) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[60], &__pyx_n_s_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[61], &__pyx_n_s_encode_length) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[62], &__pyx_n_s_encode_varbind) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[63], &__pyx_kp_u_end_of_content) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[64], &__pyx_n_s_end_of_mib_view) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[65], &__pyx_n_s_error_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[66], &__pyx_n_s_error_index_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[67], &__pyx_n_s_error_index_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[68], &__pyx_n_s_error_index_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[69], &__pyx_n_s_error_status) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[70], &__pyx_n_s_error_status_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[71], &__pyx_n_s_error_status_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[72], &__pyx_n_s_error_status_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[73], &__pyx_kp_u_expected_oid_in_str_got_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[74], &__pyx_kp_u_f) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[75], &__pyx_n_s_fastsnmp_snmp_parser) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[76], &__pyx_kp_s_fastsnmp_snmp_parser_pyx) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[77], &__pyx_n_s_first_seen_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[78], &__pyx_kp_u_for) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[79], &__pyx_n_s_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[80], &__pyx_n_s_idlist) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[81], &__pyx_n_s_import) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[82], &__pyx_n_s_index_part) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[83], &__pyx_n_s_init_subclass) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[84], &__pyx_n_s_initializing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[85], &__pyx_n_s_insert) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[86], &__pyx_n_s_integer_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[87], &__pyx_n_s_integer_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[88], &__pyx_n_s_is_growing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[89], &__pyx_kp_u_item) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[90], &__pyx_n_s_item_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[91], &__pyx_n_s_itertools) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[92], &__pyx_n_s_last_seen_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[93], &__pyx_kp_u_length) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[94], &__pyx_n_s_length_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[95], &__pyx_n_s_length_cache) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[96], &__pyx_n_s_length_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[97], &__pyx_n_s_length_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[98], &__pyx_n_s_list) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[99], &__pyx_kp_u_long_SID1_is_not_supported) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[100], &__pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[101], &__pyx_n_s_main_oid) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[102], &__pyx_n_s_main_oids_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[103], &__pyx_n_s_main_oids_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[104], &__pyx_n_s_main_oids_positions) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[105], &__pyx_n_s_max_repetitions) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[106], &__pyx_n_s_max_repetitions_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[107], &__pyx_kp_u_max_repetitions_must_be_higher_t) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[108], &__pyx_n_s_max_repetitions_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[109], &__pyx_n_s_max_repetitions_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[110], &__pyx_n_s_metaclass) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[111], &__pyx_n_s_module) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[112], &__pyx_n_s_msg_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[113], &__pyx_n_s_msg_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[114], &__pyx_n_s_msg_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[115], &__pyx_n_s_name) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[116], &__pyx_n_s_next_oids) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[117], &__pyx_n_s_non_repeaters) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[118], &__pyx_n_s_non_repeaters_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[119], &__pyx_n_s_non_repeaters_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[120], &__pyx_n_s_non_repeaters_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[121], &__pyx_kp_u_not_implement_coder_for_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[122], &__pyx_kp_u_not_increasing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[123], &__pyx_n_s_numOctets) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[124], &__pyx_n_s_number) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[125], &__pyx_n_s_obj_id_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[126], &__pyx_n_s_obj_id_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[127], &__pyx_n_s_obj_id_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[128], &__pyx_n_s_obj_value_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[129], &__pyx_n_s_obj_value_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[130], &__pyx_n_s_obj_value_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[131], &__pyx_n_s_object_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[132], &__pyx_n_s_objectid_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[133], &__pyx_n_s_objectid_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[134], &__pyx_n_s_octetstring_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[135], &__pyx_n_s_octetstring_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[136], &__pyx_n_s_oid) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[137], &__pyx_n_s_oid_finish) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[138], &__pyx_n_s_oid_start) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[139], &__pyx_n_s_oids_to_poll) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[140], &__pyx_kp_u_opaque_len_s_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[141], &__pyx_n_s_orig_main_oids) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[142], &__pyx_n_s_orig_main_oids_doted) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[143], &__pyx_n_s_orig_main_oids_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[144], &__pyx_kp_u_out_of_len_current_stream_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[145], &__pyx_n_s_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[146], &__pyx_n_s_parse_varbind) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[147], &__pyx_n_s_pdu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[148], &__pyx_n_s_pdu_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[149], &__pyx_n_s_pdu_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[150], &__pyx_n_s_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[151], &__pyx_n_s_prepare) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[152], &__pyx_n_s_qualname) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[153], &__pyx_n_s_range) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[154], &__pyx_n_s_req_id) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[155], &__pyx_n_s_request_id_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[156], &__pyx_n_s_request_id_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[157], &__pyx_n_s_request_id_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[158], &__pyx_n_s_res) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[159], &__pyx_n_s_rest_oids_positions) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[160], &__pyx_n_s_result) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[161], &__pyx_n_s_resultlist) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[162], &__pyx_n_s_ret) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[163], &__pyx_n_s_ret_length) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[164], &__pyx_n_s_ret_str) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[165], &__pyx_n_s_return) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[166], &__pyx_n_s_seq_tag) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[167], &__pyx_n_s_sequence_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[168], &__pyx_n_s_set_name) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[169], &__pyx_n_s_skip_column) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[170], &__pyx_n_s_slen) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[171], &__pyx_n_s_snmp_message_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[172], &__pyx_n_s_snmp_message_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[173], &__pyx_n_s_snmp_message_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[174], &__pyx_n_s_snmp_ver) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[175], &__pyx_n_s_spec) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[176], &__pyx_n_s_split) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[177], &__pyx_n_u_str) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[178], &__pyx_n_s_stream) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[179], &__pyx_n_s_stream_char) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[180], &__pyx_kp_u_stream_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[181], &__pyx_n_s_stream_len_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[182], &__pyx_n_s_stream_ptr) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[183], &__pyx_n_s_string) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[184], &__pyx_n_s_strip) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[185], &__pyx_n_u_strlen) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[186], &__pyx_n_s_struct) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[187], &__pyx_n_s_subid) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[188], &__pyx_n_s_subidlist) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[189], &__pyx_n_s_super) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[190], &__pyx_kp_u_tag) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[191], &__pyx_n_s_tag_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[192], &__pyx_n_s_tag_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[193], &__pyx_n_s_test) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[194], &__pyx_n_s_tmp_length) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[195], &__pyx_kp_u_too_long_oid) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[196], &__pyx_n_s_uinteger_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[197], &__pyx_n_s_uinteger_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[198], &__pyx_kp_u_unknown_float_len_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[199], &__pyx_kp_u_unknown_tag_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[200], &__pyx_n_s_unpack) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[201], &__pyx_n_s_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[202], &__pyx_n_s_value_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[203], &__pyx_kp_u_value_must_be_None_for_Null_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[204], &__pyx_n_s_value_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[205], &__pyx_n_s_var_bind_list) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[206], &__pyx_n_s_var_bind_list_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[207], &__pyx_n_s_var_bind_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[208], &__pyx_n_s_varbind) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[209], &__pyx_n_s_varbind_enc) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[210], &__pyx_n_s_varbinds) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[211], &__pyx_n_s_varbinds_data) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[212], &__pyx_n_s_varbinds_encode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[213], &__pyx_n_s_varbinds_encode_tlv) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[214], &__pyx_n_s_varbinds_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[215], &__pyx_n_s_varbinds_obj) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[216], &__pyx_n_s_varbinds_tlv) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[217], &__pyx_n_s_varbinds_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[218], &__pyx_n_s_version_len) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[219], &__pyx_n_s_version_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[220], &__pyx_n_s_version_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[221], &__pyx_kp_u_vs) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[222], &__pyx_kp_u_wrong_SID1) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[223], &__pyx_kp_u_wrong_SID2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[224], &__pyx_n_s_x) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #endif
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(1, 9, __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(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_snmp_parser(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_snmp_parser},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "snmp_parser",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_COMPILING_IN_LIMITED_API
      sizeof(__pyx_mstate), /* m_size */
    #else
      -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_COMPILING_IN_LIMITED_API
      __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
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initsnmp_parser(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initsnmp_parser(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_snmp_parser(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_snmp_parser(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
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)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        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, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    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;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    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_snmp_parser(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_5;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_6;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_7;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_8;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_9;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_10;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_11;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_12;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_13;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_14;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_15;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_16;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_17;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_18;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_19;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_20;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_21;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_22;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_23;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_24;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_25;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_26;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_27;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_28;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_29;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_30;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_31;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_32;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_33;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_34;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_35;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_36;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_37;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_38;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_39;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_40;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_41;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_42;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_43;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_44;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_45;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_46;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_47;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_48;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_49;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_50;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_51;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_52;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_53;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_54;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_55;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_56;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_57;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_58;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_59;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_60;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_61;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_62;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_63;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_64;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_65;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_66;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_67;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_68;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_69;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_70;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_71;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_72;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_73;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_74;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_75;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_76;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_77;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_78;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_79;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_80;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_81;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_82;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_83;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_84;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_85;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_86;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_87;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_88;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_89;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_90;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_91;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_92;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_93;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_94;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_95;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_96;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_97;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_98;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_99;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_100;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_101;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_102;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_103;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_104;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_105;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_106;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_107;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_108;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_109;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_110;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_111;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_112;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_113;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_114;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_115;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_116;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_117;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_118;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_119;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_120;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_121;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_122;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_123;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_124;
  static struct __pyx_t_8fastsnmp_11snmp_parser_SID12_ti __pyx_t_125[120];
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_126;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_127;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_128;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_129;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_130;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_131;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_132;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_133;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_134;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_135;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_136;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_137;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_138;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_139;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_140;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_141;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_142;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_143;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_144;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_145;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_146;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_147;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_148;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_149;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_150;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_151;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_152;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_153;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_154;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_155;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_156;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_157;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_158;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_159;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_160;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_161;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_162;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_163;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_164;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_165;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_166;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_167;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_168;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_169;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_170;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_171;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_172;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_173;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_174;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_175;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_176;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_177;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_178;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_179;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_180;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_181;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_182;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_183;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_184;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_185;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_186;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_187;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_188;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_189;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_190;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_191;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_192;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_193;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_194;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_195;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_196;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_197;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_198;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_199;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_200;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_201;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_202;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_203;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_204;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_205;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_206;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_207;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_208;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_209;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_210;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_211;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_212;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_213;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_214;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_215;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_216;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_217;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_218;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_219;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_220;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_221;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_222;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_223;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_224;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_225;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_226;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_227;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_228;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_229;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_230;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_231;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_232;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_233;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_234;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_235;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_236;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_237;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_238;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_239;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_240;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_241;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_242;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_243;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_244;
  struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_245;
  static struct __pyx_t_8fastsnmp_11snmp_parser_SID12_t __pyx_t_246[120];
  static char *__pyx_t_247[100];
  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 'snmp_parser' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("snmp_parser", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyState_AddModule(__pyx_t_1, &__pyx_moduledef) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #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("__Pyx_PyMODINIT_FUNC PyInit_snmp_parser(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_fastsnmp__snmp_parser) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "fastsnmp.snmp_parser")) {
      if (unlikely(PyDict_SetItemString(modules, "fastsnmp.snmp_parser", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  (void)__Pyx_modinit_type_init_code();
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "fastsnmp/snmp_parser.pyx":15
 * from libc.stdio cimport sprintf
 * from libc.string cimport memcpy
 * from itertools import cycle             # <<<<<<<<<<<<<<
 * from libc.stdint cimport uint64_t, uint32_t, uint8_t, int64_t, INT64_MAX
 * import struct
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_cycle);
  __Pyx_GIVEREF(__pyx_n_s_cycle);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_cycle);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_cycle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cycle, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":17
 * from itertools import cycle
 * from libc.stdint cimport uint64_t, uint32_t, uint8_t, int64_t, INT64_MAX
 * import struct             # <<<<<<<<<<<<<<
 * DEF MAX_OID_LEN_STR=500
 * DEF MAX_INT_LEN=30
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":20
 * DEF MAX_OID_LEN_STR=500
 * DEF MAX_INT_LEN=30
 * class SNMPException(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SNMPException, __pyx_n_s_SNMPException, (PyObject *) NULL, __pyx_n_s_fastsnmp_snmp_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SNMPException, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SNMPException, __pyx_t_4) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":24
 * 
 * 
 * class VarBindUnpackException(SNMPException):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SNMPException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_VarBindUnpackException, __pyx_n_s_VarBindUnpackException, (PyObject *) NULL, __pyx_n_s_fastsnmp_snmp_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_VarBindUnpackException, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VarBindUnpackException, __pyx_t_4) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":28
 * 
 * 
 * class VarBindContentException(SNMPException):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SNMPException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VarBindContentException, __pyx_n_s_VarBindContentException, (PyObject *) NULL, __pyx_n_s_fastsnmp_snmp_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VarBindContentException, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VarBindContentException, __pyx_t_4) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":31
 *     pass
 * 
 * class NoSuchInstance:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_NoSuchInstance, __pyx_n_s_NoSuchInstance, (PyObject *) NULL, __pyx_n_s_fastsnmp_snmp_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_NoSuchInstance, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoSuchInstance, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":34
 *     pass
 * 
 * class NoSuchObject:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_NoSuchObject, __pyx_n_s_NoSuchObject, (PyObject *) NULL, __pyx_n_s_fastsnmp_snmp_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_NoSuchObject, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoSuchObject, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":37
 *     pass
 * 
 * class EndOfMibView:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EndOfMibView, __pyx_n_s_EndOfMibView, (PyObject *) NULL, __pyx_n_s_fastsnmp_snmp_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_EndOfMibView, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EndOfMibView, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":40
 *     pass
 * 
 * end_of_mib_view = EndOfMibView()             # <<<<<<<<<<<<<<
 * 
 * DEF _UNIVERSAL = 0x00
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EndOfMibView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_end_of_mib_view, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":118
 * 
 * TYPE_NAME_TO_TYPE = {
 *     'Integer': ASN_U_INTEGER_BYTE,             # <<<<<<<<<<<<<<
 *     'Counter32': ASN_A_COUNTER32_BYTE,
 *     'Counter64': ASN_A_COUNTER64_BYTE,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Integer, __pyx_kp_b__10) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Counter32, __pyx_n_b_A) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Counter64, __pyx_n_b_F) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_OctetString, __pyx_kp_b__13) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Null, __pyx_kp_b__16) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ObjectID, __pyx_kp_b__9) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Sequence, __pyx_kp_b_0) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPE_NAME_TO_TYPE, __pyx_t_1) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":129
 * 
 * ASN_SNMP_MSG_TYPES = {
 *     'Get': ASN_SNMP_GET_BYTE,             # <<<<<<<<<<<<<<
 *     'GetNext': ASN_SNMP_GETNEXT_BYTE,
 *     'Response': ASN_SNMP_RESPONSE_BYTE,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Get, __pyx_kp_b__17) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_GetNext, __pyx_kp_b__18) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Response, __pyx_kp_b__19) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Set, __pyx_kp_b__20) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Trap, __pyx_kp_b__21) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_GetBulk, __pyx_kp_b__11) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ASN_SNMP_MSG_TYPES, __pyx_t_1) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":138
 * 
 * # caches
 * length_cache = {}             # <<<<<<<<<<<<<<
 * length_cache[0] = b'\x00'
 * length_cache[1] = b'\x01'
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_length_cache, __pyx_t_1) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":139
 * # caches
 * length_cache = {}
 * length_cache[0] = b'\x00'             # <<<<<<<<<<<<<<
 * length_cache[1] = b'\x01'
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_length_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 0, __pyx_kp_b__12, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":140
 * length_cache = {}
 * length_cache[0] = b'\x00'
 * length_cache[1] = b'\x01'             # <<<<<<<<<<<<<<
 * 
 * # sub id 1 and 2 bytes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_length_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 1, __pyx_kp_b__14, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":153
 *     char *str
 * 
 * cdef SID12_ti *sid12i = [{'SID1': 0, 'SID2': 0},{'SID1': 0, 'SID2': 1},{'SID1': 0, 'SID2': 2},{'SID1': 0, 'SID2': 3},{'SID1': 0, 'SID2': 4},{'SID1': 0, 'SID2': 5},{'SID1': 0, 'SID2': 6},{'SID1': 0, 'SID2': 7},{'SID1': 0, 'SID2': 8},{'SID1': 0, 'SID2': 9},{'SID1': 0, 'SID2': 10},{'SID1': 0, 'SID2': 11},{'SID1': 0, 'SID2': 12},{'SID1': 0, 'SID2': 13},{'SID1': 0, 'SID2': 14},{'SID1': 0, 'SID2': 15},{'SID1': 0, 'SID2': 16},{'SID1': 0, 'SID2': 17},{'SID1': 0, 'SID2': 18},{'SID1': 0, 'SID2': 19},{'SID1': 0, 'SID2': 20},{'SID1': 0, 'SID2': 21},{'SID1': 0, 'SID2': 22},{'SID1': 0, 'SID2': 23},{'SID1': 0, 'SID2': 24},{'SID1': 0, 'SID2': 25},{'SID1': 0, 'SID2': 26},{'SID1': 0, 'SID2': 27},{'SID1': 0, 'SID2': 28},{'SID1': 0, 'SID2': 29},{'SID1': 0, 'SID2': 30},{'SID1': 0, 'SID2': 31},{'SID1': 0, 'SID2': 32},{'SID1': 0, 'SID2': 33},{'SID1': 0, 'SID2': 34},{'SID1': 0, 'SID2': 35},{'SID1': 0, 'SID2': 36},{'SID1': 0, 'SID2': 37},{'SID1': 0, 'SID2': 38},{'SID1': 0, 'SID2': 39},{'SID1': 1, 'SID2': 0},{'SID1': 1, 'SID2': 1},{'SID1': 1, 'SID2': 2},{'SID1': 1, 'SID2': 3},{'SID1': 1, 'SID2': 4},{'SID1': 1, 'SID2': 5},{'SID1': 1, 'SID2': 6},{'SID1': 1, 'SID2': 7},{'SID1': 1, 'SID2': 8},{'SID1': 1, 'SID2': 9},{'SID1': 1, 'SID2': 10},{'SID1': 1, 'SID2': 11},{'SID1': 1, 'SID2': 12},{'SID1': 1, 'SID2': 13},{'SID1': 1, 'SID2': 14},{'SID1': 1, 'SID2': 15},{'SID1': 1, 'SID2': 16},{'SID1': 1, 'SID2': 17},{'SID1': 1, 'SID2': 18},{'SID1': 1, 'SID2': 19},{'SID1': 1, 'SID2': 20},{'SID1': 1, 'SID2': 21},{'SID1': 1, 'SID2': 22},{'SID1': 1, 'SID2': 23},{'SID1': 1, 'SID2': 24},{'SID1': 1, 'SID2': 25},{'SID1': 1, 'SID2': 26},{'SID1': 1, 'SID2': 27},{'SID1': 1, 'SID2': 28},{'SID1': 1, 'SID2': 29},{'SID1': 1, 'SID2': 30},{'SID1': 1, 'SID2': 31},{'SID1': 1, 'SID2': 32},{'SID1': 1, 'SID2': 33},{'SID1': 1, 'SID2': 34},{'SID1': 1, 'SID2': 35},{'SID1': 1, 'SID2': 36},{'SID1': 1, 'SID2': 37},{'SID1': 1, 'SID2': 38},{'SID1': 1, 'SID2': 39},{'SID1': 2, 'SID2': 0},{'SID1': 2, 'SID2': 1},{'SID1': 2, 'SID2': 2},{'SID1': 2, 'SID2': 3},{'SID1': 2, 'SID2': 4},{'SID1': 2, 'SID2': 5},{'SID1': 2, 'SID2': 6},{'SID1': 2, 'SID2': 7},{'SID1': 2, 'SID2': 8},{'SID1': 2, 'SID2': 9},{'SID1': 2, 'SID2': 10},{'SID1': 2, 'SID2': 11},{'SID1': 2, 'SID2': 12},{'SID1': 2, 'SID2': 13},{'SID1': 2, 'SID2': 14},{'SID1': 2, 'SID2': 15},{'SID1': 2, 'SID2': 16},{'SID1': 2, 'SID2': 17},{'SID1': 2, 'SID2': 18},{'SID1': 2, 'SID2': 19},{'SID1': 2, 'SID2': 20},{'SID1': 2, 'SID2': 21},{'SID1': 2, 'SID2': 22},{'SID1': 2, 'SID2': 23},{'SID1': 2, 'SID2': 24},{'SID1': 2, 'SID2': 25},{'SID1': 2, 'SID2': 26},{'SID1': 2, 'SID2': 27},{'SID1': 2, 'SID2': 28},{'SID1': 2, 'SID2': 29},{'SID1': 2, 'SID2': 30},{'SID1': 2, 'SID2': 31},{'SID1': 2, 'SID2': 32},{'SID1': 2, 'SID2': 33},{'SID1': 2, 'SID2': 34},{'SID1': 2, 'SID2': 35},{'SID1': 2, 'SID2': 36},{'SID1': 2, 'SID2': 37},{'SID1': 2, 'SID2': 38},{'SID1': 2, 'SID2': 39}]             # <<<<<<<<<<<<<<
 * cdef SID12_t *sid12s = [{'str': b'0.0\x00', 'strlen': 3},{'str': b'0.1\x00', 'strlen': 3},{'str': b'0.2\x00', 'strlen': 3},{'str': b'0.3\x00', 'strlen': 3},{'str': b'0.4\x00', 'strlen': 3},{'str': b'0.5\x00', 'strlen': 3},{'str': b'0.6\x00', 'strlen': 3},{'str': b'0.7\x00', 'strlen': 3},{'str': b'0.8\x00', 'strlen': 3},{'str': b'0.9\x00', 'strlen': 3},{'str': b'0.10', 'strlen': 4},{'str': b'0.11', 'strlen': 4},{'str': b'0.12', 'strlen': 4},{'str': b'0.13', 'strlen': 4},{'str': b'0.14', 'strlen': 4},{'str': b'0.15', 'strlen': 4},{'str': b'0.16', 'strlen': 4},{'str': b'0.17', 'strlen': 4},{'str': b'0.18', 'strlen': 4},{'str': b'0.19', 'strlen': 4},{'str': b'0.20', 'strlen': 4},{'str': b'0.21', 'strlen': 4},{'str': b'0.22', 'strlen': 4},{'str': b'0.23', 'strlen': 4},{'str': b'0.24', 'strlen': 4},{'str': b'0.25', 'strlen': 4},{'str': b'0.26', 'strlen': 4},{'str': b'0.27', 'strlen': 4},{'str': b'0.28', 'strlen': 4},{'str': b'0.29', 'strlen': 4},{'str': b'0.30', 'strlen': 4},{'str': b'0.31', 'strlen': 4},{'str': b'0.32', 'strlen': 4},{'str': b'0.33', 'strlen': 4},{'str': b'0.34', 'strlen': 4},{'str': b'0.35', 'strlen': 4},{'str': b'0.36', 'strlen': 4},{'str': b'0.37', 'strlen': 4},{'str': b'0.38', 'strlen': 4},{'str': b'0.39', 'strlen': 4},{'str': b'1.0\x00', 'strlen': 3},{'str': b'1.1\x00', 'strlen': 3},{'str': b'1.2\x00', 'strlen': 3},{'str': b'1.3\x00', 'strlen': 3},{'str': b'1.4\x00', 'strlen': 3},{'str': b'1.5\x00', 'strlen': 3},{'str': b'1.6\x00', 'strlen': 3},{'str': b'1.7\x00', 'strlen': 3},{'str': b'1.8\x00', 'strlen': 3},{'str': b'1.9\x00', 'strlen': 3},{'str': b'1.10', 'strlen': 4},{'str': b'1.11', 'strlen': 4},{'str': b'1.12', 'strlen': 4},{'str': b'1.13', 'strlen': 4},{'str': b'1.14', 'strlen': 4},{'str': b'1.15', 'strlen': 4},{'str': b'1.16', 'strlen': 4},{'str': b'1.17', 'strlen': 4},{'str': b'1.18', 'strlen': 4},{'str': b'1.19', 'strlen': 4},{'str': b'1.20', 'strlen': 4},{'str': b'1.21', 'strlen': 4},{'str': b'1.22', 'strlen': 4},{'str': b'1.23', 'strlen': 4},{'str': b'1.24', 'strlen': 4},{'str': b'1.25', 'strlen': 4},{'str': b'1.26', 'strlen': 4},{'str': b'1.27', 'strlen': 4},{'str': b'1.28', 'strlen': 4},{'str': b'1.29', 'strlen': 4},{'str': b'1.30', 'strlen': 4},{'str': b'1.31', 'strlen': 4},{'str': b'1.32', 'strlen': 4},{'str': b'1.33', 'strlen': 4},{'str': b'1.34', 'strlen': 4},{'str': b'1.35', 'strlen': 4},{'str': b'1.36', 'strlen': 4},{'str': b'1.37', 'strlen': 4},{'str': b'1.38', 'strlen': 4},{'str': b'1.39', 'strlen': 4},{'str': b'2.0\x00', 'strlen': 3},{'str': b'2.1\x00', 'strlen': 3},{'str': b'2.2\x00', 'strlen': 3},{'str': b'2.3\x00', 'strlen': 3},{'str': b'2.4\x00', 'strlen': 3},{'str': b'2.5\x00', 'strlen': 3},{'str': b'2.6\x00', 'strlen': 3},{'str': b'2.7\x00', 'strlen': 3},{'str': b'2.8\x00', 'strlen': 3},{'str': b'2.9\x00', 'strlen': 3},{'str': b'2.10', 'strlen': 4},{'str': b'2.11', 'strlen': 4},{'str': b'2.12', 'strlen': 4},{'str': b'2.13', 'strlen': 4},{'str': b'2.14', 'strlen': 4},{'str': b'2.15', 'strlen': 4},{'str': b'2.16', 'strlen': 4},{'str': b'2.17', 'strlen': 4},{'str': b'2.18', 'strlen': 4},{'str': b'2.19', 'strlen': 4},{'str': b'2.20', 'strlen': 4},{'str': b'2.21', 'strlen': 4},{'str': b'2.22', 'strlen': 4},{'str': b'2.23', 'strlen': 4},{'str': b'2.24', 'strlen': 4},{'str': b'2.25', 'strlen': 4},{'str': b'2.26', 'strlen': 4},{'str': b'2.27', 'strlen': 4},{'str': b'2.28', 'strlen': 4},{'str': b'2.29', 'strlen': 4},{'str': b'2.30', 'strlen': 4},{'str': b'2.31', 'strlen': 4},{'str': b'2.32', 'strlen': 4},{'str': b'2.33', 'strlen': 4},{'str': b'2.34', 'strlen': 4},{'str': b'2.35', 'strlen': 4},{'str': b'2.36', 'strlen': 4},{'str': b'2.37', 'strlen': 4},{'str': b'2.38', 'strlen': 4},{'str': b'2.39', 'strlen': 4},]
 * 
 */
  __pyx_t_5.SID1 = 0;
  __pyx_t_5.SID2 = 0;
  __pyx_t_6.SID1 = 0;
  __pyx_t_6.SID2 = 1;
  __pyx_t_7.SID1 = 0;
  __pyx_t_7.SID2 = 2;
  __pyx_t_8.SID1 = 0;
  __pyx_t_8.SID2 = 3;
  __pyx_t_9.SID1 = 0;
  __pyx_t_9.SID2 = 4;
  __pyx_t_10.SID1 = 0;
  __pyx_t_10.SID2 = 5;
  __pyx_t_11.SID1 = 0;
  __pyx_t_11.SID2 = 6;
  __pyx_t_12.SID1 = 0;
  __pyx_t_12.SID2 = 7;
  __pyx_t_13.SID1 = 0;
  __pyx_t_13.SID2 = 8;
  __pyx_t_14.SID1 = 0;
  __pyx_t_14.SID2 = 9;
  __pyx_t_15.SID1 = 0;
  __pyx_t_15.SID2 = 10;
  __pyx_t_16.SID1 = 0;
  __pyx_t_16.SID2 = 11;
  __pyx_t_17.SID1 = 0;
  __pyx_t_17.SID2 = 12;
  __pyx_t_18.SID1 = 0;
  __pyx_t_18.SID2 = 13;
  __pyx_t_19.SID1 = 0;
  __pyx_t_19.SID2 = 14;
  __pyx_t_20.SID1 = 0;
  __pyx_t_20.SID2 = 15;
  __pyx_t_21.SID1 = 0;
  __pyx_t_21.SID2 = 16;
  __pyx_t_22.SID1 = 0;
  __pyx_t_22.SID2 = 17;
  __pyx_t_23.SID1 = 0;
  __pyx_t_23.SID2 = 18;
  __pyx_t_24.SID1 = 0;
  __pyx_t_24.SID2 = 19;
  __pyx_t_25.SID1 = 0;
  __pyx_t_25.SID2 = 20;
  __pyx_t_26.SID1 = 0;
  __pyx_t_26.SID2 = 21;
  __pyx_t_27.SID1 = 0;
  __pyx_t_27.SID2 = 22;
  __pyx_t_28.SID1 = 0;
  __pyx_t_28.SID2 = 23;
  __pyx_t_29.SID1 = 0;
  __pyx_t_29.SID2 = 24;
  __pyx_t_30.SID1 = 0;
  __pyx_t_30.SID2 = 25;
  __pyx_t_31.SID1 = 0;
  __pyx_t_31.SID2 = 26;
  __pyx_t_32.SID1 = 0;
  __pyx_t_32.SID2 = 27;
  __pyx_t_33.SID1 = 0;
  __pyx_t_33.SID2 = 28;
  __pyx_t_34.SID1 = 0;
  __pyx_t_34.SID2 = 29;
  __pyx_t_35.SID1 = 0;
  __pyx_t_35.SID2 = 30;
  __pyx_t_36.SID1 = 0;
  __pyx_t_36.SID2 = 31;
  __pyx_t_37.SID1 = 0;
  __pyx_t_37.SID2 = 32;
  __pyx_t_38.SID1 = 0;
  __pyx_t_38.SID2 = 33;
  __pyx_t_39.SID1 = 0;
  __pyx_t_39.SID2 = 34;
  __pyx_t_40.SID1 = 0;
  __pyx_t_40.SID2 = 35;
  __pyx_t_41.SID1 = 0;
  __pyx_t_41.SID2 = 36;
  __pyx_t_42.SID1 = 0;
  __pyx_t_42.SID2 = 37;
  __pyx_t_43.SID1 = 0;
  __pyx_t_43.SID2 = 38;
  __pyx_t_44.SID1 = 0;
  __pyx_t_44.SID2 = 39;
  __pyx_t_45.SID1 = 1;
  __pyx_t_45.SID2 = 0;
  __pyx_t_46.SID1 = 1;
  __pyx_t_46.SID2 = 1;
  __pyx_t_47.SID1 = 1;
  __pyx_t_47.SID2 = 2;
  __pyx_t_48.SID1 = 1;
  __pyx_t_48.SID2 = 3;
  __pyx_t_49.SID1 = 1;
  __pyx_t_49.SID2 = 4;
  __pyx_t_50.SID1 = 1;
  __pyx_t_50.SID2 = 5;
  __pyx_t_51.SID1 = 1;
  __pyx_t_51.SID2 = 6;
  __pyx_t_52.SID1 = 1;
  __pyx_t_52.SID2 = 7;
  __pyx_t_53.SID1 = 1;
  __pyx_t_53.SID2 = 8;
  __pyx_t_54.SID1 = 1;
  __pyx_t_54.SID2 = 9;
  __pyx_t_55.SID1 = 1;
  __pyx_t_55.SID2 = 10;
  __pyx_t_56.SID1 = 1;
  __pyx_t_56.SID2 = 11;
  __pyx_t_57.SID1 = 1;
  __pyx_t_57.SID2 = 12;
  __pyx_t_58.SID1 = 1;
  __pyx_t_58.SID2 = 13;
  __pyx_t_59.SID1 = 1;
  __pyx_t_59.SID2 = 14;
  __pyx_t_60.SID1 = 1;
  __pyx_t_60.SID2 = 15;
  __pyx_t_61.SID1 = 1;
  __pyx_t_61.SID2 = 16;
  __pyx_t_62.SID1 = 1;
  __pyx_t_62.SID2 = 17;
  __pyx_t_63.SID1 = 1;
  __pyx_t_63.SID2 = 18;
  __pyx_t_64.SID1 = 1;
  __pyx_t_64.SID2 = 19;
  __pyx_t_65.SID1 = 1;
  __pyx_t_65.SID2 = 20;
  __pyx_t_66.SID1 = 1;
  __pyx_t_66.SID2 = 21;
  __pyx_t_67.SID1 = 1;
  __pyx_t_67.SID2 = 22;
  __pyx_t_68.SID1 = 1;
  __pyx_t_68.SID2 = 23;
  __pyx_t_69.SID1 = 1;
  __pyx_t_69.SID2 = 24;
  __pyx_t_70.SID1 = 1;
  __pyx_t_70.SID2 = 25;
  __pyx_t_71.SID1 = 1;
  __pyx_t_71.SID2 = 26;
  __pyx_t_72.SID1 = 1;
  __pyx_t_72.SID2 = 27;
  __pyx_t_73.SID1 = 1;
  __pyx_t_73.SID2 = 28;
  __pyx_t_74.SID1 = 1;
  __pyx_t_74.SID2 = 29;
  __pyx_t_75.SID1 = 1;
  __pyx_t_75.SID2 = 30;
  __pyx_t_76.SID1 = 1;
  __pyx_t_76.SID2 = 31;
  __pyx_t_77.SID1 = 1;
  __pyx_t_77.SID2 = 32;
  __pyx_t_78.SID1 = 1;
  __pyx_t_78.SID2 = 33;
  __pyx_t_79.SID1 = 1;
  __pyx_t_79.SID2 = 34;
  __pyx_t_80.SID1 = 1;
  __pyx_t_80.SID2 = 35;
  __pyx_t_81.SID1 = 1;
  __pyx_t_81.SID2 = 36;
  __pyx_t_82.SID1 = 1;
  __pyx_t_82.SID2 = 37;
  __pyx_t_83.SID1 = 1;
  __pyx_t_83.SID2 = 38;
  __pyx_t_84.SID1 = 1;
  __pyx_t_84.SID2 = 39;
  __pyx_t_85.SID1 = 2;
  __pyx_t_85.SID2 = 0;
  __pyx_t_86.SID1 = 2;
  __pyx_t_86.SID2 = 1;
  __pyx_t_87.SID1 = 2;
  __pyx_t_87.SID2 = 2;
  __pyx_t_88.SID1 = 2;
  __pyx_t_88.SID2 = 3;
  __pyx_t_89.SID1 = 2;
  __pyx_t_89.SID2 = 4;
  __pyx_t_90.SID1 = 2;
  __pyx_t_90.SID2 = 5;
  __pyx_t_91.SID1 = 2;
  __pyx_t_91.SID2 = 6;
  __pyx_t_92.SID1 = 2;
  __pyx_t_92.SID2 = 7;
  __pyx_t_93.SID1 = 2;
  __pyx_t_93.SID2 = 8;
  __pyx_t_94.SID1 = 2;
  __pyx_t_94.SID2 = 9;
  __pyx_t_95.SID1 = 2;
  __pyx_t_95.SID2 = 10;
  __pyx_t_96.SID1 = 2;
  __pyx_t_96.SID2 = 11;
  __pyx_t_97.SID1 = 2;
  __pyx_t_97.SID2 = 12;
  __pyx_t_98.SID1 = 2;
  __pyx_t_98.SID2 = 13;
  __pyx_t_99.SID1 = 2;
  __pyx_t_99.SID2 = 14;
  __pyx_t_100.SID1 = 2;
  __pyx_t_100.SID2 = 15;
  __pyx_t_101.SID1 = 2;
  __pyx_t_101.SID2 = 16;
  __pyx_t_102.SID1 = 2;
  __pyx_t_102.SID2 = 17;
  __pyx_t_103.SID1 = 2;
  __pyx_t_103.SID2 = 18;
  __pyx_t_104.SID1 = 2;
  __pyx_t_104.SID2 = 19;
  __pyx_t_105.SID1 = 2;
  __pyx_t_105.SID2 = 20;
  __pyx_t_106.SID1 = 2;
  __pyx_t_106.SID2 = 21;
  __pyx_t_107.SID1 = 2;
  __pyx_t_107.SID2 = 22;
  __pyx_t_108.SID1 = 2;
  __pyx_t_108.SID2 = 23;
  __pyx_t_109.SID1 = 2;
  __pyx_t_109.SID2 = 24;
  __pyx_t_110.SID1 = 2;
  __pyx_t_110.SID2 = 25;
  __pyx_t_111.SID1 = 2;
  __pyx_t_111.SID2 = 26;
  __pyx_t_112.SID1 = 2;
  __pyx_t_112.SID2 = 27;
  __pyx_t_113.SID1 = 2;
  __pyx_t_113.SID2 = 28;
  __pyx_t_114.SID1 = 2;
  __pyx_t_114.SID2 = 29;
  __pyx_t_115.SID1 = 2;
  __pyx_t_115.SID2 = 30;
  __pyx_t_116.SID1 = 2;
  __pyx_t_116.SID2 = 31;
  __pyx_t_117.SID1 = 2;
  __pyx_t_117.SID2 = 32;
  __pyx_t_118.SID1 = 2;
  __pyx_t_118.SID2 = 33;
  __pyx_t_119.SID1 = 2;
  __pyx_t_119.SID2 = 34;
  __pyx_t_120.SID1 = 2;
  __pyx_t_120.SID2 = 35;
  __pyx_t_121.SID1 = 2;
  __pyx_t_121.SID2 = 36;
  __pyx_t_122.SID1 = 2;
  __pyx_t_122.SID2 = 37;
  __pyx_t_123.SID1 = 2;
  __pyx_t_123.SID2 = 38;
  __pyx_t_124.SID1 = 2;
  __pyx_t_124.SID2 = 39;
  __pyx_t_125[0] = __pyx_t_5;
  __pyx_t_125[1] = __pyx_t_6;
  __pyx_t_125[2] = __pyx_t_7;
  __pyx_t_125[3] = __pyx_t_8;
  __pyx_t_125[4] = __pyx_t_9;
  __pyx_t_125[5] = __pyx_t_10;
  __pyx_t_125[6] = __pyx_t_11;
  __pyx_t_125[7] = __pyx_t_12;
  __pyx_t_125[8] = __pyx_t_13;
  __pyx_t_125[9] = __pyx_t_14;
  __pyx_t_125[10] = __pyx_t_15;
  __pyx_t_125[11] = __pyx_t_16;
  __pyx_t_125[12] = __pyx_t_17;
  __pyx_t_125[13] = __pyx_t_18;
  __pyx_t_125[14] = __pyx_t_19;
  __pyx_t_125[15] = __pyx_t_20;
  __pyx_t_125[16] = __pyx_t_21;
  __pyx_t_125[17] = __pyx_t_22;
  __pyx_t_125[18] = __pyx_t_23;
  __pyx_t_125[19] = __pyx_t_24;
  __pyx_t_125[20] = __pyx_t_25;
  __pyx_t_125[21] = __pyx_t_26;
  __pyx_t_125[22] = __pyx_t_27;
  __pyx_t_125[23] = __pyx_t_28;
  __pyx_t_125[24] = __pyx_t_29;
  __pyx_t_125[25] = __pyx_t_30;
  __pyx_t_125[26] = __pyx_t_31;
  __pyx_t_125[27] = __pyx_t_32;
  __pyx_t_125[28] = __pyx_t_33;
  __pyx_t_125[29] = __pyx_t_34;
  __pyx_t_125[30] = __pyx_t_35;
  __pyx_t_125[31] = __pyx_t_36;
  __pyx_t_125[32] = __pyx_t_37;
  __pyx_t_125[33] = __pyx_t_38;
  __pyx_t_125[34] = __pyx_t_39;
  __pyx_t_125[35] = __pyx_t_40;
  __pyx_t_125[36] = __pyx_t_41;
  __pyx_t_125[37] = __pyx_t_42;
  __pyx_t_125[38] = __pyx_t_43;
  __pyx_t_125[39] = __pyx_t_44;
  __pyx_t_125[40] = __pyx_t_45;
  __pyx_t_125[41] = __pyx_t_46;
  __pyx_t_125[42] = __pyx_t_47;
  __pyx_t_125[43] = __pyx_t_48;
  __pyx_t_125[44] = __pyx_t_49;
  __pyx_t_125[45] = __pyx_t_50;
  __pyx_t_125[46] = __pyx_t_51;
  __pyx_t_125[47] = __pyx_t_52;
  __pyx_t_125[48] = __pyx_t_53;
  __pyx_t_125[49] = __pyx_t_54;
  __pyx_t_125[50] = __pyx_t_55;
  __pyx_t_125[51] = __pyx_t_56;
  __pyx_t_125[52] = __pyx_t_57;
  __pyx_t_125[53] = __pyx_t_58;
  __pyx_t_125[54] = __pyx_t_59;
  __pyx_t_125[55] = __pyx_t_60;
  __pyx_t_125[56] = __pyx_t_61;
  __pyx_t_125[57] = __pyx_t_62;
  __pyx_t_125[58] = __pyx_t_63;
  __pyx_t_125[59] = __pyx_t_64;
  __pyx_t_125[60] = __pyx_t_65;
  __pyx_t_125[61] = __pyx_t_66;
  __pyx_t_125[62] = __pyx_t_67;
  __pyx_t_125[63] = __pyx_t_68;
  __pyx_t_125[64] = __pyx_t_69;
  __pyx_t_125[65] = __pyx_t_70;
  __pyx_t_125[66] = __pyx_t_71;
  __pyx_t_125[67] = __pyx_t_72;
  __pyx_t_125[68] = __pyx_t_73;
  __pyx_t_125[69] = __pyx_t_74;
  __pyx_t_125[70] = __pyx_t_75;
  __pyx_t_125[71] = __pyx_t_76;
  __pyx_t_125[72] = __pyx_t_77;
  __pyx_t_125[73] = __pyx_t_78;
  __pyx_t_125[74] = __pyx_t_79;
  __pyx_t_125[75] = __pyx_t_80;
  __pyx_t_125[76] = __pyx_t_81;
  __pyx_t_125[77] = __pyx_t_82;
  __pyx_t_125[78] = __pyx_t_83;
  __pyx_t_125[79] = __pyx_t_84;
  __pyx_t_125[80] = __pyx_t_85;
  __pyx_t_125[81] = __pyx_t_86;
  __pyx_t_125[82] = __pyx_t_87;
  __pyx_t_125[83] = __pyx_t_88;
  __pyx_t_125[84] = __pyx_t_89;
  __pyx_t_125[85] = __pyx_t_90;
  __pyx_t_125[86] = __pyx_t_91;
  __pyx_t_125[87] = __pyx_t_92;
  __pyx_t_125[88] = __pyx_t_93;
  __pyx_t_125[89] = __pyx_t_94;
  __pyx_t_125[90] = __pyx_t_95;
  __pyx_t_125[91] = __pyx_t_96;
  __pyx_t_125[92] = __pyx_t_97;
  __pyx_t_125[93] = __pyx_t_98;
  __pyx_t_125[94] = __pyx_t_99;
  __pyx_t_125[95] = __pyx_t_100;
  __pyx_t_125[96] = __pyx_t_101;
  __pyx_t_125[97] = __pyx_t_102;
  __pyx_t_125[98] = __pyx_t_103;
  __pyx_t_125[99] = __pyx_t_104;
  __pyx_t_125[100] = __pyx_t_105;
  __pyx_t_125[101] = __pyx_t_106;
  __pyx_t_125[102] = __pyx_t_107;
  __pyx_t_125[103] = __pyx_t_108;
  __pyx_t_125[104] = __pyx_t_109;
  __pyx_t_125[105] = __pyx_t_110;
  __pyx_t_125[106] = __pyx_t_111;
  __pyx_t_125[107] = __pyx_t_112;
  __pyx_t_125[108] = __pyx_t_113;
  __pyx_t_125[109] = __pyx_t_114;
  __pyx_t_125[110] = __pyx_t_115;
  __pyx_t_125[111] = __pyx_t_116;
  __pyx_t_125[112] = __pyx_t_117;
  __pyx_t_125[113] = __pyx_t_118;
  __pyx_t_125[114] = __pyx_t_119;
  __pyx_t_125[115] = __pyx_t_120;
  __pyx_t_125[116] = __pyx_t_121;
  __pyx_t_125[117] = __pyx_t_122;
  __pyx_t_125[118] = __pyx_t_123;
  __pyx_t_125[119] = __pyx_t_124;
  __pyx_v_8fastsnmp_11snmp_parser_sid12i = __pyx_t_125;

  /* "fastsnmp/snmp_parser.pyx":154
 * 
 * cdef SID12_ti *sid12i = [{'SID1': 0, 'SID2': 0},{'SID1': 0, 'SID2': 1},{'SID1': 0, 'SID2': 2},{'SID1': 0, 'SID2': 3},{'SID1': 0, 'SID2': 4},{'SID1': 0, 'SID2': 5},{'SID1': 0, 'SID2': 6},{'SID1': 0, 'SID2': 7},{'SID1': 0, 'SID2': 8},{'SID1': 0, 'SID2': 9},{'SID1': 0, 'SID2': 10},{'SID1': 0, 'SID2': 11},{'SID1': 0, 'SID2': 12},{'SID1': 0, 'SID2': 13},{'SID1': 0, 'SID2': 14},{'SID1': 0, 'SID2': 15},{'SID1': 0, 'SID2': 16},{'SID1': 0, 'SID2': 17},{'SID1': 0, 'SID2': 18},{'SID1': 0, 'SID2': 19},{'SID1': 0, 'SID2': 20},{'SID1': 0, 'SID2': 21},{'SID1': 0, 'SID2': 22},{'SID1': 0, 'SID2': 23},{'SID1': 0, 'SID2': 24},{'SID1': 0, 'SID2': 25},{'SID1': 0, 'SID2': 26},{'SID1': 0, 'SID2': 27},{'SID1': 0, 'SID2': 28},{'SID1': 0, 'SID2': 29},{'SID1': 0, 'SID2': 30},{'SID1': 0, 'SID2': 31},{'SID1': 0, 'SID2': 32},{'SID1': 0, 'SID2': 33},{'SID1': 0, 'SID2': 34},{'SID1': 0, 'SID2': 35},{'SID1': 0, 'SID2': 36},{'SID1': 0, 'SID2': 37},{'SID1': 0, 'SID2': 38},{'SID1': 0, 'SID2': 39},{'SID1': 1, 'SID2': 0},{'SID1': 1, 'SID2': 1},{'SID1': 1, 'SID2': 2},{'SID1': 1, 'SID2': 3},{'SID1': 1, 'SID2': 4},{'SID1': 1, 'SID2': 5},{'SID1': 1, 'SID2': 6},{'SID1': 1, 'SID2': 7},{'SID1': 1, 'SID2': 8},{'SID1': 1, 'SID2': 9},{'SID1': 1, 'SID2': 10},{'SID1': 1, 'SID2': 11},{'SID1': 1, 'SID2': 12},{'SID1': 1, 'SID2': 13},{'SID1': 1, 'SID2': 14},{'SID1': 1, 'SID2': 15},{'SID1': 1, 'SID2': 16},{'SID1': 1, 'SID2': 17},{'SID1': 1, 'SID2': 18},{'SID1': 1, 'SID2': 19},{'SID1': 1, 'SID2': 20},{'SID1': 1, 'SID2': 21},{'SID1': 1, 'SID2': 22},{'SID1': 1, 'SID2': 23},{'SID1': 1, 'SID2': 24},{'SID1': 1, 'SID2': 25},{'SID1': 1, 'SID2': 26},{'SID1': 1, 'SID2': 27},{'SID1': 1, 'SID2': 28},{'SID1': 1, 'SID2': 29},{'SID1': 1, 'SID2': 30},{'SID1': 1, 'SID2': 31},{'SID1': 1, 'SID2': 32},{'SID1': 1, 'SID2': 33},{'SID1': 1, 'SID2': 34},{'SID1': 1, 'SID2': 35},{'SID1': 1, 'SID2': 36},{'SID1': 1, 'SID2': 37},{'SID1': 1, 'SID2': 38},{'SID1': 1, 'SID2': 39},{'SID1': 2, 'SID2': 0},{'SID1': 2, 'SID2': 1},{'SID1': 2, 'SID2': 2},{'SID1': 2, 'SID2': 3},{'SID1': 2, 'SID2': 4},{'SID1': 2, 'SID2': 5},{'SID1': 2, 'SID2': 6},{'SID1': 2, 'SID2': 7},{'SID1': 2, 'SID2': 8},{'SID1': 2, 'SID2': 9},{'SID1': 2, 'SID2': 10},{'SID1': 2, 'SID2': 11},{'SID1': 2, 'SID2': 12},{'SID1': 2, 'SID2': 13},{'SID1': 2, 'SID2': 14},{'SID1': 2, 'SID2': 15},{'SID1': 2, 'SID2': 16},{'SID1': 2, 'SID2': 17},{'SID1': 2, 'SID2': 18},{'SID1': 2, 'SID2': 19},{'SID1': 2, 'SID2': 20},{'SID1': 2, 'SID2': 21},{'SID1': 2, 'SID2': 22},{'SID1': 2, 'SID2': 23},{'SID1': 2, 'SID2': 24},{'SID1': 2, 'SID2': 25},{'SID1': 2, 'SID2': 26},{'SID1': 2, 'SID2': 27},{'SID1': 2, 'SID2': 28},{'SID1': 2, 'SID2': 29},{'SID1': 2, 'SID2': 30},{'SID1': 2, 'SID2': 31},{'SID1': 2, 'SID2': 32},{'SID1': 2, 'SID2': 33},{'SID1': 2, 'SID2': 34},{'SID1': 2, 'SID2': 35},{'SID1': 2, 'SID2': 36},{'SID1': 2, 'SID2': 37},{'SID1': 2, 'SID2': 38},{'SID1': 2, 'SID2': 39}]
 * cdef SID12_t *sid12s = [{'str': b'0.0\x00', 'strlen': 3},{'str': b'0.1\x00', 'strlen': 3},{'str': b'0.2\x00', 'strlen': 3},{'str': b'0.3\x00', 'strlen': 3},{'str': b'0.4\x00', 'strlen': 3},{'str': b'0.5\x00', 'strlen': 3},{'str': b'0.6\x00', 'strlen': 3},{'str': b'0.7\x00', 'strlen': 3},{'str': b'0.8\x00', 'strlen': 3},{'str': b'0.9\x00', 'strlen': 3},{'str': b'0.10', 'strlen': 4},{'str': b'0.11', 'strlen': 4},{'str': b'0.12', 'strlen': 4},{'str': b'0.13', 'strlen': 4},{'str': b'0.14', 'strlen': 4},{'str': b'0.15', 'strlen': 4},{'str': b'0.16', 'strlen': 4},{'str': b'0.17', 'strlen': 4},{'str': b'0.18', 'strlen': 4},{'str': b'0.19', 'strlen': 4},{'str': b'0.20', 'strlen': 4},{'str': b'0.21', 'strlen': 4},{'str': b'0.22', 'strlen': 4},{'str': b'0.23', 'strlen': 4},{'str': b'0.24', 'strlen': 4},{'str': b'0.25', 'strlen': 4},{'str': b'0.26', 'strlen': 4},{'str': b'0.27', 'strlen': 4},{'str': b'0.28', 'strlen': 4},{'str': b'0.29', 'strlen': 4},{'str': b'0.30', 'strlen': 4},{'str': b'0.31', 'strlen': 4},{'str': b'0.32', 'strlen': 4},{'str': b'0.33', 'strlen': 4},{'str': b'0.34', 'strlen': 4},{'str': b'0.35', 'strlen': 4},{'str': b'0.36', 'strlen': 4},{'str': b'0.37', 'strlen': 4},{'str': b'0.38', 'strlen': 4},{'str': b'0.39', 'strlen': 4},{'str': b'1.0\x00', 'strlen': 3},{'str': b'1.1\x00', 'strlen': 3},{'str': b'1.2\x00', 'strlen': 3},{'str': b'1.3\x00', 'strlen': 3},{'str': b'1.4\x00', 'strlen': 3},{'str': b'1.5\x00', 'strlen': 3},{'str': b'1.6\x00', 'strlen': 3},{'str': b'1.7\x00', 'strlen': 3},{'str': b'1.8\x00', 'strlen': 3},{'str': b'1.9\x00', 'strlen': 3},{'str': b'1.10', 'strlen': 4},{'str': b'1.11', 'strlen': 4},{'str': b'1.12', 'strlen': 4},{'str': b'1.13', 'strlen': 4},{'str': b'1.14', 'strlen': 4},{'str': b'1.15', 'strlen': 4},{'str': b'1.16', 'strlen': 4},{'str': b'1.17', 'strlen': 4},{'str': b'1.18', 'strlen': 4},{'str': b'1.19', 'strlen': 4},{'str': b'1.20', 'strlen': 4},{'str': b'1.21', 'strlen': 4},{'str': b'1.22', 'strlen': 4},{'str': b'1.23', 'strlen': 4},{'str': b'1.24', 'strlen': 4},{'str': b'1.25', 'strlen': 4},{'str': b'1.26', 'strlen': 4},{'str': b'1.27', 'strlen': 4},{'str': b'1.28', 'strlen': 4},{'str': b'1.29', 'strlen': 4},{'str': b'1.30', 'strlen': 4},{'str': b'1.31', 'strlen': 4},{'str': b'1.32', 'strlen': 4},{'str': b'1.33', 'strlen': 4},{'str': b'1.34', 'strlen': 4},{'str': b'1.35', 'strlen': 4},{'str': b'1.36', 'strlen': 4},{'str': b'1.37', 'strlen': 4},{'str': b'1.38', 'strlen': 4},{'str': b'1.39', 'strlen': 4},{'str': b'2.0\x00', 'strlen': 3},{'str': b'2.1\x00', 'strlen': 3},{'str': b'2.2\x00', 'strlen': 3},{'str': b'2.3\x00', 'strlen': 3},{'str': b'2.4\x00', 'strlen': 3},{'str': b'2.5\x00', 'strlen': 3},{'str': b'2.6\x00', 'strlen': 3},{'str': b'2.7\x00', 'strlen': 3},{'str': b'2.8\x00', 'strlen': 3},{'str': b'2.9\x00', 'strlen': 3},{'str': b'2.10', 'strlen': 4},{'str': b'2.11', 'strlen': 4},{'str': b'2.12', 'strlen': 4},{'str': b'2.13', 'strlen': 4},{'str': b'2.14', 'strlen': 4},{'str': b'2.15', 'strlen': 4},{'str': b'2.16', 'strlen': 4},{'str': b'2.17', 'strlen': 4},{'str': b'2.18', 'strlen': 4},{'str': b'2.19', 'strlen': 4},{'str': b'2.20', 'strlen': 4},{'str': b'2.21', 'strlen': 4},{'str': b'2.22', 'strlen': 4},{'str': b'2.23', 'strlen': 4},{'str': b'2.24', 'strlen': 4},{'str': b'2.25', 'strlen': 4},{'str': b'2.26', 'strlen': 4},{'str': b'2.27', 'strlen': 4},{'str': b'2.28', 'strlen': 4},{'str': b'2.29', 'strlen': 4},{'str': b'2.30', 'strlen': 4},{'str': b'2.31', 'strlen': 4},{'str': b'2.32', 'strlen': 4},{'str': b'2.33', 'strlen': 4},{'str': b'2.34', 'strlen': 4},{'str': b'2.35', 'strlen': 4},{'str': b'2.36', 'strlen': 4},{'str': b'2.37', 'strlen': 4},{'str': b'2.38', 'strlen': 4},{'str': b'2.39', 'strlen': 4},]             # <<<<<<<<<<<<<<
 * 
 * cdef char **INT_TO_STRING = [
 */
  __pyx_t_126.str = ((char *)"0.0\000");
  __pyx_t_126.strlen = 3;
  __pyx_t_127.str = ((char *)"0.1\000");
  __pyx_t_127.strlen = 3;
  __pyx_t_128.str = ((char *)"0.2\000");
  __pyx_t_128.strlen = 3;
  __pyx_t_129.str = ((char *)"0.3\000");
  __pyx_t_129.strlen = 3;
  __pyx_t_130.str = ((char *)"0.4\000");
  __pyx_t_130.strlen = 3;
  __pyx_t_131.str = ((char *)"0.5\000");
  __pyx_t_131.strlen = 3;
  __pyx_t_132.str = ((char *)"0.6\000");
  __pyx_t_132.strlen = 3;
  __pyx_t_133.str = ((char *)"0.7\000");
  __pyx_t_133.strlen = 3;
  __pyx_t_134.str = ((char *)"0.8\000");
  __pyx_t_134.strlen = 3;
  __pyx_t_135.str = ((char *)"0.9\000");
  __pyx_t_135.strlen = 3;
  __pyx_t_136.str = ((char *)"0.10");
  __pyx_t_136.strlen = 4;
  __pyx_t_137.str = ((char *)"0.11");
  __pyx_t_137.strlen = 4;
  __pyx_t_138.str = ((char *)"0.12");
  __pyx_t_138.strlen = 4;
  __pyx_t_139.str = ((char *)"0.13");
  __pyx_t_139.strlen = 4;
  __pyx_t_140.str = ((char *)"0.14");
  __pyx_t_140.strlen = 4;
  __pyx_t_141.str = ((char *)"0.15");
  __pyx_t_141.strlen = 4;
  __pyx_t_142.str = ((char *)"0.16");
  __pyx_t_142.strlen = 4;
  __pyx_t_143.str = ((char *)"0.17");
  __pyx_t_143.strlen = 4;
  __pyx_t_144.str = ((char *)"0.18");
  __pyx_t_144.strlen = 4;
  __pyx_t_145.str = ((char *)"0.19");
  __pyx_t_145.strlen = 4;
  __pyx_t_146.str = ((char *)"0.20");
  __pyx_t_146.strlen = 4;
  __pyx_t_147.str = ((char *)"0.21");
  __pyx_t_147.strlen = 4;
  __pyx_t_148.str = ((char *)"0.22");
  __pyx_t_148.strlen = 4;
  __pyx_t_149.str = ((char *)"0.23");
  __pyx_t_149.strlen = 4;
  __pyx_t_150.str = ((char *)"0.24");
  __pyx_t_150.strlen = 4;
  __pyx_t_151.str = ((char *)"0.25");
  __pyx_t_151.strlen = 4;
  __pyx_t_152.str = ((char *)"0.26");
  __pyx_t_152.strlen = 4;
  __pyx_t_153.str = ((char *)"0.27");
  __pyx_t_153.strlen = 4;
  __pyx_t_154.str = ((char *)"0.28");
  __pyx_t_154.strlen = 4;
  __pyx_t_155.str = ((char *)"0.29");
  __pyx_t_155.strlen = 4;
  __pyx_t_156.str = ((char *)"0.30");
  __pyx_t_156.strlen = 4;
  __pyx_t_157.str = ((char *)"0.31");
  __pyx_t_157.strlen = 4;
  __pyx_t_158.str = ((char *)"0.32");
  __pyx_t_158.strlen = 4;
  __pyx_t_159.str = ((char *)"0.33");
  __pyx_t_159.strlen = 4;
  __pyx_t_160.str = ((char *)"0.34");
  __pyx_t_160.strlen = 4;
  __pyx_t_161.str = ((char *)"0.35");
  __pyx_t_161.strlen = 4;
  __pyx_t_162.str = ((char *)"0.36");
  __pyx_t_162.strlen = 4;
  __pyx_t_163.str = ((char *)"0.37");
  __pyx_t_163.strlen = 4;
  __pyx_t_164.str = ((char *)"0.38");
  __pyx_t_164.strlen = 4;
  __pyx_t_165.str = ((char *)"0.39");
  __pyx_t_165.strlen = 4;
  __pyx_t_166.str = ((char *)"1.0\000");
  __pyx_t_166.strlen = 3;
  __pyx_t_167.str = ((char *)"1.1\000");
  __pyx_t_167.strlen = 3;
  __pyx_t_168.str = ((char *)"1.2\000");
  __pyx_t_168.strlen = 3;
  __pyx_t_169.str = ((char *)"1.3\000");
  __pyx_t_169.strlen = 3;
  __pyx_t_170.str = ((char *)"1.4\000");
  __pyx_t_170.strlen = 3;
  __pyx_t_171.str = ((char *)"1.5\000");
  __pyx_t_171.strlen = 3;
  __pyx_t_172.str = ((char *)"1.6\000");
  __pyx_t_172.strlen = 3;
  __pyx_t_173.str = ((char *)"1.7\000");
  __pyx_t_173.strlen = 3;
  __pyx_t_174.str = ((char *)"1.8\000");
  __pyx_t_174.strlen = 3;
  __pyx_t_175.str = ((char *)"1.9\000");
  __pyx_t_175.strlen = 3;
  __pyx_t_176.str = ((char *)"1.10");
  __pyx_t_176.strlen = 4;
  __pyx_t_177.str = ((char *)"1.11");
  __pyx_t_177.strlen = 4;
  __pyx_t_178.str = ((char *)"1.12");
  __pyx_t_178.strlen = 4;
  __pyx_t_179.str = ((char *)"1.13");
  __pyx_t_179.strlen = 4;
  __pyx_t_180.str = ((char *)"1.14");
  __pyx_t_180.strlen = 4;
  __pyx_t_181.str = ((char *)"1.15");
  __pyx_t_181.strlen = 4;
  __pyx_t_182.str = ((char *)"1.16");
  __pyx_t_182.strlen = 4;
  __pyx_t_183.str = ((char *)"1.17");
  __pyx_t_183.strlen = 4;
  __pyx_t_184.str = ((char *)"1.18");
  __pyx_t_184.strlen = 4;
  __pyx_t_185.str = ((char *)"1.19");
  __pyx_t_185.strlen = 4;
  __pyx_t_186.str = ((char *)"1.20");
  __pyx_t_186.strlen = 4;
  __pyx_t_187.str = ((char *)"1.21");
  __pyx_t_187.strlen = 4;
  __pyx_t_188.str = ((char *)"1.22");
  __pyx_t_188.strlen = 4;
  __pyx_t_189.str = ((char *)"1.23");
  __pyx_t_189.strlen = 4;
  __pyx_t_190.str = ((char *)"1.24");
  __pyx_t_190.strlen = 4;
  __pyx_t_191.str = ((char *)"1.25");
  __pyx_t_191.strlen = 4;
  __pyx_t_192.str = ((char *)"1.26");
  __pyx_t_192.strlen = 4;
  __pyx_t_193.str = ((char *)"1.27");
  __pyx_t_193.strlen = 4;
  __pyx_t_194.str = ((char *)"1.28");
  __pyx_t_194.strlen = 4;
  __pyx_t_195.str = ((char *)"1.29");
  __pyx_t_195.strlen = 4;
  __pyx_t_196.str = ((char *)"1.30");
  __pyx_t_196.strlen = 4;
  __pyx_t_197.str = ((char *)"1.31");
  __pyx_t_197.strlen = 4;
  __pyx_t_198.str = ((char *)"1.32");
  __pyx_t_198.strlen = 4;
  __pyx_t_199.str = ((char *)"1.33");
  __pyx_t_199.strlen = 4;
  __pyx_t_200.str = ((char *)"1.34");
  __pyx_t_200.strlen = 4;
  __pyx_t_201.str = ((char *)"1.35");
  __pyx_t_201.strlen = 4;
  __pyx_t_202.str = ((char *)"1.36");
  __pyx_t_202.strlen = 4;
  __pyx_t_203.str = ((char *)"1.37");
  __pyx_t_203.strlen = 4;
  __pyx_t_204.str = ((char *)"1.38");
  __pyx_t_204.strlen = 4;
  __pyx_t_205.str = ((char *)"1.39");
  __pyx_t_205.strlen = 4;
  __pyx_t_206.str = ((char *)"2.0\000");
  __pyx_t_206.strlen = 3;
  __pyx_t_207.str = ((char *)"2.1\000");
  __pyx_t_207.strlen = 3;
  __pyx_t_208.str = ((char *)"2.2\000");
  __pyx_t_208.strlen = 3;
  __pyx_t_209.str = ((char *)"2.3\000");
  __pyx_t_209.strlen = 3;
  __pyx_t_210.str = ((char *)"2.4\000");
  __pyx_t_210.strlen = 3;
  __pyx_t_211.str = ((char *)"2.5\000");
  __pyx_t_211.strlen = 3;
  __pyx_t_212.str = ((char *)"2.6\000");
  __pyx_t_212.strlen = 3;
  __pyx_t_213.str = ((char *)"2.7\000");
  __pyx_t_213.strlen = 3;
  __pyx_t_214.str = ((char *)"2.8\000");
  __pyx_t_214.strlen = 3;
  __pyx_t_215.str = ((char *)"2.9\000");
  __pyx_t_215.strlen = 3;
  __pyx_t_216.str = ((char *)"2.10");
  __pyx_t_216.strlen = 4;
  __pyx_t_217.str = ((char *)"2.11");
  __pyx_t_217.strlen = 4;
  __pyx_t_218.str = ((char *)"2.12");
  __pyx_t_218.strlen = 4;
  __pyx_t_219.str = ((char *)"2.13");
  __pyx_t_219.strlen = 4;
  __pyx_t_220.str = ((char *)"2.14");
  __pyx_t_220.strlen = 4;
  __pyx_t_221.str = ((char *)"2.15");
  __pyx_t_221.strlen = 4;
  __pyx_t_222.str = ((char *)"2.16");
  __pyx_t_222.strlen = 4;
  __pyx_t_223.str = ((char *)"2.17");
  __pyx_t_223.strlen = 4;
  __pyx_t_224.str = ((char *)"2.18");
  __pyx_t_224.strlen = 4;
  __pyx_t_225.str = ((char *)"2.19");
  __pyx_t_225.strlen = 4;
  __pyx_t_226.str = ((char *)"2.20");
  __pyx_t_226.strlen = 4;
  __pyx_t_227.str = ((char *)"2.21");
  __pyx_t_227.strlen = 4;
  __pyx_t_228.str = ((char *)"2.22");
  __pyx_t_228.strlen = 4;
  __pyx_t_229.str = ((char *)"2.23");
  __pyx_t_229.strlen = 4;
  __pyx_t_230.str = ((char *)"2.24");
  __pyx_t_230.strlen = 4;
  __pyx_t_231.str = ((char *)"2.25");
  __pyx_t_231.strlen = 4;
  __pyx_t_232.str = ((char *)"2.26");
  __pyx_t_232.strlen = 4;
  __pyx_t_233.str = ((char *)"2.27");
  __pyx_t_233.strlen = 4;
  __pyx_t_234.str = ((char *)"2.28");
  __pyx_t_234.strlen = 4;
  __pyx_t_235.str = ((char *)"2.29");
  __pyx_t_235.strlen = 4;
  __pyx_t_236.str = ((char *)"2.30");
  __pyx_t_236.strlen = 4;
  __pyx_t_237.str = ((char *)"2.31");
  __pyx_t_237.strlen = 4;
  __pyx_t_238.str = ((char *)"2.32");
  __pyx_t_238.strlen = 4;
  __pyx_t_239.str = ((char *)"2.33");
  __pyx_t_239.strlen = 4;
  __pyx_t_240.str = ((char *)"2.34");
  __pyx_t_240.strlen = 4;
  __pyx_t_241.str = ((char *)"2.35");
  __pyx_t_241.strlen = 4;
  __pyx_t_242.str = ((char *)"2.36");
  __pyx_t_242.strlen = 4;
  __pyx_t_243.str = ((char *)"2.37");
  __pyx_t_243.strlen = 4;
  __pyx_t_244.str = ((char *)"2.38");
  __pyx_t_244.strlen = 4;
  __pyx_t_245.str = ((char *)"2.39");
  __pyx_t_245.strlen = 4;
  __pyx_t_246[0] = __pyx_t_126;
  __pyx_t_246[1] = __pyx_t_127;
  __pyx_t_246[2] = __pyx_t_128;
  __pyx_t_246[3] = __pyx_t_129;
  __pyx_t_246[4] = __pyx_t_130;
  __pyx_t_246[5] = __pyx_t_131;
  __pyx_t_246[6] = __pyx_t_132;
  __pyx_t_246[7] = __pyx_t_133;
  __pyx_t_246[8] = __pyx_t_134;
  __pyx_t_246[9] = __pyx_t_135;
  __pyx_t_246[10] = __pyx_t_136;
  __pyx_t_246[11] = __pyx_t_137;
  __pyx_t_246[12] = __pyx_t_138;
  __pyx_t_246[13] = __pyx_t_139;
  __pyx_t_246[14] = __pyx_t_140;
  __pyx_t_246[15] = __pyx_t_141;
  __pyx_t_246[16] = __pyx_t_142;
  __pyx_t_246[17] = __pyx_t_143;
  __pyx_t_246[18] = __pyx_t_144;
  __pyx_t_246[19] = __pyx_t_145;
  __pyx_t_246[20] = __pyx_t_146;
  __pyx_t_246[21] = __pyx_t_147;
  __pyx_t_246[22] = __pyx_t_148;
  __pyx_t_246[23] = __pyx_t_149;
  __pyx_t_246[24] = __pyx_t_150;
  __pyx_t_246[25] = __pyx_t_151;
  __pyx_t_246[26] = __pyx_t_152;
  __pyx_t_246[27] = __pyx_t_153;
  __pyx_t_246[28] = __pyx_t_154;
  __pyx_t_246[29] = __pyx_t_155;
  __pyx_t_246[30] = __pyx_t_156;
  __pyx_t_246[31] = __pyx_t_157;
  __pyx_t_246[32] = __pyx_t_158;
  __pyx_t_246[33] = __pyx_t_159;
  __pyx_t_246[34] = __pyx_t_160;
  __pyx_t_246[35] = __pyx_t_161;
  __pyx_t_246[36] = __pyx_t_162;
  __pyx_t_246[37] = __pyx_t_163;
  __pyx_t_246[38] = __pyx_t_164;
  __pyx_t_246[39] = __pyx_t_165;
  __pyx_t_246[40] = __pyx_t_166;
  __pyx_t_246[41] = __pyx_t_167;
  __pyx_t_246[42] = __pyx_t_168;
  __pyx_t_246[43] = __pyx_t_169;
  __pyx_t_246[44] = __pyx_t_170;
  __pyx_t_246[45] = __pyx_t_171;
  __pyx_t_246[46] = __pyx_t_172;
  __pyx_t_246[47] = __pyx_t_173;
  __pyx_t_246[48] = __pyx_t_174;
  __pyx_t_246[49] = __pyx_t_175;
  __pyx_t_246[50] = __pyx_t_176;
  __pyx_t_246[51] = __pyx_t_177;
  __pyx_t_246[52] = __pyx_t_178;
  __pyx_t_246[53] = __pyx_t_179;
  __pyx_t_246[54] = __pyx_t_180;
  __pyx_t_246[55] = __pyx_t_181;
  __pyx_t_246[56] = __pyx_t_182;
  __pyx_t_246[57] = __pyx_t_183;
  __pyx_t_246[58] = __pyx_t_184;
  __pyx_t_246[59] = __pyx_t_185;
  __pyx_t_246[60] = __pyx_t_186;
  __pyx_t_246[61] = __pyx_t_187;
  __pyx_t_246[62] = __pyx_t_188;
  __pyx_t_246[63] = __pyx_t_189;
  __pyx_t_246[64] = __pyx_t_190;
  __pyx_t_246[65] = __pyx_t_191;
  __pyx_t_246[66] = __pyx_t_192;
  __pyx_t_246[67] = __pyx_t_193;
  __pyx_t_246[68] = __pyx_t_194;
  __pyx_t_246[69] = __pyx_t_195;
  __pyx_t_246[70] = __pyx_t_196;
  __pyx_t_246[71] = __pyx_t_197;
  __pyx_t_246[72] = __pyx_t_198;
  __pyx_t_246[73] = __pyx_t_199;
  __pyx_t_246[74] = __pyx_t_200;
  __pyx_t_246[75] = __pyx_t_201;
  __pyx_t_246[76] = __pyx_t_202;
  __pyx_t_246[77] = __pyx_t_203;
  __pyx_t_246[78] = __pyx_t_204;
  __pyx_t_246[79] = __pyx_t_205;
  __pyx_t_246[80] = __pyx_t_206;
  __pyx_t_246[81] = __pyx_t_207;
  __pyx_t_246[82] = __pyx_t_208;
  __pyx_t_246[83] = __pyx_t_209;
  __pyx_t_246[84] = __pyx_t_210;
  __pyx_t_246[85] = __pyx_t_211;
  __pyx_t_246[86] = __pyx_t_212;
  __pyx_t_246[87] = __pyx_t_213;
  __pyx_t_246[88] = __pyx_t_214;
  __pyx_t_246[89] = __pyx_t_215;
  __pyx_t_246[90] = __pyx_t_216;
  __pyx_t_246[91] = __pyx_t_217;
  __pyx_t_246[92] = __pyx_t_218;
  __pyx_t_246[93] = __pyx_t_219;
  __pyx_t_246[94] = __pyx_t_220;
  __pyx_t_246[95] = __pyx_t_221;
  __pyx_t_246[96] = __pyx_t_222;
  __pyx_t_246[97] = __pyx_t_223;
  __pyx_t_246[98] = __pyx_t_224;
  __pyx_t_246[99] = __pyx_t_225;
  __pyx_t_246[100] = __pyx_t_226;
  __pyx_t_246[101] = __pyx_t_227;
  __pyx_t_246[102] = __pyx_t_228;
  __pyx_t_246[103] = __pyx_t_229;
  __pyx_t_246[104] = __pyx_t_230;
  __pyx_t_246[105] = __pyx_t_231;
  __pyx_t_246[106] = __pyx_t_232;
  __pyx_t_246[107] = __pyx_t_233;
  __pyx_t_246[108] = __pyx_t_234;
  __pyx_t_246[109] = __pyx_t_235;
  __pyx_t_246[110] = __pyx_t_236;
  __pyx_t_246[111] = __pyx_t_237;
  __pyx_t_246[112] = __pyx_t_238;
  __pyx_t_246[113] = __pyx_t_239;
  __pyx_t_246[114] = __pyx_t_240;
  __pyx_t_246[115] = __pyx_t_241;
  __pyx_t_246[116] = __pyx_t_242;
  __pyx_t_246[117] = __pyx_t_243;
  __pyx_t_246[118] = __pyx_t_244;
  __pyx_t_246[119] = __pyx_t_245;
  __pyx_v_8fastsnmp_11snmp_parser_sid12s = __pyx_t_246;

  /* "fastsnmp/snmp_parser.pyx":156
 * cdef SID12_t *sid12s = [{'str': b'0.0\x00', 'strlen': 3},{'str': b'0.1\x00', 'strlen': 3},{'str': b'0.2\x00', 'strlen': 3},{'str': b'0.3\x00', 'strlen': 3},{'str': b'0.4\x00', 'strlen': 3},{'str': b'0.5\x00', 'strlen': 3},{'str': b'0.6\x00', 'strlen': 3},{'str': b'0.7\x00', 'strlen': 3},{'str': b'0.8\x00', 'strlen': 3},{'str': b'0.9\x00', 'strlen': 3},{'str': b'0.10', 'strlen': 4},{'str': b'0.11', 'strlen': 4},{'str': b'0.12', 'strlen': 4},{'str': b'0.13', 'strlen': 4},{'str': b'0.14', 'strlen': 4},{'str': b'0.15', 'strlen': 4},{'str': b'0.16', 'strlen': 4},{'str': b'0.17', 'strlen': 4},{'str': b'0.18', 'strlen': 4},{'str': b'0.19', 'strlen': 4},{'str': b'0.20', 'strlen': 4},{'str': b'0.21', 'strlen': 4},{'str': b'0.22', 'strlen': 4},{'str': b'0.23', 'strlen': 4},{'str': b'0.24', 'strlen': 4},{'str': b'0.25', 'strlen': 4},{'str': b'0.26', 'strlen': 4},{'str': b'0.27', 'strlen': 4},{'str': b'0.28', 'strlen': 4},{'str': b'0.29', 'strlen': 4},{'str': b'0.30', 'strlen': 4},{'str': b'0.31', 'strlen': 4},{'str': b'0.32', 'strlen': 4},{'str': b'0.33', 'strlen': 4},{'str': b'0.34', 'strlen': 4},{'str': b'0.35', 'strlen': 4},{'str': b'0.36', 'strlen': 4},{'str': b'0.37', 'strlen': 4},{'str': b'0.38', 'strlen': 4},{'str': b'0.39', 'strlen': 4},{'str': b'1.0\x00', 'strlen': 3},{'str': b'1.1\x00', 'strlen': 3},{'str': b'1.2\x00', 'strlen': 3},{'str': b'1.3\x00', 'strlen': 3},{'str': b'1.4\x00', 'strlen': 3},{'str': b'1.5\x00', 'strlen': 3},{'str': b'1.6\x00', 'strlen': 3},{'str': b'1.7\x00', 'strlen': 3},{'str': b'1.8\x00', 'strlen': 3},{'str': b'1.9\x00', 'strlen': 3},{'str': b'1.10', 'strlen': 4},{'str': b'1.11', 'strlen': 4},{'str': b'1.12', 'strlen': 4},{'str': b'1.13', 'strlen': 4},{'str': b'1.14', 'strlen': 4},{'str': b'1.15', 'strlen': 4},{'str': b'1.16', 'strlen': 4},{'str': b'1.17', 'strlen': 4},{'str': b'1.18', 'strlen': 4},{'str': b'1.19', 'strlen': 4},{'str': b'1.20', 'strlen': 4},{'str': b'1.21', 'strlen': 4},{'str': b'1.22', 'strlen': 4},{'str': b'1.23', 'strlen': 4},{'str': b'1.24', 'strlen': 4},{'str': b'1.25', 'strlen': 4},{'str': b'1.26', 'strlen': 4},{'str': b'1.27', 'strlen': 4},{'str': b'1.28', 'strlen': 4},{'str': b'1.29', 'strlen': 4},{'str': b'1.30', 'strlen': 4},{'str': b'1.31', 'strlen': 4},{'str': b'1.32', 'strlen': 4},{'str': b'1.33', 'strlen': 4},{'str': b'1.34', 'strlen': 4},{'str': b'1.35', 'strlen': 4},{'str': b'1.36', 'strlen': 4},{'str': b'1.37', 'strlen': 4},{'str': b'1.38', 'strlen': 4},{'str': b'1.39', 'strlen': 4},{'str': b'2.0\x00', 'strlen': 3},{'str': b'2.1\x00', 'strlen': 3},{'str': b'2.2\x00', 'strlen': 3},{'str': b'2.3\x00', 'strlen': 3},{'str': b'2.4\x00', 'strlen': 3},{'str': b'2.5\x00', 'strlen': 3},{'str': b'2.6\x00', 'strlen': 3},{'str': b'2.7\x00', 'strlen': 3},{'str': b'2.8\x00', 'strlen': 3},{'str': b'2.9\x00', 'strlen': 3},{'str': b'2.10', 'strlen': 4},{'str': b'2.11', 'strlen': 4},{'str': b'2.12', 'strlen': 4},{'str': b'2.13', 'strlen': 4},{'str': b'2.14', 'strlen': 4},{'str': b'2.15', 'strlen': 4},{'str': b'2.16', 'strlen': 4},{'str': b'2.17', 'strlen': 4},{'str': b'2.18', 'strlen': 4},{'str': b'2.19', 'strlen': 4},{'str': b'2.20', 'strlen': 4},{'str': b'2.21', 'strlen': 4},{'str': b'2.22', 'strlen': 4},{'str': b'2.23', 'strlen': 4},{'str': b'2.24', 'strlen': 4},{'str': b'2.25', 'strlen': 4},{'str': b'2.26', 'strlen': 4},{'str': b'2.27', 'strlen': 4},{'str': b'2.28', 'strlen': 4},{'str': b'2.29', 'strlen': 4},{'str': b'2.30', 'strlen': 4},{'str': b'2.31', 'strlen': 4},{'str': b'2.32', 'strlen': 4},{'str': b'2.33', 'strlen': 4},{'str': b'2.34', 'strlen': 4},{'str': b'2.35', 'strlen': 4},{'str': b'2.36', 'strlen': 4},{'str': b'2.37', 'strlen': 4},{'str': b'2.38', 'strlen': 4},{'str': b'2.39', 'strlen': 4},]
 * 
 * cdef char **INT_TO_STRING = [             # <<<<<<<<<<<<<<
 *     b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9',
 *     b'10', b'11', b'12', b'13', b'14', b'15', b'16', b'17', b'18', b'19',
 */
  __pyx_t_247[0] = ((char *)"0");
  __pyx_t_247[1] = ((char *)"1");
  __pyx_t_247[2] = ((char *)"2");
  __pyx_t_247[3] = ((char *)"3");
  __pyx_t_247[4] = ((char *)"4");
  __pyx_t_247[5] = ((char *)"5");
  __pyx_t_247[6] = ((char *)"6");
  __pyx_t_247[7] = ((char *)"7");
  __pyx_t_247[8] = ((char *)"8");
  __pyx_t_247[9] = ((char *)"9");
  __pyx_t_247[10] = ((char *)"10");
  __pyx_t_247[11] = ((char *)"11");
  __pyx_t_247[12] = ((char *)"12");
  __pyx_t_247[13] = ((char *)"13");
  __pyx_t_247[14] = ((char *)"14");
  __pyx_t_247[15] = ((char *)"15");
  __pyx_t_247[16] = ((char *)"16");
  __pyx_t_247[17] = ((char *)"17");
  __pyx_t_247[18] = ((char *)"18");
  __pyx_t_247[19] = ((char *)"19");
  __pyx_t_247[20] = ((char *)"20");
  __pyx_t_247[21] = ((char *)"21");
  __pyx_t_247[22] = ((char *)"22");
  __pyx_t_247[23] = ((char *)"23");
  __pyx_t_247[24] = ((char *)"24");
  __pyx_t_247[25] = ((char *)"25");
  __pyx_t_247[26] = ((char *)"26");
  __pyx_t_247[27] = ((char *)"27");
  __pyx_t_247[28] = ((char *)"28");
  __pyx_t_247[29] = ((char *)"29");
  __pyx_t_247[30] = ((char *)"30");
  __pyx_t_247[31] = ((char *)"31");
  __pyx_t_247[32] = ((char *)"32");
  __pyx_t_247[33] = ((char *)"33");
  __pyx_t_247[34] = ((char *)"34");
  __pyx_t_247[35] = ((char *)"35");
  __pyx_t_247[36] = ((char *)"36");
  __pyx_t_247[37] = ((char *)"37");
  __pyx_t_247[38] = ((char *)"38");
  __pyx_t_247[39] = ((char *)"39");
  __pyx_t_247[40] = ((char *)"40");
  __pyx_t_247[41] = ((char *)"41");
  __pyx_t_247[42] = ((char *)"42");
  __pyx_t_247[43] = ((char *)"43");
  __pyx_t_247[44] = ((char *)"44");
  __pyx_t_247[45] = ((char *)"45");
  __pyx_t_247[46] = ((char *)"46");
  __pyx_t_247[47] = ((char *)"47");
  __pyx_t_247[48] = ((char *)"48");
  __pyx_t_247[49] = ((char *)"49");
  __pyx_t_247[50] = ((char *)"50");
  __pyx_t_247[51] = ((char *)"51");
  __pyx_t_247[52] = ((char *)"52");
  __pyx_t_247[53] = ((char *)"53");
  __pyx_t_247[54] = ((char *)"54");
  __pyx_t_247[55] = ((char *)"55");
  __pyx_t_247[56] = ((char *)"56");
  __pyx_t_247[57] = ((char *)"57");
  __pyx_t_247[58] = ((char *)"58");
  __pyx_t_247[59] = ((char *)"59");
  __pyx_t_247[60] = ((char *)"60");
  __pyx_t_247[61] = ((char *)"61");
  __pyx_t_247[62] = ((char *)"62");
  __pyx_t_247[63] = ((char *)"63");
  __pyx_t_247[64] = ((char *)"64");
  __pyx_t_247[65] = ((char *)"65");
  __pyx_t_247[66] = ((char *)"66");
  __pyx_t_247[67] = ((char *)"67");
  __pyx_t_247[68] = ((char *)"68");
  __pyx_t_247[69] = ((char *)"69");
  __pyx_t_247[70] = ((char *)"70");
  __pyx_t_247[71] = ((char *)"71");
  __pyx_t_247[72] = ((char *)"72");
  __pyx_t_247[73] = ((char *)"73");
  __pyx_t_247[74] = ((char *)"74");
  __pyx_t_247[75] = ((char *)"75");
  __pyx_t_247[76] = ((char *)"76");
  __pyx_t_247[77] = ((char *)"77");
  __pyx_t_247[78] = ((char *)"78");
  __pyx_t_247[79] = ((char *)"79");
  __pyx_t_247[80] = ((char *)"80");
  __pyx_t_247[81] = ((char *)"81");
  __pyx_t_247[82] = ((char *)"82");
  __pyx_t_247[83] = ((char *)"83");
  __pyx_t_247[84] = ((char *)"84");
  __pyx_t_247[85] = ((char *)"85");
  __pyx_t_247[86] = ((char *)"86");
  __pyx_t_247[87] = ((char *)"87");
  __pyx_t_247[88] = ((char *)"88");
  __pyx_t_247[89] = ((char *)"89");
  __pyx_t_247[90] = ((char *)"90");
  __pyx_t_247[91] = ((char *)"91");
  __pyx_t_247[92] = ((char *)"92");
  __pyx_t_247[93] = ((char *)"93");
  __pyx_t_247[94] = ((char *)"94");
  __pyx_t_247[95] = ((char *)"95");
  __pyx_t_247[96] = ((char *)"96");
  __pyx_t_247[97] = ((char *)"97");
  __pyx_t_247[98] = ((char *)"98");
  __pyx_t_247[99] = ((char *)"99");
  __pyx_v_8fastsnmp_11snmp_parser_INT_TO_STRING = __pyx_t_247;

  /* "fastsnmp/snmp_parser.pyx":227
 * 
 * 
 * def objectid_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef const unsigned char *stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_1objectid_decode, 0, __pyx_n_s_objectid_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_objectid_decode, __pyx_t_1) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":420
 *     return retval
 * 
 * def objectid_encode(oid):             # <<<<<<<<<<<<<<
 *     """
 *     encode an ObjectID into stream
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_3objectid_encode, 0, __pyx_n_s_objectid_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_objectid_encode, __pyx_t_1) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":454
 *     return <bytes> data[:data_len]
 * 
 * def octetstring_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     return c_octetstring_decode(stream, len(stream))
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_5octetstring_decode, 0, __pyx_n_s_octetstring_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_octetstring_decode, __pyx_t_1) < 0) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":458
 * 
 * 
 * def octetstring_encode(string):             # <<<<<<<<<<<<<<
 *     """
 *     encode an octetstring into string
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_7octetstring_encode, 0, __pyx_n_s_octetstring_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_octetstring_encode, __pyx_t_1) < 0) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":469
 *     return bytes(string.encode('ascii'))
 * 
 * def integer_encode(const int64_t value):             # <<<<<<<<<<<<<<
 *     cdef char[MAX_INT_LEN] data
 *     cdef uint64_t data_len = 0
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_9integer_encode, 0, __pyx_n_s_integer_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_integer_encode, __pyx_t_1) < 0) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":488
 * 
 * 
 * def uinteger_encode(uint64_t value):             # <<<<<<<<<<<<<<
 *     # little -> big
 *     cdef size_t slen, i
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_11uinteger_encode, 0, __pyx_n_s_uinteger_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_uinteger_encode, __pyx_t_1) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":499
 *     return <bytes> res[:slen]
 * 
 * def uinteger_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_13uinteger_decode, 0, __pyx_n_s_uinteger_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_uinteger_decode, __pyx_t_1) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":513
 *     return uinteger_decode_c(stream_char, &stream_len)
 * 
 * def integer_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     """
 *     Decode input stream into a integer
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_15integer_decode, 0, __pyx_n_s_integer_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_integer_decode, __pyx_t_1) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fastsnmp/snmp_parser.pyx":546
 *     return value
 * 
 * def sequence_decode(bytes stream not None) -> list:             # <<<<<<<<<<<<<<
 *     cdef const unsigned char * stream_char = stream
 *     cdef size_t stream_len = len(stream)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_17sequence_decode, 0, __pyx_n_s_sequence_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sequence_decode, __pyx_t_2) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":652
 * 
 * 
 * def length_decode(bytes data):             # <<<<<<<<<<<<<<
 *     cdef size_t encode_length, length
 *     length_decode_c(data, &length, &encode_length)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_19length_decode, 0, __pyx_n_s_length_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_length_decode, __pyx_t_2) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":658
 * 
 * 
 * def length_encode(uint64_t length):             # <<<<<<<<<<<<<<
 *     """
 *     Function takes the length of the contents and produces the encoding for that length.  Section 6.3 of ITU-T-X.209
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_21length_encode, 0, __pyx_n_s_length_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_length_encode, __pyx_t_2) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":719
 *     return 0
 * 
 * def tag_decode(bytes stream not None):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_23tag_decode, 0, __pyx_n_s_tag_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tag_decode, __pyx_t_2) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":726
 * 
 * # TODO: implement more encoders
 * def value_encode(value=None, value_type='Null'):             # <<<<<<<<<<<<<<
 *     """
 *     Encoded value by ASN.1
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_25value_encode, 0, __pyx_n_s_value_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__48);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_encode, __pyx_t_2) < 0) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":744
 * 
 * 
 * def encode_varbind(oid, value_type='Null', value=None):             # <<<<<<<<<<<<<<
 *     if value is None:
 *         value_type = 'Null'
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_27encode_varbind, 0, __pyx_n_s_encode_varbind, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__51);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode_varbind, __pyx_t_2) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":762
 * 
 * 
 * def varbinds_encode(varbinds):             # <<<<<<<<<<<<<<
 *     res = bytearray()
 *     for varbind in varbinds:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_29varbinds_encode, 0, __pyx_n_s_varbinds_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_varbinds_encode, __pyx_t_2) < 0) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":778
 * 
 * 
 * def varbinds_encode_tlv(varbinds):             # <<<<<<<<<<<<<<
 *     varbinds_data = varbinds_encode(varbinds)
 *     varbinds_type = ASN_U_SEQUENCE_BYTE
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_31varbinds_encode_tlv, 0, __pyx_n_s_varbinds_encode_tlv, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_varbinds_encode_tlv, __pyx_t_2) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":785
 * 
 * 
 * def msg_encode(req_id, community, varbinds, msg_type="GetBulk", max_repetitions=10, non_repeaters=0):             # <<<<<<<<<<<<<<
 *     """
 *     Build SNMP-message
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_33msg_encode, 0, __pyx_n_s_msg_encode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__58);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_msg_encode, __pyx_t_2) < 0) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":857
 * 
 * 
 * def msg_decode(stream):             # <<<<<<<<<<<<<<
 *     cdef uint64_t tag=0
 *     cdef size_t encode_length, length
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_35msg_decode, 0, __pyx_n_s_msg_decode, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_msg_decode, __pyx_t_2) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":873
 *     return req_id, error_status, error_index, varbinds
 * 
 * def check_is_growing(str oid_start not None, str oid_finish not None):             # <<<<<<<<<<<<<<
 *     cdef bint is_growing = True
 *     if "." in oid_start:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_37check_is_growing, 0, __pyx_n_s_check_is_growing, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_is_growing, __pyx_t_2) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":882
 *     return is_growing
 * 
 * def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tuple oids_to_poll not None):             # <<<<<<<<<<<<<<
 *     cdef str oid, main_oid, index_part
 *     cdef list result = [], item
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_8fastsnmp_11snmp_parser_39parse_varbind, 0, __pyx_n_s_parse_varbind, NULL, __pyx_n_s_fastsnmp_snmp_parser, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_varbind, __pyx_t_2) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fastsnmp/snmp_parser.pyx":1
 * # cython: nonecheck=False, boundscheck=False, wraparound=False, language_level=3             # <<<<<<<<<<<<<<
 * # cython: c_string_type=str, c_string_encoding=ascii
 * # based on https://pypi.python.org/pypi/libsnmp/
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init fastsnmp.snmp_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(__pyx_m);
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init fastsnmp.snmp_parser");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### 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 */
#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);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    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) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* PyObjectGetAttrStr */
#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);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    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;
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if 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) {
        Py_INCREF(__pyx_empty_tuple);
        return __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

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    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_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 */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    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 PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            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));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            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_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    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 = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;  // error
            return kwvalues[i];
        }
    }
    return NULL;  // not found (no exception set)
}
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        if (kwds_is_tuple) {
            if (pos >= PyTuple_GET_SIZE(kwds)) break;
            key = PyTuple_GET_ITEM(kwds, pos);
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __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(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result;
    Py_ssize_t i;
    argstuple = PyTuple_New(nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        PyTuple_SET_ITEM(argstuple, i, args[i]);
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
    Py_DECREF(argstuple);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
#ifdef __Pyx_CyFunction_USED
        if (__Pyx_IsCyOrPyCFunction(func))
#else
        if (PyCFunction_Check(func))
#endif
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
                return __Pyx_PyObject_CallMethO(func, NULL);
            }
        }
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (PyCFunction_Check(func))
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
                return __Pyx_PyObject_CallMethO(func, args[0]);
            }
        }
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    #if CYTHON_VECTORCALL
    vectorcallfunc f = _PyVectorcall_Function(func);
    if (f) {
        return f(func, args, nargs, kwargs);
    }
    #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
    if (__Pyx_CyFunction_CheckExact(func)) {
        __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
        if (f) return f(func, args, nargs, kwargs);
    }
    #endif
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    return __Pyx_PyObject_FastCall_fallback(func, args, nargs, kwargs);
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (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 CYTHON_COMPILING_IN_PYPY ||  CYTHON_COMPILING_IN_LIMITED_API
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

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

/* CIntToDigits */
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 */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, 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;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    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;
                    PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    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 = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define GCC_DIAGNOSTIC
#endif
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(size_t)*3+2];
    char *dpos, *end = digits + sizeof(size_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    size_t remaining;
#ifdef 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 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 = (size_t) (remaining / (8*8));
            dpos -= 2;
            *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (size_t) (remaining / (10*10));
            dpos -= 2;
            *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (size_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);
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED 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 CYTHON_PEP393_ENABLED
    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);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        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 (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || 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
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* PyDictVersioning */
#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_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* 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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_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)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (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 || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg = NULL;
    return __Pyx_PyObject_FastCall(func, (&arg)+1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        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);
    }
#endif
    return 0;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *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)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace; (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_OrObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace; (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            return PyInt_FromLong(a | b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_or(op1, op2);
            }
        }
                x = a | b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla | llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceOr : PyNumber_Or)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace; (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            return PyInt_FromLong(a & b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if ((intval & PyLong_MASK) == intval) {
            long result = 0;
            if(likely(size)) {
                result = intval & (likely(size>0) ? digits[0] : (PyLong_MASK - digits[0] + 1));
            }
            return PyLong_FromLong(result);
        }
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_and(op1, op2);
            }
        }
                x = a & b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla & llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
}
#endif

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_ass_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 -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr;
    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);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(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_n_s_class_getitem);
        if (meth) {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(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

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == 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
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #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

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        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);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
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);
    }
}
#endif
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);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        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

/* 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, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    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 PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    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;
        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;
    }
    #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);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

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

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_Occurred();
    if (unlikely(exc_type)) {
        if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return NULL;
        __Pyx_PyErr_Clear();
        Py_INCREF(defval);
        return defval;
    }
    if (defval) {
        Py_INCREF(defval);
        return defval;
    }
    __Pyx_PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}
static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
    __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetName(Py_TYPE(iterator));
    PyErr_Format(PyExc_TypeError,
        __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name);
    __Pyx_DECREF_TypeName(iterator_type_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
    if (likely(iternext)) {
#if CYTHON_USE_TYPE_SLOTS
        next = iternext(iterator);
        if (likely(next))
            return next;
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
#else
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
#endif
    } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    }
#if !CYTHON_USE_TYPE_SLOTS
    else {
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
    }
#endif
    return __Pyx_PyIter_Next2Default(defval);
}

/* unicode_tailmatch */
static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings,
                                          Py_ssize_t start, Py_ssize_t end, int direction) {
    Py_ssize_t i, count = PyTuple_GET_SIZE(substrings);
    for (i = 0; i < count; i++) {
        Py_ssize_t result;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i),
                                     start, end, direction);
#else
        PyObject* sub = PySequence_ITEM(substrings, i);
        if (unlikely(!sub)) return -1;
        result = PyUnicode_Tailmatch(s, sub, start, end, direction);
        Py_DECREF(sub);
#endif
        if (result) {
            return (int) result;
        }
    }
    return 0;
}
static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
                                     Py_ssize_t start, Py_ssize_t end, int direction) {
    if (unlikely(PyTuple_Check(substr))) {
        return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction);
    }
    return (int) PyUnicode_Tailmatch(s, substr, start, end, direction);
}

/* PyUnicode_Substring */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length;
    if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL;
    length = __Pyx_PyUnicode_GET_LENGTH(text);
    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_empty_unicode);
    if (start == 0 && stop == length)
        return __Pyx_NewRef(text);
#if CYTHON_PEP393_ENABLED
    return PyUnicode_FromKindAndData(PyUnicode_KIND(text),
        PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start);
#else
    return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(text)+start, stop-start);
#endif
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            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 NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
#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 !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    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;
#endif
    if ((size_t)basicsize < 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);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != 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);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                #if CYTHON_COMPILING_IN_LIMITED_API
                module = PyImport_ImportModuleLevelObject(
                    name, empty_dict, empty_dict, from_list, 1);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                #endif
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            #if CYTHON_COMPILING_IN_LIMITED_API
            module = PyImport_ImportModuleLevelObject(
                name, empty_dict, empty_dict, from_list, level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        PyObject *sep;
        PyObject *slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, CYTHON_UNUSED PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__15;
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    Py_ssize_t i, nparts;
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (likely(module))
        return module;
    return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

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

/* PyObjectLookupSpecial */
#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);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    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_n_s_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_n_s_module, modname) < 0)) goto bad;
#if PY_VERSION_HEX >= 0x03030000
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
#else
    CYTHON_MAYBE_UNUSED_VAR(qualname);
#endif
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *names_to_set, *key, *value, *set_name, *tmp;
    Py_ssize_t i = 0;
#if CYTHON_USE_TYPE_SLOTS
    names_to_set = PyDict_Copy(type->tp_dict);
#else
    {
        PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
        names_to_set = NULL;
        if (likely(d)) {
            PyObject *names_to_set = PyDict_New();
            int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
            Py_DECREF(d);
            if (unlikely(ret < 0))
                Py_CLEAR(names_to_set);
        }
    }
#endif
    if (unlikely(names_to_set == NULL))
        goto bad;
    while (PyDict_Next(names_to_set, &i, &key, &value)) {
        set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
        if (unlikely(set_name != NULL)) {
            tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
            Py_DECREF(set_name);
            if (unlikely(tmp == NULL)) {
                __Pyx_TypeName value_type_name =
                    __Pyx_PyType_GetName(Py_TYPE(value));
                __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
                PyErr_Format(PyExc_RuntimeError,
#if PY_MAJOR_VERSION >= 3
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name, key, type_name);
#else
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name,
                    PyString_Check(key) ? PyString_AS_STRING(key) : "?",
                    type_name);
#endif
                goto bad;
            } else {
                Py_DECREF(tmp);
            }
        }
        else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
    Py_DECREF(names_to_set);
    return 0;
bad:
    Py_XDECREF(names_to_set);
    return -1;
}
static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *mro = type->tp_mro;
    Py_ssize_t i, nbases;
    if (unlikely(!mro)) goto done;
    (void) &__Pyx_GetBuiltinName;
    Py_INCREF(mro);
    nbases = PyTuple_GET_SIZE(mro);
    assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
    for (i = 1; i < nbases-1; i++) {
        PyObject *base, *dict, *meth;
        base = PyTuple_GET_ITEM(mro, i);
        dict = ((PyTypeObject *)base)->tp_dict;
        meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
        if (unlikely(meth)) {
            descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
            PyObject *res;
            Py_INCREF(meth);
            if (likely(f)) {
                res = f(meth, NULL, type_obj);
                Py_DECREF(meth);
                if (unlikely(!res)) goto bad;
                meth = res;
            }
            res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
            Py_DECREF(meth);
            if (unlikely(!res)) goto bad;
            Py_DECREF(res);
            goto done;
        } else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
done:
    Py_XDECREF(mro);
    return type_obj;
bad:
    Py_XDECREF(mro);
    Py_DECREF(type_obj);
    return NULL;
#else
    PyObject *super_type, *super, *func, *res;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
#else
    super_type = (PyObject*) &PySuper_Type;
    (void) &__Pyx_GetBuiltinName;
#endif
    super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    Py_XDECREF(super_type);
#endif
    if (unlikely(!super)) {
        Py_CLEAR(type_obj);
        goto done;
    }
    func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
    Py_DECREF(super);
    if (likely(!func)) {
        if (unlikely(PyErr_Occurred()))
            Py_CLEAR(type_obj);
        goto done;
    }
    res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
    Py_DECREF(func);
    if (unlikely(!res))
        Py_CLEAR(type_obj);
    Py_XDECREF(res);
done:
    return type_obj;
#endif
}
#endif
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_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
#if PY_VERSION_HEX < 0x030600A4
        (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
        mkw
#endif
    );
    Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
    if (likely(result) && likely(PyType_Check(result))) {
        if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
            Py_CLEAR(result);
        } else {
            result = __Pyx_InitSubclassPEP487(result, mkw);
        }
    }
#else
    (void) &__Pyx_GetBuiltinName;
#endif
    return result;
}

/* FetchCommonType */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME);
    if (!abi_module) return NULL;
    Py_INCREF(abi_module);
    return abi_module;
}
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    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_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, type->tp_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              type->tp_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, type->tp_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *py_basicsize, *cached_type = NULL;
    Py_ssize_t basicsize;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, spec->name);
    if (cached_type) {
        py_basicsize = PyObject_GetAttrString(cached_type, "__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;
        if (__Pyx_VerifyCachedType(
              cached_type,
              spec->name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    cached_type = PyType_FromSpecWithBases(spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (PyObject_SetAttrString(abi_module, spec->name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, Py_ssize_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (i = 0; i < nargs; i++) newargs[i] = args[i];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        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:
    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, Py_ssize_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *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;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    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 = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = 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, CYTHON_UNUSED void *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;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    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 int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *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;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    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 int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *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_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    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 PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if PY_VERSION_HEX < 0x030500A0
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.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 (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS)) {
    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_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);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    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);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_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)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_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*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = 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;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), 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;
        argc = PyTuple_GET_SIZE(args);
        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);
            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
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)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         cyfunc->func.m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", cyfunc->func.m_ml->ml_name);
        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;
    PyMethodDef* def = cyfunc->func.m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = cyfunc->func.m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_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;
    PyMethodDef* def = cyfunc->func.m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = cyfunc->func.m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_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;
    PyMethodDef* def = cyfunc->func.m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = cyfunc->func.m_self;
        break;
    default:
        return NULL;
    }
    return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
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,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(__pyx_CyFunctionObject, func.vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#ifdef _Py_TPFLAGS_HAVE_VECTORCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(void) {
#if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(&__pyx_CyFunctionType_spec, NULL);
#else
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    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_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if CYTHON_COMPILING_IN_LIMITED_API
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    if (c_line) {
        (void) __pyx_cfilenm;
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    _PyTraceback_Add(funcname, filename, c_line ? -c_line : py_line);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __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

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
                            return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
                            return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_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(int64_t) >= 4 * PyLong_SHIFT) {
                            return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_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(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_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(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                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
            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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        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;
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                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
            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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        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 uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) {
    const uint8_t neg_one = (uint8_t) ((uint8_t) 0 - (uint8_t) 1), const_zero = (uint8_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint8_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint8_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint8_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 2 * PyLong_SHIFT) {
                            return (uint8_t) (((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 3 * PyLong_SHIFT) {
                            return (uint8_t) (((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_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(uint8_t) >= 4 * PyLong_SHIFT) {
                            return (uint8_t) (((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint8_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint8_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint8_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) ((((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_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(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_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(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            uint8_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint8_t) -1;
        }
    } else {
        uint8_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint8_t) -1;
        val = __Pyx_PyInt_As_uint8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint8_t");
    return (uint8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint8_t");
    return (uint8_t) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XSETREF(name, __Pyx_NewRef(__pyx_n_s__65));
    }
    return name;
}
#endif

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE 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_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#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_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE 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_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    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;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE 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);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
