/* Generated by Cython 0.25.2 */

/* BEGIN: Cython Metadata
{
    "distutils": {}, 
    "module_name": "spavro.fast_binary"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_25_2"
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
    #define HAVE_LONG_LONG
  #endif
#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
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_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_PYCALL
  #define CYTHON_FAST_PYCALL 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #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_PYCALL
  #define CYTHON_FAST_PYCALL 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 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
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(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_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_FASTCALL
  #define METH_FASTCALL 0x80
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
                                              Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_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)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define 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
#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_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if 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
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#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)

#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 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_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

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

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

#define __PYX_HAVE__spavro__fast_binary
#define __PYX_HAVE_API__spavro__fast_binary
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_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 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_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));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

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


static const char *__pyx_f[] = {
  "src/spavro/fast_binary.pyx",
  "stringsource",
};

/*--- Type declarations ---*/
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer;
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py;

/* "spavro/fast_binary.pyx":94
 * 
 * 
 * def make_union_reader(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader {
  PyObject_HEAD
  PyObject *__pyx_v_readers;
  PyObject *__pyx_v_union_schema;
};


/* "spavro/fast_binary.pyx":105
 * 
 * 
 * def make_record_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader {
  PyObject_HEAD
  PyObject *__pyx_v_field;
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_schema;
};


/* "spavro/fast_binary.pyx":114
 * 
 * 
 * def make_enum_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader {
  PyObject_HEAD
  PyObject *__pyx_v_schema;
  PyObject *__pyx_v_symbols;
};


/* "spavro/fast_binary.pyx":122
 *     return enum_reader
 * 
 * def make_array_reader(schema):             # <<<<<<<<<<<<<<
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader {
  PyObject_HEAD
  PyObject *__pyx_v_item_reader;
  PyObject *__pyx_v_schema;
};


/* "spavro/fast_binary.pyx":139
 *     return array_reader
 * 
 * def make_map_reader(schema):             # <<<<<<<<<<<<<<
 *     value_reader = get_reader(schema['values'])
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader {
  PyObject_HEAD
  PyObject *__pyx_v_schema;
  PyObject *__pyx_v_value_reader;
};


/* "spavro/fast_binary.pyx":157
 *     return map_reader
 * 
 * def make_fixed_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef long size = schema['size']
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader {
  PyObject_HEAD
  PyObject *__pyx_v_schema;
  long __pyx_v_size;
};


/* "spavro/fast_binary.pyx":187
 * 
 * 
 * def make_skip_reader(schema):             # <<<<<<<<<<<<<<
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader {
  PyObject_HEAD
  PyObject *__pyx_v_schema;
  PyObject *__pyx_v_value_reader;
};


/* "spavro/fast_binary.pyx":198
 * 
 * 
 * def make_default_reader(schema):             # <<<<<<<<<<<<<<
 *     value = schema["value"]
 *     def read_default(fo):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader {
  PyObject_HEAD
  PyObject *__pyx_v_schema;
  PyObject *__pyx_v_value;
};


/* "spavro/fast_binary.pyx":364
 * 
 * 
 * def make_record_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
};


/* "spavro/fast_binary.pyx":371
 * 
 * 
 * def make_enum_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check {
  PyObject_HEAD
  PyObject *__pyx_v_symbols;
};


/* "spavro/fast_binary.pyx":405
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 * def make_array_check(schema):             # <<<<<<<<<<<<<<
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check {
  PyObject_HEAD
  PyObject *__pyx_v_item_check;
};


/* "spavro/fast_binary.pyx":411
 *     return array_check
 * 
 * def make_union_check(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check {
  PyObject_HEAD
  PyObject *__pyx_v_union_checks;
};


/* "spavro/fast_binary.pyx":417
 *     return union_check
 * 
 * def make_fixed_check(schema):             # <<<<<<<<<<<<<<
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check {
  PyObject_HEAD
  int __pyx_v_size;
};


/* "spavro/fast_binary.pyx":423
 *     return fixed_check
 * 
 * def make_map_check(schema):             # <<<<<<<<<<<<<<
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check {
  PyObject_HEAD
  PyObject *__pyx_v_map_value_check;
};


/* "spavro/fast_binary.pyx":448
 * # ====================
 * 
 * def make_union_writer(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list type_list = [get_type(schema) for schema in union_schema]
 *     # cdef dict writer_lookup
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer {
  PyObject_HEAD
  PyObject *__pyx_v_union_schema;
  PyObject *__pyx_v_writer_lookup;
  PyObject *__pyx_v_writer_lookup_dict;
};


/* "spavro/fast_binary.pyx":519
 *     return write_union
 * 
 * def make_enum_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer {
  PyObject_HEAD
  PyObject *__pyx_v_schema;
  PyObject *__pyx_v_symbols;
};


/* "spavro/fast_binary.pyx":530
 * 
 * 
 * def make_record_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer {
  PyObject_HEAD
  PyObject *__pyx_v_fields;
  PyObject *__pyx_v_schema;
};


/* "spavro/fast_binary.pyx":540
 * 
 * 
 * def make_array_writer(schema):             # <<<<<<<<<<<<<<
 *     item_writer = get_writer(schema['items'])
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer {
  PyObject_HEAD
  PyObject *__pyx_v_item_writer;
  PyObject *__pyx_v_schema;
};


/* "spavro/fast_binary.pyx":554
 * 
 * 
 * def make_map_writer(schema):             # <<<<<<<<<<<<<<
 *     map_value_writer = get_writer(schema['values'])
 * 
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer {
  PyObject_HEAD
  PyObject *__pyx_v_map_value_writer;
  PyObject *__pyx_v_schema;
};


/* "spavro/fast_binary.pyx":579
 * 
 * 
 * def make_fixed_writer(schema):             # <<<<<<<<<<<<<<
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']
 */
struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer {
  PyObject_HEAD
  long __pyx_v_size;
};


/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, long long signed_datum):
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 */
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py {
  PyObject_HEAD
  void (*__pyx_v_f)(PyObject *, PY_LONG_LONG);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py {
  PyObject_HEAD
  PyObject *(*__pyx_v_f)(PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py {
  PyObject_HEAD
  PyObject *(*__pyx_v_f)(PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py {
  PyObject_HEAD
  double (*__pyx_v_f)(PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py {
  PyObject_HEAD
  PY_LONG_LONG (*__pyx_v_f)(PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py {
  PyObject_HEAD
  PyObject *(*__pyx_v_f)(PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py {
  PyObject_HEAD
  float (*__pyx_v_f)(PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py {
  PyObject_HEAD
  void (*__pyx_v_f)(PyObject *, PyObject *);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py {
  PyObject_HEAD
  void (*__pyx_v_f)(PyObject *, float);
};

struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py {
  PyObject_HEAD
  void (*__pyx_v_f)(PyObject *, double);
};


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

/* PyObjectGetAttrStr.proto */
#if CYTHON_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);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

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

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

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

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

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

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

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

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

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

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

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

/* 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);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

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

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#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 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;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      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);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#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);

/* 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);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

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

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

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

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

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#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

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

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

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

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

/* DictGetItem.proto */
#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()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

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

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

/* ArgTypeTest.proto */
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact);

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

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

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
                                             int is_tuple, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

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

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


/* Module declarations from 'spavro.fast_binary' */
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct__make_union_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer = 0;
static PyTypeObject *__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_double____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py = 0;
static PY_LONG_LONG __pyx_f_6spavro_11fast_binary_read_long(PyObject *); /*proto*/
static PyObject *__pyx_f_6spavro_11fast_binary_read_bytes(PyObject *); /*proto*/
static PyObject *__pyx_f_6spavro_11fast_binary_read_null(PyObject *); /*proto*/
static float __pyx_f_6spavro_11fast_binary_read_float(PyObject *); /*proto*/
static double __pyx_f_6spavro_11fast_binary_read_double(PyObject *); /*proto*/
static PyObject *__pyx_f_6spavro_11fast_binary_read_utf8(PyObject *); /*proto*/
static PyObject *__pyx_f_6spavro_11fast_binary_get_type(PyObject *, int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_int(PyObject *, PY_LONG_LONG); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_bytes(PyObject *, PyObject *); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_utf8(PyObject *, PyObject *); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_float(PyObject *, float); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_double(PyObject *, double); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_null(PyObject *, PyObject *); /*proto*/
static void __pyx_f_6spavro_11fast_binary_write_fixed(PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_6spavro_11fast_binary_write_boolean(PyObject *, char); /*proto*/
static PyObject *__Pyx_CFunc_void____object____long__long___to_py(void (*)(PyObject *, PY_LONG_LONG)); /*proto*/
static PyObject *__Pyx_CFunc_object____object___to_py(PyObject *(*)(PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_unicode____object___to_py(PyObject *(*)(PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_double____object___to_py(double (*)(PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_long__long____object___to_py(PY_LONG_LONG (*)(PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_bytes____object___to_py(PyObject *(*)(PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_float____object___to_py(float (*)(PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_void____object____object___to_py(void (*)(PyObject *, PyObject *)); /*proto*/
static PyObject *__Pyx_CFunc_void____object____float___to_py(void (*)(PyObject *, float)); /*proto*/
static PyObject *__Pyx_CFunc_void____object____double___to_py(void (*)(PyObject *, double)); /*proto*/
#define __Pyx_MODULE_NAME "spavro.fast_binary"
int __pyx_module_is_main_spavro__fast_binary = 0;

/* Implementation of 'spavro.fast_binary' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_all;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_RuntimeError;
static const char __pyx_k_I[] = "!I";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_n[] = "n";
static const char __pyx_k__4[] = "\001";
static const char __pyx_k_fo[] = "fo";
static const char __pyx_k__15[] = "_";
static const char __pyx_k__26[] = ".";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_idx[] = "idx";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_call[] = "__call__";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_long[] = "long";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_null[] = "null";
static const char __pyx_k_pack[] = "pack";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_seek[] = "seek";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_skip[] = "skip";
static const char __pyx_k_tell[] = "tell";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_wrap[] = "wrap";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_bytes[] = "bytes";
static const char __pyx_k_check[] = "check";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_crc32[] = "crc32";
static const char __pyx_k_datum[] = "datum";
static const char __pyx_k_field[] = "field";
static const char __pyx_k_fixed[] = "fixed";
static const char __pyx_k_float[] = "float";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_union[] = "union";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_double[] = "double";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_outbuf[] = "outbuf";
static const char __pyx_k_reader[] = "reader";
static const char __pyx_k_record[] = "record";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_schema[] = "schema";
static const char __pyx_k_string[] = "string";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_writer[] = "writer";
static const char __pyx_k_boolean[] = "boolean";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_readers[] = "readers";
static const char __pyx_k_symbols[] = "symbols";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_binascii[] = "binascii";
static const char __pyx_k_checksum[] = "checksum";
static const char __pyx_k_fullname[] = "fullname";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_read_int[] = "read_int";
static const char __pyx_k_skip_int[] = "skip_int";
static const char __pyx_k_ReadField[] = "ReadField";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_get_check[] = "get_check";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_map_check[] = "map_check";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_namespace[] = "namespace";
static const char __pyx_k_read_long[] = "read_long";
static const char __pyx_k_read_null[] = "read_null";
static const char __pyx_k_read_skip[] = "read_skip";
static const char __pyx_k_read_utf8[] = "read_utf8";
static const char __pyx_k_skip_long[] = "skip_long";
static const char __pyx_k_skip_null[] = "skip_null";
static const char __pyx_k_skip_utf8[] = "skip_utf8";
static const char __pyx_k_type_list[] = "type_list";
static const char __pyx_k_write_int[] = "write_int";
static const char __pyx_k_write_map[] = "write_map";
static const char __pyx_k_CheckField[] = "CheckField";
static const char __pyx_k_WriteField[] = "WriteField";
static const char __pyx_k_avro_to_py[] = "avro_to_py";
static const char __pyx_k_block_size[] = "block_size";
static const char __pyx_k_enum_check[] = "enum_check";
static const char __pyx_k_enum_index[] = "enum_index";
static const char __pyx_k_get_reader[] = "get_reader";
static const char __pyx_k_get_writer[] = "get_writer";
static const char __pyx_k_item_check[] = "item_check";
static const char __pyx_k_item_count[] = "item_count";
static const char __pyx_k_map_reader[] = "map_reader";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_py_to_avro[] = "py_to_avro";
static const char __pyx_k_read_bytes[] = "read_bytes";
static const char __pyx_k_read_float[] = "read_float";
static const char __pyx_k_read_items[] = "read_items";
static const char __pyx_k_skip_bytes[] = "skip_bytes";
static const char __pyx_k_skip_float[] = "skip_float";
static const char __pyx_k_write_enum[] = "write_enum";
static const char __pyx_k_write_long[] = "write_long";
static const char __pyx_k_write_null[] = "write_null";
static const char __pyx_k_write_utf8[] = "write_utf8";
static const char __pyx_k_array_check[] = "array_check";
static const char __pyx_k_block_count[] = "block_count";
static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py";
static const char __pyx_k_check_crc32[] = "check_crc32";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_data_writer[] = "data_writer";
static const char __pyx_k_enum_reader[] = "enum_reader";
static const char __pyx_k_fixed_check[] = "fixed_check";
static const char __pyx_k_item_reader[] = "item_reader";
static const char __pyx_k_item_writer[] = "item_writer";
static const char __pyx_k_placeholder[] = "placeholder";
static const char __pyx_k_python_type[] = "python_type";
static const char __pyx_k_read_double[] = "read_double";
static const char __pyx_k_record_name[] = "record_name";
static const char __pyx_k_schema_type[] = "schema_type";
static const char __pyx_k_skip_double[] = "skip_double";
static const char __pyx_k_union_check[] = "union_check";
static const char __pyx_k_union_index[] = "union_index";
static const char __pyx_k_write_array[] = "write_array";
static const char __pyx_k_write_bytes[] = "write_bytes";
static const char __pyx_k_write_crc32[] = "write_crc32";
static const char __pyx_k_write_float[] = "write_float";
static const char __pyx_k_write_union[] = "write_union";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_array_reader[] = "array_reader";
static const char __pyx_k_check_string[] = "check_string";
static const char __pyx_k_fixed_reader[] = "fixed_reader";
static const char __pyx_k_read_boolean[] = "read_boolean";
static const char __pyx_k_read_default[] = "read_default";
static const char __pyx_k_record_check[] = "record_check";
static const char __pyx_k_schema_cache[] = "schema_cache";
static const char __pyx_k_signed_datum[] = "signed_datum";
static const char __pyx_k_simple_union[] = "simple_union";
static const char __pyx_k_skip_boolean[] = "skip_boolean";
static const char __pyx_k_string_types[] = "string_types";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_union_checks[] = "union_checks";
static const char __pyx_k_union_reader[] = "union_reader";
static const char __pyx_k_union_schema[] = "union_schema";
static const char __pyx_k_value_reader[] = "value_reader";
static const char __pyx_k_write_double[] = "write_double";
static const char __pyx_k_write_record[] = "write_record";
static const char __pyx_k_INT_MAX_VALUE[] = "INT_MAX_VALUE";
static const char __pyx_k_INT_MIN_VALUE[] = "INT_MIN_VALUE";
static const char __pyx_k_integer_types[] = "integer_types";
static const char __pyx_k_lookup_result[] = "lookup_result";
static const char __pyx_k_record_reader[] = "record_reader";
static const char __pyx_k_write_boolean[] = "write_boolean";
static const char __pyx_k_writer_lookup[] = "writer_lookup";
static const char __pyx_k_LONG_MAX_VALUE[] = "LONG_MAX_VALUE";
static const char __pyx_k_LONG_MIN_VALUE[] = "LONG_MIN_VALUE";
static const char __pyx_k_check_type_map[] = "check_type_map";
static const char __pyx_k_make_map_check[] = "make_map_check";
static const char __pyx_k_make_byte_check[] = "make_byte_check";
static const char __pyx_k_make_enum_check[] = "make_enum_check";
static const char __pyx_k_make_int_writer[] = "make_int_writer";
static const char __pyx_k_make_long_check[] = "make_long_check";
static const char __pyx_k_make_map_reader[] = "make_map_reader";
static const char __pyx_k_make_map_writer[] = "make_map_writer";
static const char __pyx_k_make_null_check[] = "make_null_check";
static const char __pyx_k_map_value_check[] = "map_value_check";
static const char __pyx_k_reader_type_map[] = "reader_type_map";
static const char __pyx_k_writer_type_map[] = "writer_type_map";
static const char __pyx_k_Checksum_failure[] = "Checksum failure";
static const char __pyx_k_Non_string_value[] = "Non string value";
static const char __pyx_k_Read_leaf_values[] = "Read leaf values.";
static const char __pyx_k_make_array_check[] = "make_array_check";
static const char __pyx_k_make_byte_reader[] = "make_byte_reader";
static const char __pyx_k_make_byte_writer[] = "make_byte_writer";
static const char __pyx_k_make_enum_reader[] = "make_enum_reader";
static const char __pyx_k_make_enum_writer[] = "make_enum_writer";
static const char __pyx_k_make_fixed_check[] = "make_fixed_check";
static const char __pyx_k_make_float_check[] = "make_float_check";
static const char __pyx_k_make_long_reader[] = "make_long_reader";
static const char __pyx_k_make_long_writer[] = "make_long_writer";
static const char __pyx_k_make_null_reader[] = "make_null_reader";
static const char __pyx_k_make_null_writer[] = "make_null_writer";
static const char __pyx_k_make_skip_reader[] = "make_skip_reader";
static const char __pyx_k_make_union_check[] = "make_union_check";
static const char __pyx_k_map_value_writer[] = "map_value_writer";
static const char __pyx_k_FastBinaryDecoder[] = "FastBinaryDecoder";
static const char __pyx_k_FastBinaryEncoder[] = "FastBinaryEncoder";
static const char __pyx_k_ReaderPlaceholder[] = "ReaderPlaceholder";
static const char __pyx_k_Write_leaf_values[] = "Write leaf values.";
static const char __pyx_k_WriterPlaceholder[] = "WriterPlaceholder";
static const char __pyx_k_checked_int_write[] = "checked_int_write";
static const char __pyx_k_make_array_reader[] = "make_array_reader";
static const char __pyx_k_make_array_writer[] = "make_array_writer";
static const char __pyx_k_make_double_check[] = "make_double_check";
static const char __pyx_k_make_fixed_reader[] = "make_fixed_reader";
static const char __pyx_k_make_fixed_writer[] = "make_fixed_writer";
static const char __pyx_k_make_float_reader[] = "make_float_reader";
static const char __pyx_k_make_float_writer[] = "make_float_writer";
static const char __pyx_k_make_record_check[] = "make_record_check";
static const char __pyx_k_make_string_check[] = "make_string_check";
static const char __pyx_k_make_union_reader[] = "make_union_reader";
static const char __pyx_k_make_union_writer[] = "make_union_writer";
static const char __pyx_k_checked_long_write[] = "checked_long_write";
static const char __pyx_k_make_boolean_check[] = "make_boolean_check";
static const char __pyx_k_make_double_reader[] = "make_double_reader";
static const char __pyx_k_make_double_writer[] = "make_double_writer";
static const char __pyx_k_make_record_reader[] = "make_record_reader";
static const char __pyx_k_make_record_writer[] = "make_record_writer";
static const char __pyx_k_make_string_reader[] = "make_string_reader";
static const char __pyx_k_make_string_writer[] = "make_string_writer";
static const char __pyx_k_spavro_fast_binary[] = "spavro.fast_binary";
static const char __pyx_k_writer_lookup_dict[] = "writer_lookup_dict";
static const char __pyx_k_Not_a_boolean_value[] = "Not a boolean value";
static const char __pyx_k_checked_write_fixed[] = "checked_write_fixed";
static const char __pyx_k_make_boolean_reader[] = "make_boolean_reader";
static const char __pyx_k_make_boolean_writer[] = "make_boolean_writer";
static const char __pyx_k_make_default_reader[] = "make_default_reader";
static const char __pyx_k_namspace_record_name[] = "namspace_record_name";
static const char __pyx_k_simple_writer_lookup[] = "simple_writer_lookup";
static const char __pyx_k_checked_string_writer[] = "checked_string_writer";
static const char __pyx_k_complex_writer_lookup[] = "complex_writer_lookup";
static const char __pyx_k_FastBinaryDecoder_read[] = "FastBinaryDecoder.read";
static const char __pyx_k_FastBinaryDecoder_skip[] = "FastBinaryDecoder.skip";
static const char __pyx_k_checked_boolean_writer[] = "checked_boolean_writer";
static const char __pyx_k_FastBinaryEncoder_write[] = "FastBinaryEncoder.write";
static const char __pyx_k_FastBinaryDecoder___init[] = "FastBinaryDecoder.__init__";
static const char __pyx_k_FastBinaryEncoder___init[] = "FastBinaryEncoder.__init__";
static const char __pyx_k_ReaderPlaceholder___call[] = "ReaderPlaceholder.__call__";
static const char __pyx_k_ReaderPlaceholder___init[] = "ReaderPlaceholder.__init__";
static const char __pyx_k_WriterPlaceholder___call[] = "WriterPlaceholder.__call__";
static const char __pyx_k_WriterPlaceholder___init[] = "WriterPlaceholder.__init__";
static const char __pyx_k_FastBinaryDecoder_read_int[] = "FastBinaryDecoder.read_int";
static const char __pyx_k_FastBinaryDecoder_skip_int[] = "FastBinaryDecoder.skip_int";
static const char __pyx_k_FastBinaryDecoder_read_long[] = "FastBinaryDecoder.read_long";
static const char __pyx_k_FastBinaryDecoder_read_null[] = "FastBinaryDecoder.read_null";
static const char __pyx_k_FastBinaryDecoder_read_utf8[] = "FastBinaryDecoder.read_utf8";
static const char __pyx_k_FastBinaryDecoder_skip_long[] = "FastBinaryDecoder.skip_long";
static const char __pyx_k_FastBinaryDecoder_skip_null[] = "FastBinaryDecoder.skip_null";
static const char __pyx_k_FastBinaryDecoder_skip_utf8[] = "FastBinaryDecoder.skip_utf8";
static const char __pyx_k_FastBinaryEncoder_write_int[] = "FastBinaryEncoder.write_int";
static const char __pyx_k_Pyx_CFunc_unicode____object[] = "__Pyx_CFunc_unicode____object___to_py.<locals>.wrap";
static const char __pyx_k_FastBinaryDecoder_read_bytes[] = "FastBinaryDecoder.read_bytes";
static const char __pyx_k_FastBinaryDecoder_read_float[] = "FastBinaryDecoder.read_float";
static const char __pyx_k_FastBinaryDecoder_skip_bytes[] = "FastBinaryDecoder.skip_bytes";
static const char __pyx_k_FastBinaryDecoder_skip_float[] = "FastBinaryDecoder.skip_float";
static const char __pyx_k_FastBinaryEncoder_write_long[] = "FastBinaryEncoder.write_long";
static const char __pyx_k_FastBinaryEncoder_write_null[] = "FastBinaryEncoder.write_null";
static const char __pyx_k_FastBinaryEncoder_write_utf8[] = "FastBinaryEncoder.write_utf8";
static const char __pyx_k_No_matching_schema_for_datum[] = "No matching schema for datum: {}";
static const char __pyx_k_Size_Mismatch_for_Fixed_data[] = "Size Mismatch for Fixed data";
static const char __pyx_k_FastBinaryDecoder_check_crc32[] = "FastBinaryDecoder.check_crc32";
static const char __pyx_k_FastBinaryDecoder_read_double[] = "FastBinaryDecoder.read_double";
static const char __pyx_k_FastBinaryDecoder_skip_double[] = "FastBinaryDecoder.skip_double";
static const char __pyx_k_FastBinaryEncoder_write_bytes[] = "FastBinaryEncoder.write_bytes";
static const char __pyx_k_FastBinaryEncoder_write_crc32[] = "FastBinaryEncoder.write_crc32";
static const char __pyx_k_FastBinaryEncoder_write_float[] = "FastBinaryEncoder.write_float";
static const char __pyx_k_Non_integer_value_or_overflow[] = "Non integer value or overflow";
static const char __pyx_k_make_byte_check_locals_lambda[] = "make_byte_check.<locals>.<lambda>";
static const char __pyx_k_make_long_check_locals_lambda[] = "make_long_check.<locals>.<lambda>";
static const char __pyx_k_make_map_reader_locals_lambda[] = "make_map_reader.<locals>.<lambda>";
static const char __pyx_k_make_map_writer_locals_lambda[] = "make_map_writer.<locals>.<lambda>";
static const char __pyx_k_make_null_check_locals_lambda[] = "make_null_check.<locals>.<lambda>";
static const char __pyx_k_FastBinaryDecoder_read_boolean[] = "FastBinaryDecoder.read_boolean";
static const char __pyx_k_FastBinaryDecoder_skip_boolean[] = "FastBinaryDecoder.skip_boolean";
static const char __pyx_k_FastBinaryEncoder_write_double[] = "FastBinaryEncoder.write_double";
static const char __pyx_k_Pyx_CFunc_bytes____object___to[] = "__Pyx_CFunc_bytes____object___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_double____object___t[] = "__Pyx_CFunc_double____object___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_float____object___to[] = "__Pyx_CFunc_float____object___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_long__long____object[] = "__Pyx_CFunc_long__long____object___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_object____object___t[] = "__Pyx_CFunc_object____object___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_void____object____do[] = "__Pyx_CFunc_void____object____double___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_void____object____fl[] = "__Pyx_CFunc_void____object____float___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_void____object____lo[] = "__Pyx_CFunc_void____object____long__long___to_py.<locals>.wrap";
static const char __pyx_k_Pyx_CFunc_void____object____ob[] = "__Pyx_CFunc_void____object____object___to_py.<locals>.wrap";
static const char __pyx_k_make_enum_reader_locals_lambda[] = "make_enum_reader.<locals>.<lambda>";
static const char __pyx_k_make_enum_writer_locals_lambda[] = "make_enum_writer.<locals>.<lambda>";
static const char __pyx_k_make_float_check_locals_lambda[] = "make_float_check.<locals>.<lambda>";
static const char __pyx_k_make_skip_reader_locals_lambda[] = "make_skip_reader.<locals>.<lambda>";
static const char __pyx_k_FastBinaryEncoder_write_boolean[] = "FastBinaryEncoder.write_boolean";
static const char __pyx_k_make_array_reader_locals_lambda[] = "make_array_reader.<locals>.<lambda>";
static const char __pyx_k_make_array_writer_locals_lambda[] = "make_array_writer.<locals>.<lambda>";
static const char __pyx_k_make_default_reader_locals_read[] = "make_default_reader.<locals>.read_default";
static const char __pyx_k_make_double_check_locals_lambda[] = "make_double_check.<locals>.<lambda>";
static const char __pyx_k_make_fixed_reader_locals_lambda[] = "make_fixed_reader.<locals>.<lambda>";
static const char __pyx_k_make_long_writer_locals_checked[] = "make_long_writer.<locals>.checked_long_write";
static const char __pyx_k_make_map_check_locals_map_check[] = "make_map_check.<locals>.map_check";
static const char __pyx_k_make_record_check_locals_record[] = "make_record_check.<locals>.record_check";
static const char __pyx_k_make_record_writer_locals_write[] = "make_record_writer.<locals>.write_record";
static const char __pyx_k_make_union_reader_locals_lambda[] = "make_union_reader.<locals>.<lambda>";
static const char __pyx_k_make_union_writer_locals_lambda[] = "make_union_writer.<locals>.<lambda>";
static const char __pyx_k_make_union_writer_locals_simple[] = "make_union_writer.<locals>.simple_writer_lookup";
static const char __pyx_k_opt_ps_spavro_src_spavro_fast_b[] = "/opt/ps/spavro/src/spavro/fast_binary.pyx";
static const char __pyx_k_Fast_Cython_extension_for_readin[] = "Fast Cython extension for reading / writing and validating AVRO records.\n\nThe main edge this code has is that it parses the schema only once and creates\na reader/writer call tree from the schema shape. All reads and writes then\nno longer consult the schema saving lookups.";
static const char __pyx_k_make_array_check_locals_array_ch[] = "make_array_check.<locals>.array_check";
static const char __pyx_k_make_array_reader_locals_array_r[] = "make_array_reader.<locals>.array_reader";
static const char __pyx_k_make_array_writer_locals_write_a[] = "make_array_writer.<locals>.write_array";
static const char __pyx_k_make_boolean_check_locals_lambda[] = "make_boolean_check.<locals>.<lambda>";
static const char __pyx_k_make_boolean_writer_locals_check[] = "make_boolean_writer.<locals>.checked_boolean_writer";
static const char __pyx_k_make_default_reader_locals_lambd[] = "make_default_reader.<locals>.<lambda>";
static const char __pyx_k_make_enum_check_locals_enum_chec[] = "make_enum_check.<locals>.enum_check";
static const char __pyx_k_make_enum_reader_locals_enum_rea[] = "make_enum_reader.<locals>.enum_reader";
static const char __pyx_k_make_enum_writer_locals_write_en[] = "make_enum_writer.<locals>.write_enum";
static const char __pyx_k_make_fixed_check_locals_fixed_ch[] = "make_fixed_check.<locals>.fixed_check";
static const char __pyx_k_make_fixed_reader_locals_fixed_r[] = "make_fixed_reader.<locals>.fixed_reader";
static const char __pyx_k_make_fixed_writer_locals_checked[] = "make_fixed_writer.<locals>.checked_write_fixed";
static const char __pyx_k_make_int_writer_locals_checked_i[] = "make_int_writer.<locals>.checked_int_write";
static const char __pyx_k_make_map_reader_locals_map_reade[] = "make_map_reader.<locals>.map_reader";
static const char __pyx_k_make_map_writer_locals_write_map[] = "make_map_writer.<locals>.write_map";
static const char __pyx_k_make_record_reader_locals_lambda[] = "make_record_reader.<locals>.<lambda>";
static const char __pyx_k_make_record_reader_locals_record[] = "make_record_reader.<locals>.record_reader";
static const char __pyx_k_make_record_writer_locals_lambda[] = "make_record_writer.<locals>.<lambda>";
static const char __pyx_k_make_skip_reader_locals_read_ski[] = "make_skip_reader.<locals>.read_skip";
static const char __pyx_k_make_string_writer_locals_checke[] = "make_string_writer.<locals>.checked_string_writer";
static const char __pyx_k_make_union_check_locals_union_ch[] = "make_union_check.<locals>.union_check";
static const char __pyx_k_make_union_reader_locals_union_r[] = "make_union_reader.<locals>.union_reader";
static const char __pyx_k_make_union_writer_locals_complex[] = "make_union_writer.<locals>.complex_writer_lookup";
static const char __pyx_k_make_union_writer_locals_write_u[] = "make_union_writer.<locals>.write_union";
static PyObject *__pyx_n_s_CheckField;
static PyObject *__pyx_kp_s_Checksum_failure;
static PyObject *__pyx_n_s_FastBinaryDecoder;
static PyObject *__pyx_n_s_FastBinaryDecoder___init;
static PyObject *__pyx_n_s_FastBinaryDecoder_check_crc32;
static PyObject *__pyx_n_s_FastBinaryDecoder_read;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_boolean;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_bytes;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_double;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_float;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_int;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_long;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_null;
static PyObject *__pyx_n_s_FastBinaryDecoder_read_utf8;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_boolean;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_bytes;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_double;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_float;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_int;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_long;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_null;
static PyObject *__pyx_n_s_FastBinaryDecoder_skip_utf8;
static PyObject *__pyx_n_s_FastBinaryEncoder;
static PyObject *__pyx_n_s_FastBinaryEncoder___init;
static PyObject *__pyx_n_s_FastBinaryEncoder_write;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_boolean;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_bytes;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_crc32;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_double;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_float;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_int;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_long;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_null;
static PyObject *__pyx_n_s_FastBinaryEncoder_write_utf8;
static PyObject *__pyx_kp_s_I;
static PyObject *__pyx_n_s_INT_MAX_VALUE;
static PyObject *__pyx_n_s_INT_MIN_VALUE;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_LONG_MAX_VALUE;
static PyObject *__pyx_n_s_LONG_MIN_VALUE;
static PyObject *__pyx_kp_s_No_matching_schema_for_datum;
static PyObject *__pyx_kp_s_Non_integer_value_or_overflow;
static PyObject *__pyx_kp_s_Non_string_value;
static PyObject *__pyx_kp_s_Not_a_boolean_value;
static PyObject *__pyx_n_s_Pyx_CFunc_bytes____object___to;
static PyObject *__pyx_n_s_Pyx_CFunc_double____object___t;
static PyObject *__pyx_n_s_Pyx_CFunc_float____object___to;
static PyObject *__pyx_n_s_Pyx_CFunc_long__long____object;
static PyObject *__pyx_n_s_Pyx_CFunc_object____object___t;
static PyObject *__pyx_n_s_Pyx_CFunc_unicode____object;
static PyObject *__pyx_n_s_Pyx_CFunc_void____object____do;
static PyObject *__pyx_n_s_Pyx_CFunc_void____object____fl;
static PyObject *__pyx_n_s_Pyx_CFunc_void____object____lo;
static PyObject *__pyx_n_s_Pyx_CFunc_void____object____ob;
static PyObject *__pyx_n_s_ReadField;
static PyObject *__pyx_kp_s_Read_leaf_values;
static PyObject *__pyx_n_s_ReaderPlaceholder;
static PyObject *__pyx_n_s_ReaderPlaceholder___call;
static PyObject *__pyx_n_s_ReaderPlaceholder___init;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_kp_s_Size_Mismatch_for_Fixed_data;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_WriteField;
static PyObject *__pyx_kp_s_Write_leaf_values;
static PyObject *__pyx_n_s_WriterPlaceholder;
static PyObject *__pyx_n_s_WriterPlaceholder___call;
static PyObject *__pyx_n_s_WriterPlaceholder___init;
static PyObject *__pyx_n_s__15;
static PyObject *__pyx_kp_s__26;
static PyObject *__pyx_kp_b__4;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_u_array;
static PyObject *__pyx_n_s_array_check;
static PyObject *__pyx_n_s_array_reader;
static PyObject *__pyx_n_s_avro_to_py;
static PyObject *__pyx_n_s_binascii;
static PyObject *__pyx_n_s_block_count;
static PyObject *__pyx_n_s_block_size;
static PyObject *__pyx_n_s_boolean;
static PyObject *__pyx_n_u_boolean;
static PyObject *__pyx_n_s_bytes;
static PyObject *__pyx_n_s_call;
static PyObject *__pyx_n_s_cfunc_to_py;
static PyObject *__pyx_n_s_check;
static PyObject *__pyx_n_s_check_crc32;
static PyObject *__pyx_n_s_check_string;
static PyObject *__pyx_n_s_check_type_map;
static PyObject *__pyx_n_s_checked_boolean_writer;
static PyObject *__pyx_n_s_checked_int_write;
static PyObject *__pyx_n_s_checked_long_write;
static PyObject *__pyx_n_s_checked_string_writer;
static PyObject *__pyx_n_s_checked_write_fixed;
static PyObject *__pyx_n_s_checksum;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_complex_writer_lookup;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_s_crc32;
static PyObject *__pyx_n_s_data_writer;
static PyObject *__pyx_n_s_datum;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_double;
static PyObject *__pyx_n_u_double;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_u_enum;
static PyObject *__pyx_n_s_enum_check;
static PyObject *__pyx_n_s_enum_index;
static PyObject *__pyx_n_s_enum_reader;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_field;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_s_fixed;
static PyObject *__pyx_n_u_fixed;
static PyObject *__pyx_n_s_fixed_check;
static PyObject *__pyx_n_s_fixed_reader;
static PyObject *__pyx_n_s_float;
static PyObject *__pyx_n_u_float;
static PyObject *__pyx_n_s_fo;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fullname;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_check;
static PyObject *__pyx_n_s_get_reader;
static PyObject *__pyx_n_s_get_writer;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_idx;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_int;
static PyObject *__pyx_n_u_int;
static PyObject *__pyx_n_s_integer_types;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_item_check;
static PyObject *__pyx_n_s_item_count;
static PyObject *__pyx_n_s_item_reader;
static PyObject *__pyx_n_s_item_writer;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_long;
static PyObject *__pyx_n_u_long;
static PyObject *__pyx_n_s_lookup_result;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_make_array_check;
static PyObject *__pyx_n_s_make_array_check_locals_array_ch;
static PyObject *__pyx_n_s_make_array_reader;
static PyObject *__pyx_n_s_make_array_reader_locals_array_r;
static PyObject *__pyx_n_s_make_array_reader_locals_lambda;
static PyObject *__pyx_n_s_make_array_writer;
static PyObject *__pyx_n_s_make_array_writer_locals_lambda;
static PyObject *__pyx_n_s_make_array_writer_locals_write_a;
static PyObject *__pyx_n_s_make_boolean_check;
static PyObject *__pyx_n_s_make_boolean_check_locals_lambda;
static PyObject *__pyx_n_s_make_boolean_reader;
static PyObject *__pyx_n_s_make_boolean_writer;
static PyObject *__pyx_n_s_make_boolean_writer_locals_check;
static PyObject *__pyx_n_s_make_byte_check;
static PyObject *__pyx_n_s_make_byte_check_locals_lambda;
static PyObject *__pyx_n_s_make_byte_reader;
static PyObject *__pyx_n_s_make_byte_writer;
static PyObject *__pyx_n_s_make_default_reader;
static PyObject *__pyx_n_s_make_default_reader_locals_lambd;
static PyObject *__pyx_n_s_make_default_reader_locals_read;
static PyObject *__pyx_n_s_make_double_check;
static PyObject *__pyx_n_s_make_double_check_locals_lambda;
static PyObject *__pyx_n_s_make_double_reader;
static PyObject *__pyx_n_s_make_double_writer;
static PyObject *__pyx_n_s_make_enum_check;
static PyObject *__pyx_n_s_make_enum_check_locals_enum_chec;
static PyObject *__pyx_n_s_make_enum_reader;
static PyObject *__pyx_n_s_make_enum_reader_locals_enum_rea;
static PyObject *__pyx_n_s_make_enum_reader_locals_lambda;
static PyObject *__pyx_n_s_make_enum_writer;
static PyObject *__pyx_n_s_make_enum_writer_locals_lambda;
static PyObject *__pyx_n_s_make_enum_writer_locals_write_en;
static PyObject *__pyx_n_s_make_fixed_check;
static PyObject *__pyx_n_s_make_fixed_check_locals_fixed_ch;
static PyObject *__pyx_n_s_make_fixed_reader;
static PyObject *__pyx_n_s_make_fixed_reader_locals_fixed_r;
static PyObject *__pyx_n_s_make_fixed_reader_locals_lambda;
static PyObject *__pyx_n_s_make_fixed_writer;
static PyObject *__pyx_n_s_make_fixed_writer_locals_checked;
static PyObject *__pyx_n_s_make_float_check;
static PyObject *__pyx_n_s_make_float_check_locals_lambda;
static PyObject *__pyx_n_s_make_float_reader;
static PyObject *__pyx_n_s_make_float_writer;
static PyObject *__pyx_n_s_make_int_writer;
static PyObject *__pyx_n_s_make_int_writer_locals_checked_i;
static PyObject *__pyx_n_s_make_long_check;
static PyObject *__pyx_n_s_make_long_check_locals_lambda;
static PyObject *__pyx_n_s_make_long_reader;
static PyObject *__pyx_n_s_make_long_writer;
static PyObject *__pyx_n_s_make_long_writer_locals_checked;
static PyObject *__pyx_n_s_make_map_check;
static PyObject *__pyx_n_s_make_map_check_locals_map_check;
static PyObject *__pyx_n_s_make_map_reader;
static PyObject *__pyx_n_s_make_map_reader_locals_lambda;
static PyObject *__pyx_n_s_make_map_reader_locals_map_reade;
static PyObject *__pyx_n_s_make_map_writer;
static PyObject *__pyx_n_s_make_map_writer_locals_lambda;
static PyObject *__pyx_n_s_make_map_writer_locals_write_map;
static PyObject *__pyx_n_s_make_null_check;
static PyObject *__pyx_n_s_make_null_check_locals_lambda;
static PyObject *__pyx_n_s_make_null_reader;
static PyObject *__pyx_n_s_make_null_writer;
static PyObject *__pyx_n_s_make_record_check;
static PyObject *__pyx_n_s_make_record_check_locals_record;
static PyObject *__pyx_n_s_make_record_reader;
static PyObject *__pyx_n_s_make_record_reader_locals_lambda;
static PyObject *__pyx_n_s_make_record_reader_locals_record;
static PyObject *__pyx_n_s_make_record_writer;
static PyObject *__pyx_n_s_make_record_writer_locals_lambda;
static PyObject *__pyx_n_s_make_record_writer_locals_write;
static PyObject *__pyx_n_s_make_skip_reader;
static PyObject *__pyx_n_s_make_skip_reader_locals_lambda;
static PyObject *__pyx_n_s_make_skip_reader_locals_read_ski;
static PyObject *__pyx_n_s_make_string_check;
static PyObject *__pyx_n_s_make_string_reader;
static PyObject *__pyx_n_s_make_string_writer;
static PyObject *__pyx_n_s_make_string_writer_locals_checke;
static PyObject *__pyx_n_s_make_union_check;
static PyObject *__pyx_n_s_make_union_check_locals_union_ch;
static PyObject *__pyx_n_s_make_union_reader;
static PyObject *__pyx_n_s_make_union_reader_locals_lambda;
static PyObject *__pyx_n_s_make_union_reader_locals_union_r;
static PyObject *__pyx_n_s_make_union_writer;
static PyObject *__pyx_n_s_make_union_writer_locals_complex;
static PyObject *__pyx_n_s_make_union_writer_locals_lambda;
static PyObject *__pyx_n_s_make_union_writer_locals_simple;
static PyObject *__pyx_n_s_make_union_writer_locals_write_u;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_u_map;
static PyObject *__pyx_n_s_map_check;
static PyObject *__pyx_n_s_map_reader;
static PyObject *__pyx_n_s_map_value_check;
static PyObject *__pyx_n_s_map_value_writer;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_n_s_namespace;
static PyObject *__pyx_n_s_namspace_record_name;
static PyObject *__pyx_n_s_null;
static PyObject *__pyx_n_u_null;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_kp_s_opt_ps_spavro_src_spavro_fast_b;
static PyObject *__pyx_n_s_outbuf;
static PyObject *__pyx_n_s_pack;
static PyObject *__pyx_n_s_placeholder;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_py_to_avro;
static PyObject *__pyx_n_s_python_type;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_read_boolean;
static PyObject *__pyx_n_s_read_bytes;
static PyObject *__pyx_n_s_read_default;
static PyObject *__pyx_n_s_read_double;
static PyObject *__pyx_n_s_read_float;
static PyObject *__pyx_n_s_read_int;
static PyObject *__pyx_n_s_read_items;
static PyObject *__pyx_n_s_read_long;
static PyObject *__pyx_n_s_read_null;
static PyObject *__pyx_n_s_read_skip;
static PyObject *__pyx_n_s_read_utf8;
static PyObject *__pyx_n_s_reader;
static PyObject *__pyx_n_s_reader_type_map;
static PyObject *__pyx_n_s_readers;
static PyObject *__pyx_n_s_record;
static PyObject *__pyx_n_u_record;
static PyObject *__pyx_n_s_record_check;
static PyObject *__pyx_n_s_record_name;
static PyObject *__pyx_n_s_record_reader;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_schema;
static PyObject *__pyx_n_s_schema_cache;
static PyObject *__pyx_n_s_schema_type;
static PyObject *__pyx_n_s_seek;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_signed_datum;
static PyObject *__pyx_n_s_simple_union;
static PyObject *__pyx_n_s_simple_writer_lookup;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_skip;
static PyObject *__pyx_n_s_skip_boolean;
static PyObject *__pyx_n_s_skip_bytes;
static PyObject *__pyx_n_s_skip_double;
static PyObject *__pyx_n_s_skip_float;
static PyObject *__pyx_n_s_skip_int;
static PyObject *__pyx_n_s_skip_long;
static PyObject *__pyx_n_s_skip_null;
static PyObject *__pyx_n_s_skip_utf8;
static PyObject *__pyx_n_s_spavro_fast_binary;
static PyObject *__pyx_n_s_string;
static PyObject *__pyx_n_u_string;
static PyObject *__pyx_n_s_string_types;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_symbols;
static PyObject *__pyx_n_s_tell;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_type_list;
static PyObject *__pyx_n_s_union;
static PyObject *__pyx_n_u_union;
static PyObject *__pyx_n_s_union_check;
static PyObject *__pyx_n_s_union_checks;
static PyObject *__pyx_n_s_union_index;
static PyObject *__pyx_n_s_union_reader;
static PyObject *__pyx_n_s_union_schema;
static PyObject *__pyx_n_s_unpack;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_reader;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_wrap;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_write_array;
static PyObject *__pyx_n_s_write_boolean;
static PyObject *__pyx_n_s_write_bytes;
static PyObject *__pyx_n_s_write_crc32;
static PyObject *__pyx_n_s_write_double;
static PyObject *__pyx_n_s_write_enum;
static PyObject *__pyx_n_s_write_float;
static PyObject *__pyx_n_s_write_int;
static PyObject *__pyx_n_s_write_long;
static PyObject *__pyx_n_s_write_map;
static PyObject *__pyx_n_s_write_null;
static PyObject *__pyx_n_s_write_record;
static PyObject *__pyx_n_s_write_union;
static PyObject *__pyx_n_s_write_utf8;
static PyObject *__pyx_n_s_writer;
static PyObject *__pyx_n_s_writer_lookup;
static PyObject *__pyx_n_s_writer_lookup_dict;
static PyObject *__pyx_n_s_writer_type_map;
static PyObject *__pyx_pf_6spavro_11fast_binary_read_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_2get_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_reader_union_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_4make_union_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_union_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_18make_record_reader_record_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_6make_record_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_enum_reader_enum_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_8make_enum_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_array_reader_array_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_10make_array_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_15make_map_reader_map_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_12make_map_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_fixed_reader_fixed_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_14make_fixed_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_null_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_18make_string_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_20make_boolean_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_22make_double_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_24make_long_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_26make_byte_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_28make_float_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_skip_reader_read_skip(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_30make_skip_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_19make_default_reader_read_default(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda7(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_32make_default_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17ReaderPlaceholder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17ReaderPlaceholder_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_34get_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_36get_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_record_check_record_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_38make_record_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_15make_enum_check_enum_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_40make_enum_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_42make_null_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_44check_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_46make_string_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda9(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_48make_long_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda10(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_50make_boolean_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda11(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_52make_float_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda12(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_54make_double_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda13(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_56make_byte_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_array_check_array_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_58make_array_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_union_check_union_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_60make_union_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_union_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_fixed_check_fixed_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_62make_fixed_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_14make_map_check_map_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_64make_map_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_writer_simple_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_writer_2complex_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_writer_4write_union(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda14(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_66make_union_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_union_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_enum_writer_write_enum(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda15(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_68make_enum_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_18make_record_writer_write_record(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda16(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_70make_record_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_array_writer_write_array(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda17(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_72make_array_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_15make_map_writer_write_map(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda18(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_74make_map_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_19make_boolean_writer_checked_boolean_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_76make_boolean_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17make_fixed_writer_checked_write_fixed(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_78make_fixed_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_15make_int_writer_checked_int_write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_80make_int_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_16make_long_writer_checked_long_write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_82make_long_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_18make_string_writer_checked_string_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_84make_string_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_86make_byte_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_88make_float_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_90make_double_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_92make_null_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17WriterPlaceholder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17WriterPlaceholder_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fo, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_94get_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_writer); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_4write_null(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_6write_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_8write_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_10write_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_12write_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_14write_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_16write_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_18write_utf8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_20write_crc32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bytes); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reader); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_2read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_4read_null(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_6read_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_8read_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_10read_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_12read_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_14read_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_16read_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_18read_utf8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_20check_crc32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bytes); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_22skip_null(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_24skip_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_26skip_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_28skip_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_30skip_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_32skip_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_34skip_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_36skip_utf8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_38skip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PY_LONG_LONG __pyx_v_signed_datum); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, float __pyx_v_datum); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, double __pyx_v_datum); /* proto */
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct__make_union_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_double____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_2147483647;
static PyObject *__pyx_int_4294967295;
static PyObject *__pyx_int_9223372036854775807;
static PyObject *__pyx_int_neg_2147483648;
static PyObject *__pyx_int_neg_9223372036854775808;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
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__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
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__42;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__258;

/* "spavro/fast_binary.pyx":14
 * LONG_MAX_VALUE = (1 << 63) - 1
 * 
 * cdef long long read_long(fo):             # <<<<<<<<<<<<<<
 *     '''Read a long using zig-zag binary encoding'''
 *     cdef:
 */

static PY_LONG_LONG __pyx_f_6spavro_11fast_binary_read_long(PyObject *__pyx_v_fo) {
  unsigned PY_LONG_LONG __pyx_v_accum;
  int __pyx_v_temp_datum;
  char *__pyx_v_c_raw;
  int __pyx_v_shift;
  PyObject *__pyx_v_raw = NULL;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("read_long", 0);

  /* "spavro/fast_binary.pyx":20
 *         int temp_datum
 *         char* c_raw
 *         int shift = 7             # <<<<<<<<<<<<<<
 *     raw = fo.read(1)
 *     c_raw = raw
 */
  __pyx_v_shift = 7;

  /* "spavro/fast_binary.pyx":21
 *         char* c_raw
 *         int shift = 7
 *     raw = fo.read(1)             # <<<<<<<<<<<<<<
 *     c_raw = raw
 *     temp_datum = <int>c_raw[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_raw = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":22
 *         int shift = 7
 *     raw = fo.read(1)
 *     c_raw = raw             # <<<<<<<<<<<<<<
 *     temp_datum = <int>c_raw[0]
 *     accum = temp_datum & 0x7F
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_raw); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error)
  __pyx_v_c_raw = __pyx_t_3;

  /* "spavro/fast_binary.pyx":23
 *     raw = fo.read(1)
 *     c_raw = raw
 *     temp_datum = <int>c_raw[0]             # <<<<<<<<<<<<<<
 *     accum = temp_datum & 0x7F
 *     while (temp_datum & 0x80) != 0:
 */
  __pyx_v_temp_datum = ((int)(__pyx_v_c_raw[0]));

  /* "spavro/fast_binary.pyx":24
 *     c_raw = raw
 *     temp_datum = <int>c_raw[0]
 *     accum = temp_datum & 0x7F             # <<<<<<<<<<<<<<
 *     while (temp_datum & 0x80) != 0:
 *         raw = fo.read(1)
 */
  __pyx_v_accum = (__pyx_v_temp_datum & 0x7F);

  /* "spavro/fast_binary.pyx":25
 *     temp_datum = <int>c_raw[0]
 *     accum = temp_datum & 0x7F
 *     while (temp_datum & 0x80) != 0:             # <<<<<<<<<<<<<<
 *         raw = fo.read(1)
 *         c_raw = raw
 */
  while (1) {
    __pyx_t_4 = (((__pyx_v_temp_datum & 0x80) != 0) != 0);
    if (!__pyx_t_4) break;

    /* "spavro/fast_binary.pyx":26
 *     accum = temp_datum & 0x7F
 *     while (temp_datum & 0x80) != 0:
 *         raw = fo.read(1)             # <<<<<<<<<<<<<<
 *         c_raw = raw
 *         temp_datum = <int>c_raw[0]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_raw, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":27
 *     while (temp_datum & 0x80) != 0:
 *         raw = fo.read(1)
 *         c_raw = raw             # <<<<<<<<<<<<<<
 *         temp_datum = <int>c_raw[0]
 *         accum |= (temp_datum & 0x7F) << shift
 */
    __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_raw); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L1_error)
    __pyx_v_c_raw = __pyx_t_3;

    /* "spavro/fast_binary.pyx":28
 *         raw = fo.read(1)
 *         c_raw = raw
 *         temp_datum = <int>c_raw[0]             # <<<<<<<<<<<<<<
 *         accum |= (temp_datum & 0x7F) << shift
 *         shift += 7
 */
    __pyx_v_temp_datum = ((int)(__pyx_v_c_raw[0]));

    /* "spavro/fast_binary.pyx":29
 *         c_raw = raw
 *         temp_datum = <int>c_raw[0]
 *         accum |= (temp_datum & 0x7F) << shift             # <<<<<<<<<<<<<<
 *         shift += 7
 *     return (accum >> 1) ^ -(accum & 1)
 */
    __pyx_v_accum = (__pyx_v_accum | ((__pyx_v_temp_datum & 0x7F) << __pyx_v_shift));

    /* "spavro/fast_binary.pyx":30
 *         temp_datum = <int>c_raw[0]
 *         accum |= (temp_datum & 0x7F) << shift
 *         shift += 7             # <<<<<<<<<<<<<<
 *     return (accum >> 1) ^ -(accum & 1)
 * 
 */
    __pyx_v_shift = (__pyx_v_shift + 7);
  }

  /* "spavro/fast_binary.pyx":31
 *         accum |= (temp_datum & 0x7F) << shift
 *         shift += 7
 *     return (accum >> 1) ^ -(accum & 1)             # <<<<<<<<<<<<<<
 * 
 * cdef bytes read_bytes(fo):
 */
  __pyx_r = ((__pyx_v_accum >> 1) ^ (-(__pyx_v_accum & 1)));
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":14
 * LONG_MAX_VALUE = (1 << 63) - 1
 * 
 * cdef long long read_long(fo):             # <<<<<<<<<<<<<<
 *     '''Read a long using zig-zag binary encoding'''
 *     cdef:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("spavro.fast_binary.read_long", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_raw);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":33
 *     return (accum >> 1) ^ -(accum & 1)
 * 
 * cdef bytes read_bytes(fo):             # <<<<<<<<<<<<<<
 *     '''Bytes are a marker for length of bytes and then binary data'''
 *     return fo.read(read_long(fo))
 */

static PyObject *__pyx_f_6spavro_11fast_binary_read_bytes(PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("read_bytes", 0);

  /* "spavro/fast_binary.pyx":35
 * cdef bytes read_bytes(fo):
 *     '''Bytes are a marker for length of bytes and then binary data'''
 *     return fo.read(read_long(fo))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 35, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":33
 *     return (accum >> 1) ^ -(accum & 1)
 * 
 * cdef bytes read_bytes(fo):             # <<<<<<<<<<<<<<
 *     '''Bytes are a marker for length of bytes and then binary data'''
 *     return fo.read(read_long(fo))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":38
 * 
 * 
 * cdef read_null(fo):             # <<<<<<<<<<<<<<
 *     """
 *     null is written as zero bytes
 */

static PyObject *__pyx_f_6spavro_11fast_binary_read_null(CYTHON_UNUSED PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_null", 0);

  /* "spavro/fast_binary.pyx":42
 *     null is written as zero bytes
 *     """
 *     return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":38
 * 
 * 
 * cdef read_null(fo):             # <<<<<<<<<<<<<<
 *     """
 *     null is written as zero bytes
 */

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

/* "spavro/fast_binary.pyx":45
 * 
 * 
 * def read_boolean(fo):             # <<<<<<<<<<<<<<
 *     """
 *     a boolean is written as a single byte
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_1read_boolean(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_read_boolean[] = "\n    a boolean is written as a single byte \n    whose value is either 0 (false) or 1 (true).\n    ";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_1read_boolean = {"read_boolean", (PyCFunction)__pyx_pw_6spavro_11fast_binary_1read_boolean, METH_O, __pyx_doc_6spavro_11fast_binary_read_boolean};
static PyObject *__pyx_pw_6spavro_11fast_binary_1read_boolean(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_boolean (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_read_boolean(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_read_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_boolean", 0);

  /* "spavro/fast_binary.pyx":50
 *     whose value is either 0 (false) or 1 (true).
 *     """
 *     return fo.read(1) == b'\x01'             # <<<<<<<<<<<<<<
 * 
 * cdef float read_float(fo):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_b__4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":45
 * 
 * 
 * def read_boolean(fo):             # <<<<<<<<<<<<<<
 *     """
 *     a boolean is written as a single byte
 */

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

/* "spavro/fast_binary.pyx":52
 *     return fo.read(1) == b'\x01'
 * 
 * cdef float read_float(fo):             # <<<<<<<<<<<<<<
 *     """
 *     A float is written as 4 bytes.
 */

static float __pyx_f_6spavro_11fast_binary_read_float(PyObject *__pyx_v_fo) {
  PyObject *__pyx_v_data = NULL;
  char *__pyx_v_y;
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  __Pyx_RefNannySetupContext("read_float", 0);

  /* "spavro/fast_binary.pyx":58
 *     Java's floatToIntBits and then encoded in little-endian format.
 *     """
 *     data = fo.read(4)             # <<<<<<<<<<<<<<
 *     cdef char* y = data
 *     return (<float*>y)[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":59
 *     """
 *     data = fo.read(4)
 *     cdef char* y = data             # <<<<<<<<<<<<<<
 *     return (<float*>y)[0]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_data); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L1_error)
  __pyx_v_y = __pyx_t_3;

  /* "spavro/fast_binary.pyx":60
 *     data = fo.read(4)
 *     cdef char* y = data
 *     return (<float*>y)[0]             # <<<<<<<<<<<<<<
 * 
 * cdef double read_double(fo):
 */
  __pyx_r = (((float *)__pyx_v_y)[0]);
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":52
 *     return fo.read(1) == b'\x01'
 * 
 * cdef float read_float(fo):             # <<<<<<<<<<<<<<
 *     """
 *     A float is written as 4 bytes.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("spavro.fast_binary.read_float", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":62
 *     return (<float*>y)[0]
 * 
 * cdef double read_double(fo):             # <<<<<<<<<<<<<<
 *     """
 *     A double is written as 8 bytes.
 */

static double __pyx_f_6spavro_11fast_binary_read_double(PyObject *__pyx_v_fo) {
  PyObject *__pyx_v_data = NULL;
  char *__pyx_v_y;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  __Pyx_RefNannySetupContext("read_double", 0);

  /* "spavro/fast_binary.pyx":68
 *     Java's doubleToLongBits and then encoded in little-endian format.
 *     """
 *     data = fo.read(8)             # <<<<<<<<<<<<<<
 *     cdef char* y = data
 *     return (<double*>y)[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":69
 *     """
 *     data = fo.read(8)
 *     cdef char* y = data             # <<<<<<<<<<<<<<
 *     return (<double*>y)[0]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_data); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L1_error)
  __pyx_v_y = __pyx_t_3;

  /* "spavro/fast_binary.pyx":70
 *     data = fo.read(8)
 *     cdef char* y = data
 *     return (<double*>y)[0]             # <<<<<<<<<<<<<<
 * 
 * cdef unicode read_utf8(fo):
 */
  __pyx_r = (((double *)__pyx_v_y)[0]);
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":62
 *     return (<float*>y)[0]
 * 
 * cdef double read_double(fo):             # <<<<<<<<<<<<<<
 *     """
 *     A double is written as 8 bytes.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("spavro.fast_binary.read_double", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":72
 *     return (<double*>y)[0]
 * 
 * cdef unicode read_utf8(fo):             # <<<<<<<<<<<<<<
 *     """
 *     A string is encoded as a long followed by
 */

static PyObject *__pyx_f_6spavro_11fast_binary_read_utf8(PyObject *__pyx_v_fo) {
  PyObject *__pyx_v_byte_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_utf8", 0);

  /* "spavro/fast_binary.pyx":77
 *     that many bytes of UTF-8 encoded character data.
 *     """
 *     byte_data = read_bytes(fo)             # <<<<<<<<<<<<<<
 *     return unicode(byte_data, "utf-8")
 * 
 */
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_read_bytes(__pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_byte_data = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":78
 *     """
 *     byte_data = read_bytes(fo)
 *     return unicode(byte_data, "utf-8")             # <<<<<<<<<<<<<<
 * 
 * # ======================================================================
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_byte_data);
  __Pyx_GIVEREF(__pyx_v_byte_data);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_byte_data);
  __Pyx_INCREF(__pyx_kp_s_utf_8);
  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_utf_8);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":72
 *     return (<double*>y)[0]
 * 
 * cdef unicode read_utf8(fo):             # <<<<<<<<<<<<<<
 *     """
 *     A string is encoded as a long followed by
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.read_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byte_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":85
 * WriteField = namedtuple('WriteField', ['name', 'writer'])
 * 
 * cpdef unicode get_type(schema):             # <<<<<<<<<<<<<<
 *     if isinstance(schema, list):
 *         return u"union"
 */

static PyObject *__pyx_pw_6spavro_11fast_binary_3get_type(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_6spavro_11fast_binary_get_type(PyObject *__pyx_v_schema, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("get_type", 0);

  /* "spavro/fast_binary.pyx":86
 * 
 * cpdef unicode get_type(schema):
 *     if isinstance(schema, list):             # <<<<<<<<<<<<<<
 *         return u"union"
 *     elif isinstance(schema, dict):
 */
  __pyx_t_1 = PyList_Check(__pyx_v_schema); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "spavro/fast_binary.pyx":87
 * cpdef unicode get_type(schema):
 *     if isinstance(schema, list):
 *         return u"union"             # <<<<<<<<<<<<<<
 *     elif isinstance(schema, dict):
 *         return unicode(schema['type'])  # "record"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_u_union);
    __pyx_r = __pyx_n_u_union;
    goto __pyx_L0;

    /* "spavro/fast_binary.pyx":86
 * 
 * cpdef unicode get_type(schema):
 *     if isinstance(schema, list):             # <<<<<<<<<<<<<<
 *         return u"union"
 *     elif isinstance(schema, dict):
 */
  }

  /* "spavro/fast_binary.pyx":88
 *     if isinstance(schema, list):
 *         return u"union"
 *     elif isinstance(schema, dict):             # <<<<<<<<<<<<<<
 *         return unicode(schema['type'])  # "record"
 *     else:
 */
  __pyx_t_2 = PyDict_Check(__pyx_v_schema); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "spavro/fast_binary.pyx":89
 *         return u"union"
 *     elif isinstance(schema, dict):
 *         return unicode(schema['type'])  # "record"             # <<<<<<<<<<<<<<
 *     else:
 *         return unicode(schema)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "spavro/fast_binary.pyx":88
 *     if isinstance(schema, list):
 *         return u"union"
 *     elif isinstance(schema, dict):             # <<<<<<<<<<<<<<
 *         return unicode(schema['type'])  # "record"
 *     else:
 */
  }

  /* "spavro/fast_binary.pyx":91
 *         return unicode(schema['type'])  # "record"
 *     else:
 *         return unicode(schema)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_schema);
    __Pyx_GIVEREF(__pyx_v_schema);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_schema);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "spavro/fast_binary.pyx":85
 * WriteField = namedtuple('WriteField', ['name', 'writer'])
 * 
 * cpdef unicode get_type(schema):             # <<<<<<<<<<<<<<
 *     if isinstance(schema, list):
 *         return u"union"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("spavro.fast_binary.get_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_3get_type(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_pw_6spavro_11fast_binary_3get_type(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_type (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_2get_type(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_2get_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_type", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_v_schema, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":94
 * 
 * 
 * def make_union_reader(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_5make_union_reader(PyObject *__pyx_self, PyObject *__pyx_v_union_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_5make_union_reader = {"make_union_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_5make_union_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_5make_union_reader(PyObject *__pyx_self, PyObject *__pyx_v_union_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_union_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_4make_union_reader(__pyx_self, ((PyObject *)__pyx_v_union_schema));

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

/* "spavro/fast_binary.pyx":97
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 *     def union_reader(fo):             # <<<<<<<<<<<<<<
 *         '''Read the long index for which schema to process, then use that'''
 *         union_index = read_long(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_reader_1union_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_17make_union_reader_union_reader[] = "Read the long index for which schema to process, then use that";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_union_reader_1union_reader = {"union_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_union_reader_1union_reader, METH_O, __pyx_doc_6spavro_11fast_binary_17make_union_reader_union_reader};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_reader_1union_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("union_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_union_reader_union_reader(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_reader_union_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *__pyx_outer_scope;
  PY_LONG_LONG __pyx_v_union_index;
  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;
  __Pyx_RefNannySetupContext("union_reader", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":99
 *     def union_reader(fo):
 *         '''Read the long index for which schema to process, then use that'''
 *         union_index = read_long(fo)             # <<<<<<<<<<<<<<
 *         return readers[union_index](fo)
 *     union_reader.__reduce__ = lambda: (make_union_reader, (union_schema,))
 */
  __pyx_v_union_index = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);

  /* "spavro/fast_binary.pyx":100
 *         '''Read the long index for which schema to process, then use that'''
 *         union_index = read_long(fo)
 *         return readers[union_index](fo)             # <<<<<<<<<<<<<<
 *     union_reader.__reduce__ = lambda: (make_union_reader, (union_schema,))
 *     return union_reader
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_readers)) { __Pyx_RaiseClosureNameError("readers"); __PYX_ERR(0, 100, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_readers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 100, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_readers, __pyx_v_union_index, PY_LONG_LONG, 1, __Pyx_PyInt_From_PY_LONG_LONG, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_fo};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_fo};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_fo);
      __Pyx_GIVEREF(__pyx_v_fo);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_fo);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":97
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 *     def union_reader(fo):             # <<<<<<<<<<<<<<
 *         '''Read the long index for which schema to process, then use that'''
 *         union_index = read_long(fo)
 */

  /* 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("spavro.fast_binary.make_union_reader.union_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":101
 *         union_index = read_long(fo)
 *         return readers[union_index](fo)
 *     union_reader.__reduce__ = lambda: (make_union_reader, (union_schema,))             # <<<<<<<<<<<<<<
 *     return union_reader
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_reader_2lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_union_reader_2lambda = {"lambda", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_union_reader_2lambda, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_reader_2lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_union_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_union_schema)) { __Pyx_RaiseClosureNameError("union_schema"); __PYX_ERR(0, 101, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_union_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_union_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_union_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":94
 * 
 * 
 * def make_union_reader(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_4make_union_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_union_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *__pyx_cur_scope;
  PyObject *__pyx_v_union_reader = 0;
  PyObject *__pyx_v_schema = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("make_union_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct__make_union_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct__make_union_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 94, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_union_schema = __pyx_v_union_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_union_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_union_schema);

  /* "spavro/fast_binary.pyx":95
 * 
 * def make_union_reader(union_schema):
 *     cdef list readers = [get_reader(schema) for schema in union_schema]             # <<<<<<<<<<<<<<
 * 
 *     def union_reader(fo):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_union_schema; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_union_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 95, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 95, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 95, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_schema, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_reader); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    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);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_schema);
        __Pyx_GIVEREF(__pyx_v_schema);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_schema);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_readers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":97
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 *     def union_reader(fo):             # <<<<<<<<<<<<<<
 *         '''Read the long index for which schema to process, then use that'''
 *         union_index = read_long(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_union_reader_1union_reader, 0, __pyx_n_s_make_union_reader_locals_union_r, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_union_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":101
 *         union_index = read_long(fo)
 *         return readers[union_index](fo)
 *     union_reader.__reduce__ = lambda: (make_union_reader, (union_schema,))             # <<<<<<<<<<<<<<
 *     return union_reader
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_union_reader_2lambda, 0, __pyx_n_s_make_union_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_union_reader, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":102
 *         return readers[union_index](fo)
 *     union_reader.__reduce__ = lambda: (make_union_reader, (union_schema,))
 *     return union_reader             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_union_reader);
  __pyx_r = __pyx_v_union_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":94
 * 
 * 
 * def make_union_reader(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_union_reader);
  __Pyx_XDECREF(__pyx_v_schema);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":105
 * 
 * 
 * def make_record_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_7make_record_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_7make_record_reader = {"make_record_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_7make_record_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_7make_record_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_record_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_6make_record_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":108
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 *     def record_reader(fo):             # <<<<<<<<<<<<<<
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_reader_1record_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_18make_record_reader_1record_reader = {"record_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_18make_record_reader_1record_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_reader_1record_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("record_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_18make_record_reader_record_reader(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_18make_record_reader_record_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("record_reader", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":109
 * 
 *     def record_reader(fo):
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}             # <<<<<<<<<<<<<<
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))
 *     return record_reader
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    PyObject *__pyx_7genexpr__pyx_v_field = NULL;
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(!__pyx_cur_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); __PYX_ERR(0, 109, __pyx_L5_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 109, __pyx_L5_error)
    }
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 109, __pyx_L5_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_field, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_field, __pyx_n_s_skip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 109, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_5 = __pyx_t_6;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_field, __pyx_n_s_reader); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_8) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_fo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_fo};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_fo};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_v_fo);
          __Pyx_GIVEREF(__pyx_v_fo);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_fo);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_6 = (__pyx_t_4 == Py_None);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = (__pyx_t_6 != 0);
      __pyx_t_5 = __pyx_t_10;
      __pyx_L9_bool_binop_done:;
      __pyx_t_10 = ((!__pyx_t_5) != 0);
      if (__pyx_t_10) {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_field, __pyx_n_s_reader); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_fo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_fo};
            __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L5_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_7);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_fo};
            __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L5_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_7);
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 109, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL;
            __Pyx_INCREF(__pyx_v_fo);
            __Pyx_GIVEREF(__pyx_v_fo);
            PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_fo);
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_4, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 109, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field);
    goto __pyx_L11_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field);
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":108
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 *     def record_reader(fo):             # <<<<<<<<<<<<<<
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("spavro.fast_binary.make_record_reader.record_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":110
 *     def record_reader(fo):
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return record_reader
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_reader_2lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_18make_record_reader_2lambda1 = {"lambda1", (PyCFunction)__pyx_pw_6spavro_11fast_binary_18make_record_reader_2lambda1, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_reader_2lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_record_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 110, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":105
 * 
 * 
 * def make_record_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_6make_record_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *__pyx_cur_scope;
  PyObject *__pyx_v_record_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  __Pyx_RefNannySetupContext("make_record_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 105, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":106
 * 
 * def make_record_reader(schema):
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]             # <<<<<<<<<<<<<<
 * 
 *     def record_reader(fo):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 106, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReadField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_reader); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_field, __pyx_n_s_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_field, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_t_9, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_s_skip, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_9 = NULL;
    __pyx_t_14 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_14 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_7, __pyx_t_8, __pyx_t_12};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_7, __pyx_t_8, __pyx_t_12};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_14, __pyx_t_12);
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_12 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":108
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 *     def record_reader(fo):             # <<<<<<<<<<<<<<
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_18make_record_reader_1record_reader, 0, __pyx_n_s_make_record_reader_locals_record, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_record_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":110
 *     def record_reader(fo):
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return record_reader
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_18make_record_reader_2lambda1, 0, __pyx_n_s_make_record_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_record_reader, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":111
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))
 *     return record_reader             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_record_reader);
  __pyx_r = __pyx_v_record_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":105
 * 
 * 
 * def make_record_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("spavro.fast_binary.make_record_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_record_reader);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":114
 * 
 * 
 * def make_enum_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_9make_enum_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_9make_enum_reader = {"make_enum_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_9make_enum_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_9make_enum_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_enum_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_8make_enum_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":117
 *     cdef list symbols = schema['symbols']
 * 
 *     def enum_reader(fo):             # <<<<<<<<<<<<<<
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_reader_1enum_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_enum_reader_1enum_reader = {"enum_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_enum_reader_1enum_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_reader_1enum_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enum_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_enum_reader_enum_reader(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_enum_reader_enum_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("enum_reader", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":118
 * 
 *     def enum_reader(fo):
 *         return symbols[read_long(fo)]             # <<<<<<<<<<<<<<
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))
 *     return enum_reader
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_symbols)) { __Pyx_RaiseClosureNameError("symbols"); __PYX_ERR(0, 118, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_symbols == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 118, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_symbols, __pyx_t_1, PY_LONG_LONG, 1, __Pyx_PyInt_From_PY_LONG_LONG, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":117
 *     cdef list symbols = schema['symbols']
 * 
 *     def enum_reader(fo):             # <<<<<<<<<<<<<<
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_reader.enum_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":119
 *     def enum_reader(fo):
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return enum_reader
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_reader_2lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_enum_reader_2lambda2 = {"lambda2", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_enum_reader_2lambda2, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_reader_2lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_enum_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 119, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":114
 * 
 * 
 * def make_enum_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_8make_enum_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *__pyx_cur_scope;
  PyObject *__pyx_v_enum_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_enum_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 114, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":115
 * 
 * def make_enum_reader(schema):
 *     cdef list symbols = schema['symbols']             # <<<<<<<<<<<<<<
 * 
 *     def enum_reader(fo):
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_symbols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":117
 *     cdef list symbols = schema['symbols']
 * 
 *     def enum_reader(fo):             # <<<<<<<<<<<<<<
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_enum_reader_1enum_reader, 0, __pyx_n_s_make_enum_reader_locals_enum_rea, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_enum_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":119
 *     def enum_reader(fo):
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return enum_reader
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_enum_reader_2lambda2, 0, __pyx_n_s_make_enum_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_enum_reader, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":120
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))
 *     return enum_reader             # <<<<<<<<<<<<<<
 * 
 * def make_array_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_enum_reader);
  __pyx_r = __pyx_v_enum_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":114
 * 
 * 
 * def make_enum_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_enum_reader);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":122
 *     return enum_reader
 * 
 * def make_array_reader(schema):             # <<<<<<<<<<<<<<
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_11make_array_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_11make_array_reader = {"make_array_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_11make_array_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_11make_array_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_array_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_10make_array_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":124
 * def make_array_reader(schema):
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count
 *         cdef list read_items = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_reader_1array_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_array_reader_1array_reader = {"array_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_array_reader_1array_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_reader_1array_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_array_reader_array_reader(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_array_reader_array_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *__pyx_outer_scope;
  long __pyx_v_block_count;
  PyObject *__pyx_v_read_items = 0;
  CYTHON_UNUSED PY_LONG_LONG __pyx_v_block_size;
  CYTHON_UNUSED long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("array_reader", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":126
 *     def array_reader(fo):
 *         cdef long block_count
 *         cdef list read_items = []             # <<<<<<<<<<<<<<
 *         block_count = read_long(fo)
 *         while block_count != 0:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_read_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":127
 *         cdef long block_count
 *         cdef list read_items = []
 *         block_count = read_long(fo)             # <<<<<<<<<<<<<<
 *         while block_count != 0:
 *             if block_count < 0:
 */
  __pyx_v_block_count = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);

  /* "spavro/fast_binary.pyx":128
 *         cdef list read_items = []
 *         block_count = read_long(fo)
 *         while block_count != 0:             # <<<<<<<<<<<<<<
 *             if block_count < 0:
 *                 block_count = -block_count
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_block_count != 0) != 0);
    if (!__pyx_t_2) break;

    /* "spavro/fast_binary.pyx":129
 *         block_count = read_long(fo)
 *         while block_count != 0:
 *             if block_count < 0:             # <<<<<<<<<<<<<<
 *                 block_count = -block_count
 *                 block_size = read_long(fo)
 */
    __pyx_t_2 = ((__pyx_v_block_count < 0) != 0);
    if (__pyx_t_2) {

      /* "spavro/fast_binary.pyx":130
 *         while block_count != 0:
 *             if block_count < 0:
 *                 block_count = -block_count             # <<<<<<<<<<<<<<
 *                 block_size = read_long(fo)
 *             for i in range(block_count):
 */
      __pyx_v_block_count = (-__pyx_v_block_count);

      /* "spavro/fast_binary.pyx":131
 *             if block_count < 0:
 *                 block_count = -block_count
 *                 block_size = read_long(fo)             # <<<<<<<<<<<<<<
 *             for i in range(block_count):
 *                 read_items.append(item_reader(fo))
 */
      __pyx_v_block_size = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);

      /* "spavro/fast_binary.pyx":129
 *         block_count = read_long(fo)
 *         while block_count != 0:
 *             if block_count < 0:             # <<<<<<<<<<<<<<
 *                 block_count = -block_count
 *                 block_size = read_long(fo)
 */
    }

    /* "spavro/fast_binary.pyx":132
 *                 block_count = -block_count
 *                 block_size = read_long(fo)
 *             for i in range(block_count):             # <<<<<<<<<<<<<<
 *                 read_items.append(item_reader(fo))
 *             block_count = read_long(fo)
 */
    __pyx_t_3 = __pyx_v_block_count;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "spavro/fast_binary.pyx":133
 *                 block_size = read_long(fo)
 *             for i in range(block_count):
 *                 read_items.append(item_reader(fo))             # <<<<<<<<<<<<<<
 *             block_count = read_long(fo)
 *         return read_items
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_item_reader)) { __Pyx_RaiseClosureNameError("item_reader"); __PYX_ERR(0, 133, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_item_reader);
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_item_reader; __pyx_t_6 = NULL;
      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);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fo};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fo};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_fo);
          __Pyx_GIVEREF(__pyx_v_fo);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_fo);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_read_items, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "spavro/fast_binary.pyx":134
 *             for i in range(block_count):
 *                 read_items.append(item_reader(fo))
 *             block_count = read_long(fo)             # <<<<<<<<<<<<<<
 *         return read_items
 *     array_reader.__reduce__ = lambda: (make_array_reader, (schema,))
 */
    __pyx_v_block_count = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);
  }

  /* "spavro/fast_binary.pyx":135
 *                 read_items.append(item_reader(fo))
 *             block_count = read_long(fo)
 *         return read_items             # <<<<<<<<<<<<<<
 *     array_reader.__reduce__ = lambda: (make_array_reader, (schema,))
 *     return array_reader
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_read_items);
  __pyx_r = __pyx_v_read_items;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":124
 * def make_array_reader(schema):
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count
 *         cdef list read_items = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("spavro.fast_binary.make_array_reader.array_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_read_items);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":136
 *             block_count = read_long(fo)
 *         return read_items
 *     array_reader.__reduce__ = lambda: (make_array_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return array_reader
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_reader_2lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_array_reader_2lambda3 = {"lambda3", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_array_reader_2lambda3, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_reader_2lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_array_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 136, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":122
 *     return enum_reader
 * 
 * def make_array_reader(schema):             # <<<<<<<<<<<<<<
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_10make_array_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *__pyx_cur_scope;
  PyObject *__pyx_v_array_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_array_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 122, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":123
 * 
 * def make_array_reader(schema):
 *     item_reader = get_reader(schema['items'])             # <<<<<<<<<<<<<<
 *     def array_reader(fo):
 *         cdef long block_count
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_item_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":124
 * def make_array_reader(schema):
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count
 *         cdef list read_items = []
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_array_reader_1array_reader, 0, __pyx_n_s_make_array_reader_locals_array_r, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_array_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":136
 *             block_count = read_long(fo)
 *         return read_items
 *     array_reader.__reduce__ = lambda: (make_array_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return array_reader
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_array_reader_2lambda3, 0, __pyx_n_s_make_array_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_array_reader, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":137
 *         return read_items
 *     array_reader.__reduce__ = lambda: (make_array_reader, (schema,))
 *     return array_reader             # <<<<<<<<<<<<<<
 * 
 * def make_map_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_array_reader);
  __pyx_r = __pyx_v_array_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":122
 *     return enum_reader
 * 
 * def make_array_reader(schema):             # <<<<<<<<<<<<<<
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_array_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_array_reader);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":139
 *     return array_reader
 * 
 * def make_map_reader(schema):             # <<<<<<<<<<<<<<
 *     value_reader = get_reader(schema['values'])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_13make_map_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_13make_map_reader = {"make_map_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_13make_map_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_13make_map_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_map_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_12make_map_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":142
 *     value_reader = get_reader(schema['values'])
 * 
 *     def map_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count = read_long(fo)
 *         cdef dict read_items = {}
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_reader_1map_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_map_reader_1map_reader = {"map_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_map_reader_1map_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_reader_1map_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_15make_map_reader_map_reader(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_15make_map_reader_map_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *__pyx_outer_scope;
  long __pyx_v_block_count;
  PyObject *__pyx_v_read_items = 0;
  CYTHON_UNUSED PY_LONG_LONG __pyx_v_block_size;
  CYTHON_UNUSED long __pyx_v__;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("map_reader", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":143
 * 
 *     def map_reader(fo):
 *         cdef long block_count = read_long(fo)             # <<<<<<<<<<<<<<
 *         cdef dict read_items = {}
 *         while block_count != 0:
 */
  __pyx_v_block_count = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);

  /* "spavro/fast_binary.pyx":144
 *     def map_reader(fo):
 *         cdef long block_count = read_long(fo)
 *         cdef dict read_items = {}             # <<<<<<<<<<<<<<
 *         while block_count != 0:
 *             if block_count < 0:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_read_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":145
 *         cdef long block_count = read_long(fo)
 *         cdef dict read_items = {}
 *         while block_count != 0:             # <<<<<<<<<<<<<<
 *             if block_count < 0:
 *                 block_count = -block_count
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_block_count != 0) != 0);
    if (!__pyx_t_2) break;

    /* "spavro/fast_binary.pyx":146
 *         cdef dict read_items = {}
 *         while block_count != 0:
 *             if block_count < 0:             # <<<<<<<<<<<<<<
 *                 block_count = -block_count
 *                 block_size = read_long(fo)
 */
    __pyx_t_2 = ((__pyx_v_block_count < 0) != 0);
    if (__pyx_t_2) {

      /* "spavro/fast_binary.pyx":147
 *         while block_count != 0:
 *             if block_count < 0:
 *                 block_count = -block_count             # <<<<<<<<<<<<<<
 *                 block_size = read_long(fo)
 *             for _ in range(block_count):
 */
      __pyx_v_block_count = (-__pyx_v_block_count);

      /* "spavro/fast_binary.pyx":148
 *             if block_count < 0:
 *                 block_count = -block_count
 *                 block_size = read_long(fo)             # <<<<<<<<<<<<<<
 *             for _ in range(block_count):
 *                 key = read_utf8(fo)
 */
      __pyx_v_block_size = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);

      /* "spavro/fast_binary.pyx":146
 *         cdef dict read_items = {}
 *         while block_count != 0:
 *             if block_count < 0:             # <<<<<<<<<<<<<<
 *                 block_count = -block_count
 *                 block_size = read_long(fo)
 */
    }

    /* "spavro/fast_binary.pyx":149
 *                 block_count = -block_count
 *                 block_size = read_long(fo)
 *             for _ in range(block_count):             # <<<<<<<<<<<<<<
 *                 key = read_utf8(fo)
 *                 read_items[key] = value_reader(fo)
 */
    __pyx_t_3 = __pyx_v_block_count;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v__ = __pyx_t_4;

      /* "spavro/fast_binary.pyx":150
 *                 block_size = read_long(fo)
 *             for _ in range(block_count):
 *                 key = read_utf8(fo)             # <<<<<<<<<<<<<<
 *                 read_items[key] = value_reader(fo)
 *             block_count = read_long(fo)
 */
      __pyx_t_1 = __pyx_f_6spavro_11fast_binary_read_utf8(__pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "spavro/fast_binary.pyx":151
 *             for _ in range(block_count):
 *                 key = read_utf8(fo)
 *                 read_items[key] = value_reader(fo)             # <<<<<<<<<<<<<<
 *             block_count = read_long(fo)
 *         return read_items
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_value_reader)) { __Pyx_RaiseClosureNameError("value_reader"); __PYX_ERR(0, 151, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_reader);
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_value_reader; __pyx_t_6 = NULL;
      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);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fo};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fo};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_fo);
          __Pyx_GIVEREF(__pyx_v_fo);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_fo);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_read_items, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "spavro/fast_binary.pyx":152
 *                 key = read_utf8(fo)
 *                 read_items[key] = value_reader(fo)
 *             block_count = read_long(fo)             # <<<<<<<<<<<<<<
 *         return read_items
 *     map_reader.__reduce__ = lambda: (make_map_reader, (schema,))
 */
    __pyx_v_block_count = __pyx_f_6spavro_11fast_binary_read_long(__pyx_v_fo);
  }

  /* "spavro/fast_binary.pyx":153
 *                 read_items[key] = value_reader(fo)
 *             block_count = read_long(fo)
 *         return read_items             # <<<<<<<<<<<<<<
 *     map_reader.__reduce__ = lambda: (make_map_reader, (schema,))
 *     return map_reader
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_read_items);
  __pyx_r = __pyx_v_read_items;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":142
 *     value_reader = get_reader(schema['values'])
 * 
 *     def map_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count = read_long(fo)
 *         cdef dict read_items = {}
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("spavro.fast_binary.make_map_reader.map_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_read_items);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":154
 *             block_count = read_long(fo)
 *         return read_items
 *     map_reader.__reduce__ = lambda: (make_map_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return map_reader
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_reader_2lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_map_reader_2lambda4 = {"lambda4", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_map_reader_2lambda4, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_reader_2lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda4", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_map_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 154, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":139
 *     return array_reader
 * 
 * def make_map_reader(schema):             # <<<<<<<<<<<<<<
 *     value_reader = get_reader(schema['values'])
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_12make_map_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *__pyx_cur_scope;
  PyObject *__pyx_v_map_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_map_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 139, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":140
 * 
 * def make_map_reader(schema):
 *     value_reader = get_reader(schema['values'])             # <<<<<<<<<<<<<<
 * 
 *     def map_reader(fo):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_value_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":142
 *     value_reader = get_reader(schema['values'])
 * 
 *     def map_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count = read_long(fo)
 *         cdef dict read_items = {}
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_map_reader_1map_reader, 0, __pyx_n_s_make_map_reader_locals_map_reade, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_map_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":154
 *             block_count = read_long(fo)
 *         return read_items
 *     map_reader.__reduce__ = lambda: (make_map_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return map_reader
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_map_reader_2lambda4, 0, __pyx_n_s_make_map_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_map_reader, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":155
 *         return read_items
 *     map_reader.__reduce__ = lambda: (make_map_reader, (schema,))
 *     return map_reader             # <<<<<<<<<<<<<<
 * 
 * def make_fixed_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_map_reader);
  __pyx_r = __pyx_v_map_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":139
 *     return array_reader
 * 
 * def make_map_reader(schema):             # <<<<<<<<<<<<<<
 *     value_reader = get_reader(schema['values'])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_map_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_map_reader);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":157
 *     return map_reader
 * 
 * def make_fixed_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef long size = schema['size']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_fixed_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_fixed_reader = {"make_fixed_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_fixed_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_fixed_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_fixed_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_14make_fixed_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":160
 *     cdef long size = schema['size']
 * 
 *     def fixed_reader(fo):             # <<<<<<<<<<<<<<
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_fixed_reader_1fixed_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_fixed_reader_1fixed_reader = {"fixed_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_fixed_reader_1fixed_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_fixed_reader_1fixed_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fixed_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_fixed_reader_fixed_reader(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_fixed_reader_fixed_reader(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("fixed_reader", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":161
 * 
 *     def fixed_reader(fo):
 *         return fo.read(size)             # <<<<<<<<<<<<<<
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))
 *     return fixed_reader
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fo, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_cur_scope->__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":160
 *     cdef long size = schema['size']
 * 
 *     def fixed_reader(fo):             # <<<<<<<<<<<<<<
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_reader.fixed_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":162
 *     def fixed_reader(fo):
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return fixed_reader
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_fixed_reader_2lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_fixed_reader_2lambda5 = {"lambda5", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_fixed_reader_2lambda5, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_fixed_reader_2lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda5", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_fixed_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 162, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":157
 *     return map_reader
 * 
 * def make_fixed_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef long size = schema['size']
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_14make_fixed_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *__pyx_cur_scope;
  PyObject *__pyx_v_fixed_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  __Pyx_RefNannySetupContext("make_fixed_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 157, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":158
 * 
 * def make_fixed_reader(schema):
 *     cdef long size = schema['size']             # <<<<<<<<<<<<<<
 * 
 *     def fixed_reader(fo):
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_cur_scope->__pyx_v_size = __pyx_t_2;

  /* "spavro/fast_binary.pyx":160
 *     cdef long size = schema['size']
 * 
 *     def fixed_reader(fo):             # <<<<<<<<<<<<<<
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_fixed_reader_1fixed_reader, 0, __pyx_n_s_make_fixed_reader_locals_fixed_r, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fixed_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":162
 *     def fixed_reader(fo):
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return fixed_reader
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_fixed_reader_2lambda5, 0, __pyx_n_s_make_fixed_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_fixed_reader, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":163
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))
 *     return fixed_reader             # <<<<<<<<<<<<<<
 * 
 * def make_null_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fixed_reader);
  __pyx_r = __pyx_v_fixed_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":157
 *     return map_reader
 * 
 * def make_fixed_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef long size = schema['size']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fixed_reader);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":165
 *     return fixed_reader
 * 
 * def make_null_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_null
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_null_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_null_reader = {"make_null_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_null_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_null_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_null_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_null_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_null_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_null_reader", 0);

  /* "spavro/fast_binary.pyx":166
 * 
 * def make_null_reader(schema):
 *     return read_null             # <<<<<<<<<<<<<<
 * 
 * def make_string_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_object____object___to_py(__pyx_f_6spavro_11fast_binary_read_null); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":165
 *     return fixed_reader
 * 
 * def make_null_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_null
 * 
 */

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

/* "spavro/fast_binary.pyx":168
 *     return read_null
 * 
 * def make_string_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_utf8
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_string_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_19make_string_reader = {"make_string_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_19make_string_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_string_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_string_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_18make_string_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_18make_string_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_string_reader", 0);

  /* "spavro/fast_binary.pyx":169
 * 
 * def make_string_reader(schema):
 *     return read_utf8             # <<<<<<<<<<<<<<
 * 
 * def make_boolean_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_unicode____object___to_py(__pyx_f_6spavro_11fast_binary_read_utf8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":168
 *     return read_null
 * 
 * def make_string_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_utf8
 * 
 */

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

/* "spavro/fast_binary.pyx":171
 *     return read_utf8
 * 
 * def make_boolean_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_boolean
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_21make_boolean_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_21make_boolean_reader = {"make_boolean_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_21make_boolean_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_21make_boolean_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_boolean_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_20make_boolean_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_20make_boolean_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_boolean_reader", 0);

  /* "spavro/fast_binary.pyx":172
 * 
 * def make_boolean_reader(schema):
 *     return read_boolean             # <<<<<<<<<<<<<<
 * 
 * def make_double_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_read_boolean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":171
 *     return read_utf8
 * 
 * def make_boolean_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_boolean
 * 
 */

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

/* "spavro/fast_binary.pyx":174
 *     return read_boolean
 * 
 * def make_double_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_double
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_23make_double_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_23make_double_reader = {"make_double_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_23make_double_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_23make_double_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_double_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_22make_double_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_22make_double_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_double_reader", 0);

  /* "spavro/fast_binary.pyx":175
 * 
 * def make_double_reader(schema):
 *     return read_double             # <<<<<<<<<<<<<<
 * 
 * def make_long_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_double____object___to_py(__pyx_f_6spavro_11fast_binary_read_double); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":174
 *     return read_boolean
 * 
 * def make_double_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_double
 * 
 */

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

/* "spavro/fast_binary.pyx":177
 *     return read_double
 * 
 * def make_long_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_long
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_25make_long_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_25make_long_reader = {"make_long_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_25make_long_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_25make_long_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_long_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_24make_long_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_24make_long_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_long_reader", 0);

  /* "spavro/fast_binary.pyx":178
 * 
 * def make_long_reader(schema):
 *     return read_long             # <<<<<<<<<<<<<<
 * 
 * def make_byte_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_long__long____object___to_py(__pyx_f_6spavro_11fast_binary_read_long); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":177
 *     return read_double
 * 
 * def make_long_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_long
 * 
 */

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

/* "spavro/fast_binary.pyx":180
 *     return read_long
 * 
 * def make_byte_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_bytes
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_27make_byte_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_27make_byte_reader = {"make_byte_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_27make_byte_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_27make_byte_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_byte_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_26make_byte_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_26make_byte_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_byte_reader", 0);

  /* "spavro/fast_binary.pyx":181
 * 
 * def make_byte_reader(schema):
 *     return read_bytes             # <<<<<<<<<<<<<<
 * 
 * def make_float_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_bytes____object___to_py(__pyx_f_6spavro_11fast_binary_read_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":180
 *     return read_long
 * 
 * def make_byte_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_bytes
 * 
 */

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

/* "spavro/fast_binary.pyx":183
 *     return read_bytes
 * 
 * def make_float_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_float
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_29make_float_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_29make_float_reader = {"make_float_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_29make_float_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_29make_float_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_float_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_28make_float_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_28make_float_reader(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_float_reader", 0);

  /* "spavro/fast_binary.pyx":184
 * 
 * def make_float_reader(schema):
 *     return read_float             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_float____object___to_py(__pyx_f_6spavro_11fast_binary_read_float); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":183
 *     return read_bytes
 * 
 * def make_float_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_float
 * 
 */

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

/* "spavro/fast_binary.pyx":187
 * 
 * 
 * def make_skip_reader(schema):             # <<<<<<<<<<<<<<
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_31make_skip_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_31make_skip_reader = {"make_skip_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_31make_skip_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_31make_skip_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_skip_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_30make_skip_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":191
 *     # in the avro stream properly
 *     value_reader = get_reader(schema['value'])
 *     def read_skip(fo):             # <<<<<<<<<<<<<<
 *         value_reader(fo)
 *         return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_skip_reader_1read_skip(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_skip_reader_1read_skip = {"read_skip", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_skip_reader_1read_skip, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_skip_reader_1read_skip(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_skip (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_skip_reader_read_skip(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_skip_reader_read_skip(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *__pyx_outer_scope;
  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;
  __Pyx_RefNannySetupContext("read_skip", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":192
 *     value_reader = get_reader(schema['value'])
 *     def read_skip(fo):
 *         value_reader(fo)             # <<<<<<<<<<<<<<
 *         return None
 *     read_skip.__reduce__ = lambda: (make_skip_reader, (schema,))
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_value_reader)) { __Pyx_RaiseClosureNameError("value_reader"); __PYX_ERR(0, 192, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_reader);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_value_reader; __pyx_t_3 = NULL;
  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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_fo};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_fo};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_fo);
      __Pyx_GIVEREF(__pyx_v_fo);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_fo);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":193
 *     def read_skip(fo):
 *         value_reader(fo)
 *         return None             # <<<<<<<<<<<<<<
 *     read_skip.__reduce__ = lambda: (make_skip_reader, (schema,))
 *     return read_skip
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":191
 *     # in the avro stream properly
 *     value_reader = get_reader(schema['value'])
 *     def read_skip(fo):             # <<<<<<<<<<<<<<
 *         value_reader(fo)
 *         return None
 */

  /* 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("spavro.fast_binary.make_skip_reader.read_skip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":194
 *         value_reader(fo)
 *         return None
 *     read_skip.__reduce__ = lambda: (make_skip_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return read_skip
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_skip_reader_2lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_skip_reader_2lambda6 = {"lambda6", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_skip_reader_2lambda6, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_skip_reader_2lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda6(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda6", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_skip_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 194, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":187
 * 
 * 
 * def make_skip_reader(schema):             # <<<<<<<<<<<<<<
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_30make_skip_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *__pyx_cur_scope;
  PyObject *__pyx_v_read_skip = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_skip_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 187, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":190
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 *     value_reader = get_reader(schema['value'])             # <<<<<<<<<<<<<<
 *     def read_skip(fo):
 *         value_reader(fo)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_value_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":191
 *     # in the avro stream properly
 *     value_reader = get_reader(schema['value'])
 *     def read_skip(fo):             # <<<<<<<<<<<<<<
 *         value_reader(fo)
 *         return None
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_skip_reader_1read_skip, 0, __pyx_n_s_make_skip_reader_locals_read_ski, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_read_skip = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":194
 *         value_reader(fo)
 *         return None
 *     read_skip.__reduce__ = lambda: (make_skip_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return read_skip
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_skip_reader_2lambda6, 0, __pyx_n_s_make_skip_reader_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_read_skip, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":195
 *         return None
 *     read_skip.__reduce__ = lambda: (make_skip_reader, (schema,))
 *     return read_skip             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_read_skip);
  __pyx_r = __pyx_v_read_skip;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":187
 * 
 * 
 * def make_skip_reader(schema):             # <<<<<<<<<<<<<<
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_skip_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_read_skip);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":198
 * 
 * 
 * def make_default_reader(schema):             # <<<<<<<<<<<<<<
 *     value = schema["value"]
 *     def read_default(fo):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_33make_default_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_33make_default_reader = {"make_default_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_33make_default_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_33make_default_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_default_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_32make_default_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":200
 * def make_default_reader(schema):
 *     value = schema["value"]
 *     def read_default(fo):             # <<<<<<<<<<<<<<
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_default_reader_1read_default(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_19make_default_reader_1read_default = {"read_default", (PyCFunction)__pyx_pw_6spavro_11fast_binary_19make_default_reader_1read_default, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_default_reader_1read_default(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_default (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_19make_default_reader_read_default(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_19make_default_reader_read_default(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fo) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_default", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":201
 *     value = schema["value"]
 *     def read_default(fo):
 *         return value             # <<<<<<<<<<<<<<
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))
 *     return read_default
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 201, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
  __pyx_r = __pyx_cur_scope->__pyx_v_value;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":200
 * def make_default_reader(schema):
 *     value = schema["value"]
 *     def read_default(fo):             # <<<<<<<<<<<<<<
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_default_reader.read_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":202
 *     def read_default(fo):
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return read_default
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_default_reader_2lambda7(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_19make_default_reader_2lambda7 = {"lambda7", (PyCFunction)__pyx_pw_6spavro_11fast_binary_19make_default_reader_2lambda7, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_default_reader_2lambda7(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda7 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda7(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda7(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda7", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_default_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 202, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":198
 * 
 * 
 * def make_default_reader(schema):             # <<<<<<<<<<<<<<
 *     value = schema["value"]
 *     def read_default(fo):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_32make_default_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *__pyx_cur_scope;
  PyObject *__pyx_v_read_default = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_default_reader", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 198, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":199
 * 
 * def make_default_reader(schema):
 *     value = schema["value"]             # <<<<<<<<<<<<<<
 *     def read_default(fo):
 *         return value
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":200
 * def make_default_reader(schema):
 *     value = schema["value"]
 *     def read_default(fo):             # <<<<<<<<<<<<<<
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_19make_default_reader_1read_default, 0, __pyx_n_s_make_default_reader_locals_read, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_read_default = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":202
 *     def read_default(fo):
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))             # <<<<<<<<<<<<<<
 *     return read_default
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_19make_default_reader_2lambda7, 0, __pyx_n_s_make_default_reader_locals_lambd, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_read_default, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":203
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))
 *     return read_default             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_read_default);
  __pyx_r = __pyx_v_read_default;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":198
 * 
 * 
 * def make_default_reader(schema):             # <<<<<<<<<<<<<<
 *     value = schema["value"]
 *     def read_default(fo):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_default_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_read_default);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":228
 * 
 * class ReaderPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.reader = None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17ReaderPlaceholder_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17ReaderPlaceholder_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17ReaderPlaceholder_1__init__, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17ReaderPlaceholder_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17ReaderPlaceholder___init__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17ReaderPlaceholder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "spavro/fast_binary.pyx":229
 * class ReaderPlaceholder(object):
 *     def __init__(self):
 *         self.reader = None             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, fo):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reader, Py_None) < 0) __PYX_ERR(0, 229, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":228
 * 
 * class ReaderPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.reader = None
 * 
 */

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

/* "spavro/fast_binary.pyx":231
 *         self.reader = None
 * 
 *     def __call__(self, fo):             # <<<<<<<<<<<<<<
 *         return self.reader(fo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17ReaderPlaceholder_3__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17ReaderPlaceholder_3__call__ = {"__call__", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17ReaderPlaceholder_3__call__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17ReaderPlaceholder_3__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fo = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fo,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); __PYX_ERR(0, 231, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 231, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_fo = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 231, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.ReaderPlaceholder.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17ReaderPlaceholder_2__call__(__pyx_self, __pyx_v_self, __pyx_v_fo);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17ReaderPlaceholder_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fo) {
  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;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "spavro/fast_binary.pyx":232
 * 
 *     def __call__(self, fo):
 *         return self.reader(fo)             # <<<<<<<<<<<<<<
 * 
 * def get_reader(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_fo};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_fo};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_fo);
      __Pyx_GIVEREF(__pyx_v_fo);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_fo);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":231
 *         self.reader = None
 * 
 *     def __call__(self, fo):             # <<<<<<<<<<<<<<
 *         return self.reader(fo)
 * 
 */

  /* 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("spavro.fast_binary.ReaderPlaceholder.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":234
 *         return self.reader(fo)
 * 
 * def get_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_35get_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_35get_reader = {"get_reader", (PyCFunction)__pyx_pw_6spavro_11fast_binary_35get_reader, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_35get_reader(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_34get_reader(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_34get_reader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_schema_type = 0;
  PyObject *__pyx_v_placeholder = NULL;
  PyObject *__pyx_v_namespace = NULL;
  PyObject *__pyx_v_record_name = NULL;
  PyObject *__pyx_v_namspace_record_name = NULL;
  PyObject *__pyx_v_reader = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("get_reader", 0);

  /* "spavro/fast_binary.pyx":235
 * 
 * def get_reader(schema):
 *     cdef unicode schema_type = get_type(schema)             # <<<<<<<<<<<<<<
 *     if schema_type in ('record', 'fixed', 'enum'):
 *         placeholder = ReaderPlaceholder()
 */
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_v_schema, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_schema_type = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":236
 * def get_reader(schema):
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):             # <<<<<<<<<<<<<<
 *         placeholder = ReaderPlaceholder()
 *         # using a placeholder because this is recursive and the reader isn't defined
 */
  __Pyx_INCREF(__pyx_v_schema_type);
  __pyx_t_2 = __pyx_v_schema_type;
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_s_record, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_s_fixed, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_s_enum, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_3 != 0);
  if (__pyx_t_5) {

    /* "spavro/fast_binary.pyx":237
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 *         placeholder = ReaderPlaceholder()             # <<<<<<<<<<<<<<
 *         # using a placeholder because this is recursive and the reader isn't defined
 *         # yet and nested records might refer to this parent schema name
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReaderPlaceholder); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    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);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_placeholder = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":240
 *         # using a placeholder because this is recursive and the reader isn't defined
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')             # <<<<<<<<<<<<<<
 *         record_name = schema.get('name')
 *         if namespace:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_namespace = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":241
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')
 *         record_name = schema.get('name')             # <<<<<<<<<<<<<<
 *         if namespace:
 *            namspace_record_name = '.'.join([namespace, record_name])
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_record_name = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":242
 *         namespace = schema.get('namespace')
 *         record_name = schema.get('name')
 *         if namespace:             # <<<<<<<<<<<<<<
 *            namspace_record_name = '.'.join([namespace, record_name])
 *         else:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_namespace); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 242, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "spavro/fast_binary.pyx":243
 *         record_name = schema.get('name')
 *         if namespace:
 *            namspace_record_name = '.'.join([namespace, record_name])             # <<<<<<<<<<<<<<
 *         else:
 *             namspace_record_name = record_name
 */
      __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_namespace);
      __Pyx_GIVEREF(__pyx_v_namespace);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_namespace);
      __Pyx_INCREF(__pyx_v_record_name);
      __Pyx_GIVEREF(__pyx_v_record_name);
      PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_record_name);
      __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_namspace_record_name = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "spavro/fast_binary.pyx":242
 *         namespace = schema.get('namespace')
 *         record_name = schema.get('name')
 *         if namespace:             # <<<<<<<<<<<<<<
 *            namspace_record_name = '.'.join([namespace, record_name])
 *         else:
 */
      goto __pyx_L7;
    }

    /* "spavro/fast_binary.pyx":245
 *            namspace_record_name = '.'.join([namespace, record_name])
 *         else:
 *             namspace_record_name = record_name             # <<<<<<<<<<<<<<
 *         schema_cache[namspace_record_name] = placeholder
 *         reader = reader_type_map[schema_type](schema)
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_record_name);
      __pyx_v_namspace_record_name = __pyx_v_record_name;
    }
    __pyx_L7:;

    /* "spavro/fast_binary.pyx":246
 *         else:
 *             namspace_record_name = record_name
 *         schema_cache[namspace_record_name] = placeholder             # <<<<<<<<<<<<<<
 *         reader = reader_type_map[schema_type](schema)
 *         # now that we've returned, assign the reader to the placeholder
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_schema_cache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_namspace_record_name, __pyx_v_placeholder) < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":247
 *             namspace_record_name = record_name
 *         schema_cache[namspace_record_name] = placeholder
 *         reader = reader_type_map[schema_type](schema)             # <<<<<<<<<<<<<<
 *         # now that we've returned, assign the reader to the placeholder
 *         # so that the execution will work
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_reader_type_map); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_schema_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_schema};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_schema};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_schema);
        __Pyx_GIVEREF(__pyx_v_schema);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_schema);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_reader = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":250
 *         # now that we've returned, assign the reader to the placeholder
 *         # so that the execution will work
 *         placeholder.reader = reader             # <<<<<<<<<<<<<<
 *         return reader
 *     try:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_placeholder, __pyx_n_s_reader, __pyx_v_reader) < 0) __PYX_ERR(0, 250, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":251
 *         # so that the execution will work
 *         placeholder.reader = reader
 *         return reader             # <<<<<<<<<<<<<<
 *     try:
 *         reader = reader_type_map[schema_type](schema)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_reader);
    __pyx_r = __pyx_v_reader;
    goto __pyx_L0;

    /* "spavro/fast_binary.pyx":236
 * def get_reader(schema):
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):             # <<<<<<<<<<<<<<
 *         placeholder = ReaderPlaceholder()
 *         # using a placeholder because this is recursive and the reader isn't defined
 */
  }

  /* "spavro/fast_binary.pyx":252
 *         placeholder.reader = reader
 *         return reader
 *     try:             # <<<<<<<<<<<<<<
 *         reader = reader_type_map[schema_type](schema)
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "spavro/fast_binary.pyx":253
 *         return reader
 *     try:
 *         reader = reader_type_map[schema_type](schema)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         reader = schema_cache[schema_type]
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_reader_type_map); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_schema_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L8_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L8_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_v_schema);
          __Pyx_GIVEREF(__pyx_v_schema);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_schema);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_reader = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "spavro/fast_binary.pyx":252
 *         placeholder.reader = reader
 *         return reader
 *     try:             # <<<<<<<<<<<<<<
 *         reader = reader_type_map[schema_type](schema)
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "spavro/fast_binary.pyx":254
 *     try:
 *         reader = reader_type_map[schema_type](schema)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         reader = schema_cache[schema_type]
 * 
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("spavro.fast_binary.get_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(0, 254, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_1);

      /* "spavro/fast_binary.pyx":255
 *         reader = reader_type_map[schema_type](schema)
 *     except KeyError:
 *         reader = schema_cache[schema_type]             # <<<<<<<<<<<<<<
 * 
 *     return reader
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_schema_cache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_13 = PyObject_GetItem(__pyx_t_7, __pyx_v_schema_type); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 255, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_reader, __pyx_t_13);
      __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L9_exception_handled;
    }
    goto __pyx_L10_except_error;
    __pyx_L10_except_error:;

    /* "spavro/fast_binary.pyx":252
 *         placeholder.reader = reader
 *         return reader
 *     try:             # <<<<<<<<<<<<<<
 *         reader = reader_type_map[schema_type](schema)
 *     except KeyError:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    __pyx_L15_try_end:;
  }

  /* "spavro/fast_binary.pyx":257
 *         reader = schema_cache[schema_type]
 * 
 *     return reader             # <<<<<<<<<<<<<<
 * 
 * # ======================================================================
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_reader);
  __pyx_r = __pyx_v_reader;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":234
 *         return self.reader(fo)
 * 
 * def get_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("spavro.fast_binary.get_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_schema_type);
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XDECREF(__pyx_v_namespace);
  __Pyx_XDECREF(__pyx_v_record_name);
  __Pyx_XDECREF(__pyx_v_namspace_record_name);
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":262
 * 
 * 
 * cdef void write_int(outbuf, long long signed_datum):             # <<<<<<<<<<<<<<
 *     """int and long values are written using variable-length, zig-zag coding.
 *     """
 */

static void __pyx_f_6spavro_11fast_binary_write_int(PyObject *__pyx_v_outbuf, PY_LONG_LONG __pyx_v_signed_datum) {
  unsigned PY_LONG_LONG __pyx_v_datum;
  char __pyx_v_temp_datum;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("write_int", 0);

  /* "spavro/fast_binary.pyx":268
 *         unsigned long long datum
 *         char temp_datum
 *     datum = (signed_datum << 1) ^ (signed_datum >> 63)             # <<<<<<<<<<<<<<
 *     while datum > 127:
 *         temp_datum = (datum & 0x7f) | 0x80
 */
  __pyx_v_datum = ((__pyx_v_signed_datum << 1) ^ (__pyx_v_signed_datum >> 63));

  /* "spavro/fast_binary.pyx":269
 *         char temp_datum
 *     datum = (signed_datum << 1) ^ (signed_datum >> 63)
 *     while datum > 127:             # <<<<<<<<<<<<<<
 *         temp_datum = (datum & 0x7f) | 0x80
 *         outbuf.write((<char *>&temp_datum)[:sizeof(char)])
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_datum > 0x7F) != 0);
    if (!__pyx_t_1) break;

    /* "spavro/fast_binary.pyx":270
 *     datum = (signed_datum << 1) ^ (signed_datum >> 63)
 *     while datum > 127:
 *         temp_datum = (datum & 0x7f) | 0x80             # <<<<<<<<<<<<<<
 *         outbuf.write((<char *>&temp_datum)[:sizeof(char)])
 *         datum >>= 7
 */
    __pyx_v_temp_datum = ((__pyx_v_datum & 0x7f) | 0x80);

    /* "spavro/fast_binary.pyx":271
 *     while datum > 127:
 *         temp_datum = (datum & 0x7f) | 0x80
 *         outbuf.write((<char *>&temp_datum)[:sizeof(char)])             # <<<<<<<<<<<<<<
 *         datum >>= 7
 *     outbuf.write((<char *>&datum)[:sizeof(char)])
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((char *)(&__pyx_v_temp_datum)) + 0, (sizeof(char)) - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 271, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "spavro/fast_binary.pyx":272
 *         temp_datum = (datum & 0x7f) | 0x80
 *         outbuf.write((<char *>&temp_datum)[:sizeof(char)])
 *         datum >>= 7             # <<<<<<<<<<<<<<
 *     outbuf.write((<char *>&datum)[:sizeof(char)])
 * 
 */
    __pyx_v_datum = (__pyx_v_datum >> 7);
  }

  /* "spavro/fast_binary.pyx":273
 *         outbuf.write((<char *>&temp_datum)[:sizeof(char)])
 *         datum >>= 7
 *     outbuf.write((<char *>&datum)[:sizeof(char)])             # <<<<<<<<<<<<<<
 * 
 * write_long = write_int
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyBytes_FromStringAndSize(((char *)(&__pyx_v_datum)) + 0, (sizeof(char)) - 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":262
 * 
 * 
 * cdef void write_int(outbuf, long long signed_datum):             # <<<<<<<<<<<<<<
 *     """int and long values are written using variable-length, zig-zag coding.
 *     """
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("spavro.fast_binary.write_int", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "spavro/fast_binary.pyx":278
 * 
 * 
 * cdef void write_bytes(outbuf, datum):             # <<<<<<<<<<<<<<
 *     """
 *     Bytes are encoded as a long followed by that many bytes of data.
 */

static void __pyx_f_6spavro_11fast_binary_write_bytes(PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  long __pyx_v_byte_count;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("write_bytes", 0);

  /* "spavro/fast_binary.pyx":282
 *     Bytes are encoded as a long followed by that many bytes of data.
 *     """
 *     cdef long byte_count = len(datum)             # <<<<<<<<<<<<<<
 *     write_long(outbuf, byte_count)
 *     outbuf.write(datum)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_datum); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __pyx_v_byte_count = __pyx_t_1;

  /* "spavro/fast_binary.pyx":283
 *     """
 *     cdef long byte_count = len(datum)
 *     write_long(outbuf, byte_count)             # <<<<<<<<<<<<<<
 *     outbuf.write(datum)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_byte_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __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_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outbuf, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outbuf, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":284
 *     cdef long byte_count = len(datum)
 *     write_long(outbuf, byte_count)
 *     outbuf.write(datum)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_datum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_datum};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_datum};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_datum);
      __Pyx_GIVEREF(__pyx_v_datum);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_datum);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __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;

  /* "spavro/fast_binary.pyx":278
 * 
 * 
 * cdef void write_bytes(outbuf, datum):             # <<<<<<<<<<<<<<
 *     """
 *     Bytes are encoded as a long followed by that many bytes of data.
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("spavro.fast_binary.write_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "spavro/fast_binary.pyx":288
 * 
 * # except *
 * cdef void write_utf8(outbuf, datum):             # <<<<<<<<<<<<<<
 *     """
 *     Bytes are encoded as a long followed by that many bytes of data.
 */

static void __pyx_f_6spavro_11fast_binary_write_utf8(PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("write_utf8", 0);

  /* "spavro/fast_binary.pyx":292
 *     Bytes are encoded as a long followed by that many bytes of data.
 *     """
 *     write_bytes(outbuf, datum.encode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datum, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_f_6spavro_11fast_binary_write_bytes(__pyx_v_outbuf, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":288
 * 
 * # except *
 * cdef void write_utf8(outbuf, datum):             # <<<<<<<<<<<<<<
 *     """
 *     Bytes are encoded as a long followed by that many bytes of data.
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("spavro.fast_binary.write_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "spavro/fast_binary.pyx":295
 * 
 * 
 * cdef void write_float(outbuf, float datum):             # <<<<<<<<<<<<<<
 *     """
 *     A float is written as 4 bytes.
 */

static void __pyx_f_6spavro_11fast_binary_write_float(PyObject *__pyx_v_outbuf, float __pyx_v_datum) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("write_float", 0);

  /* "spavro/fast_binary.pyx":301
 *     Java's floatToIntBits and then encoded in little-endian format.
 *     """
 *     outbuf.write((<char *>&datum)[:sizeof(float)])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char *)(&__pyx_v_datum)) + 0, (sizeof(float)) - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":295
 * 
 * 
 * cdef void write_float(outbuf, float datum):             # <<<<<<<<<<<<<<
 *     """
 *     A float is written as 4 bytes.
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("spavro.fast_binary.write_float", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "spavro/fast_binary.pyx":304
 * 
 * 
 * cdef void write_double(outbuf, double datum):             # <<<<<<<<<<<<<<
 *     """
 *     A double is written as 8 bytes.
 */

static void __pyx_f_6spavro_11fast_binary_write_double(PyObject *__pyx_v_outbuf, double __pyx_v_datum) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("write_double", 0);

  /* "spavro/fast_binary.pyx":310
 *     Java's doubleToLongBits and then encoded in little-endian format.
 *     """
 *     outbuf.write((<char *>&datum)[:sizeof(double)])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char *)(&__pyx_v_datum)) + 0, (sizeof(double)) - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":304
 * 
 * 
 * cdef void write_double(outbuf, double datum):             # <<<<<<<<<<<<<<
 *     """
 *     A double is written as 8 bytes.
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("spavro.fast_binary.write_double", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "spavro/fast_binary.pyx":313
 * 
 * 
 * cdef void write_null(outbuf, datum):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

static void __pyx_f_6spavro_11fast_binary_write_null(CYTHON_UNUSED PyObject *__pyx_v_outbuf, CYTHON_UNUSED PyObject *__pyx_v_datum) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_null", 0);

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

/* "spavro/fast_binary.pyx":317
 * 
 * 
 * cdef void write_fixed(outbuf, datum):             # <<<<<<<<<<<<<<
 *     """A fixed writer writes out exactly the bytes up to a count"""
 *     outbuf.write(datum)
 */

static void __pyx_f_6spavro_11fast_binary_write_fixed(PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("write_fixed", 0);

  /* "spavro/fast_binary.pyx":319
 * cdef void write_fixed(outbuf, datum):
 *     """A fixed writer writes out exactly the bytes up to a count"""
 *     outbuf.write(datum)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_datum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_datum);
      __Pyx_GIVEREF(__pyx_v_datum);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_datum);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":317
 * 
 * 
 * cdef void write_fixed(outbuf, datum):             # <<<<<<<<<<<<<<
 *     """A fixed writer writes out exactly the bytes up to a count"""
 *     outbuf.write(datum)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("spavro.fast_binary.write_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "spavro/fast_binary.pyx":322
 * 
 * 
 * cdef write_boolean(outbuf, char datum):             # <<<<<<<<<<<<<<
 *     """A boolean is written as a single byte whose value is either 0 (false) or
 *     1 (true)."""
 */

static PyObject *__pyx_f_6spavro_11fast_binary_write_boolean(PyObject *__pyx_v_outbuf, char __pyx_v_datum) {
  char __pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("write_boolean", 0);

  /* "spavro/fast_binary.pyx":325
 *     """A boolean is written as a single byte whose value is either 0 (false) or
 *     1 (true)."""
 *     cdef char x = 1 if datum else 0             # <<<<<<<<<<<<<<
 *     outbuf.write((<char *>&x)[:sizeof(char)])
 * 
 */
  if ((__pyx_v_datum != 0)) {
    __pyx_t_1 = 1;
  } else {
    __pyx_t_1 = 0;
  }
  __pyx_v_x = __pyx_t_1;

  /* "spavro/fast_binary.pyx":326
 *     1 (true)."""
 *     cdef char x = 1 if datum else 0
 *     outbuf.write((<char *>&x)[:sizeof(char)])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_outbuf, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((char *)(&__pyx_v_x)) + 0, (sizeof(char)) - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":322
 * 
 * 
 * cdef write_boolean(outbuf, char datum):             # <<<<<<<<<<<<<<
 *     """A boolean is written as a single byte whose value is either 0 (false) or
 *     1 (true)."""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("spavro.fast_binary.write_boolean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":359
 * CheckField = namedtuple('CheckField', ['name', 'check'])
 * 
 * def get_check(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     return check_type_map[schema_type](schema)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_37get_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_37get_check = {"get_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_37get_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_37get_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_36get_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_36get_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_schema_type = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("get_check", 0);

  /* "spavro/fast_binary.pyx":360
 * 
 * def get_check(schema):
 *     cdef unicode schema_type = get_type(schema)             # <<<<<<<<<<<<<<
 *     return check_type_map[schema_type](schema)
 * 
 */
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_v_schema, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_schema_type = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":361
 * def get_check(schema):
 *     cdef unicode schema_type = get_type(schema)
 *     return check_type_map[schema_type](schema)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_type_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_schema_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_schema};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_schema};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_schema);
      __Pyx_GIVEREF(__pyx_v_schema);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_schema);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":359
 * CheckField = namedtuple('CheckField', ['name', 'check'])
 * 
 * def get_check(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     return check_type_map[schema_type](schema)
 */

  /* 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("spavro.fast_binary.get_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_schema_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":364
 * 
 * 
 * def make_record_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_39make_record_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_39make_record_check = {"make_record_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_39make_record_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_39make_record_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_record_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_38make_record_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":366
 * def make_record_check(schema):
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])
 *     return record_check
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_record_check_1record_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_record_check_1record_check = {"record_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_record_check_1record_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_record_check_1record_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("record_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_record_check_record_check(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_record_check_record_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *__pyx_outer_scope;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("record_check", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":367
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])             # <<<<<<<<<<<<<<
 *     return record_check
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyDict_Check(__pyx_v_datum); 
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_cur_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); __PYX_ERR(0, 367, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_fields == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 367, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 367, __pyx_L1_error)
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_check); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datum, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_all, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":366
 * def make_record_check(schema):
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])
 *     return record_check
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("spavro.fast_binary.make_record_check.record_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":364
 * 
 * 
 * def make_record_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_38make_record_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *__pyx_cur_scope;
  PyObject *__pyx_v_record_check = 0;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __Pyx_RefNannySetupContext("make_record_check", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 364, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":365
 * 
 * def make_record_check(schema):
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]             # <<<<<<<<<<<<<<
 *     def record_check(datum):
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 365, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 365, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CheckField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_GetItem(__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_check); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyObject_GetItem(__pyx_v_field, __pyx_n_s_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_t_8);
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":366
 * def make_record_check(schema):
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])
 *     return record_check
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_record_check_1record_check, 0, __pyx_n_s_make_record_check_locals_record, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_record_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":368
 *     def record_check(datum):
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])
 *     return record_check             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_record_check);
  __pyx_r = __pyx_v_record_check;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":364
 * 
 * 
 * def make_record_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("spavro.fast_binary.make_record_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_record_check);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":371
 * 
 * 
 * def make_enum_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_41make_enum_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_41make_enum_check = {"make_enum_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_41make_enum_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_41make_enum_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_enum_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_40make_enum_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":373
 * def make_enum_check(schema):
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):             # <<<<<<<<<<<<<<
 *         return datum in symbols
 *     return enum_check
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_enum_check_1enum_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_enum_check_1enum_check = {"enum_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_enum_check_1enum_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_enum_check_1enum_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enum_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_15make_enum_check_enum_check(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_15make_enum_check_enum_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("enum_check", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":374
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 *         return datum in symbols             # <<<<<<<<<<<<<<
 *     return enum_check
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_symbols)) { __Pyx_RaiseClosureNameError("symbols"); __PYX_ERR(0, 374, __pyx_L1_error) }
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_datum, __pyx_cur_scope->__pyx_v_symbols, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 374, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":373
 * def make_enum_check(schema):
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):             # <<<<<<<<<<<<<<
 *         return datum in symbols
 *     return enum_check
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_check.enum_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":371
 * 
 * 
 * def make_enum_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_40make_enum_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *__pyx_cur_scope;
  PyObject *__pyx_v_enum_check = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_enum_check", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 371, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":372
 * 
 * def make_enum_check(schema):
 *     cdef list symbols = schema['symbols']             # <<<<<<<<<<<<<<
 *     def enum_check(datum):
 *         return datum in symbols
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_symbols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":373
 * def make_enum_check(schema):
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):             # <<<<<<<<<<<<<<
 *         return datum in symbols
 *     return enum_check
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_enum_check_1enum_check, 0, __pyx_n_s_make_enum_check_locals_enum_chec, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_enum_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":375
 *     def enum_check(datum):
 *         return datum in symbols
 *     return enum_check             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_enum_check);
  __pyx_r = __pyx_v_enum_check;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":371
 * 
 * 
 * def make_enum_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_enum_check);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":378
 * 
 * 
 * def make_null_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: datum is None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_43make_null_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_43make_null_check = {"make_null_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_43make_null_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_43make_null_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_null_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_42make_null_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":379
 * 
 * def make_null_check(schema):
 *     return lambda datum: datum is None             # <<<<<<<<<<<<<<
 * 
 * def check_string(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_null_check_lambda8(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_null_check_lambda8 = {"lambda8", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_null_check_lambda8, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_null_check_lambda8(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda8 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda8(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("lambda8", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_datum == Py_None);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.make_null_check.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":378
 * 
 * 
 * def make_null_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: datum is None
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_42make_null_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_null_check", 0);

  /* "spavro/fast_binary.pyx":379
 * 
 * def make_null_check(schema):
 *     return lambda datum: datum is None             # <<<<<<<<<<<<<<
 * 
 * def check_string(datum):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_null_check_lambda8, 0, __pyx_n_s_make_null_check_locals_lambda, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":378
 * 
 * 
 * def make_null_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: datum is None
 * 
 */

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

/* "spavro/fast_binary.pyx":381
 *     return lambda datum: datum is None
 * 
 * def check_string(datum):             # <<<<<<<<<<<<<<
 *     return isinstance(datum, basestring)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_45check_string(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_45check_string = {"check_string", (PyCFunction)__pyx_pw_6spavro_11fast_binary_45check_string, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_45check_string(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_string (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_44check_string(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_44check_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("check_string", 0);

  /* "spavro/fast_binary.pyx":382
 * 
 * def check_string(datum):
 *     return isinstance(datum, basestring)             # <<<<<<<<<<<<<<
 * 
 * def make_string_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_datum); 
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":381
 *     return lambda datum: datum is None
 * 
 * def check_string(datum):             # <<<<<<<<<<<<<<
 *     return isinstance(datum, basestring)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.check_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":384
 *     return isinstance(datum, basestring)
 * 
 * def make_string_check(schema):             # <<<<<<<<<<<<<<
 *     return check_string
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_47make_string_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_47make_string_check = {"make_string_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_47make_string_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_47make_string_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_string_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_46make_string_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_46make_string_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_string_check", 0);

  /* "spavro/fast_binary.pyx":385
 * 
 * def make_string_check(schema):
 *     return check_string             # <<<<<<<<<<<<<<
 * 
 * def make_long_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":384
 *     return isinstance(datum, basestring)
 * 
 * def make_string_check(schema):             # <<<<<<<<<<<<<<
 *     return check_string
 * 
 */

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

/* "spavro/fast_binary.pyx":387
 *     return check_string
 * 
 * def make_long_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_49make_long_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_49make_long_check = {"make_long_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_49make_long_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_49make_long_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_long_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_48make_long_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":388
 * 
 * def make_long_check(schema):
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)             # <<<<<<<<<<<<<<
 * 
 * def make_boolean_check(schema):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_long_check_lambda9(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_long_check_lambda9 = {"lambda9", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_long_check_lambda9, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_long_check_lambda9(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda9 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda9(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_lambda_funcdef_lambda9(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda9", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyInt_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyLong_Check(__pyx_v_datum); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.make_long_check.lambda9", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":387
 *     return check_string
 * 
 * def make_long_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_48make_long_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_long_check", 0);

  /* "spavro/fast_binary.pyx":388
 * 
 * def make_long_check(schema):
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)             # <<<<<<<<<<<<<<
 * 
 * def make_boolean_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_long_check_lambda9, 0, __pyx_n_s_make_long_check_locals_lambda, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":387
 *     return check_string
 * 
 * def make_long_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 */

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

/* "spavro/fast_binary.pyx":390
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 * def make_boolean_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, bool)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_51make_boolean_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_51make_boolean_check = {"make_boolean_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_51make_boolean_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_51make_boolean_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_boolean_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_50make_boolean_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":391
 * 
 * def make_boolean_check(schema):
 *     return lambda datum: isinstance(datum, bool)             # <<<<<<<<<<<<<<
 * 
 * # def make_boolean_check(schema):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_boolean_check_lambda10(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_18make_boolean_check_lambda10 = {"lambda10", (PyCFunction)__pyx_pw_6spavro_11fast_binary_18make_boolean_check_lambda10, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_boolean_check_lambda10(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda10 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda10(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_lambda_funcdef_lambda10(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("lambda10", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_datum, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_boolean_check.lambda10", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":390
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 * def make_boolean_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, bool)
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_50make_boolean_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_boolean_check", 0);

  /* "spavro/fast_binary.pyx":391
 * 
 * def make_boolean_check(schema):
 *     return lambda datum: isinstance(datum, bool)             # <<<<<<<<<<<<<<
 * 
 * # def make_boolean_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_18make_boolean_check_lambda10, 0, __pyx_n_s_make_boolean_check_locals_lambda, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":390
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 * def make_boolean_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, bool)
 * 
 */

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

/* "spavro/fast_binary.pyx":396
 * #     return lambda datum: isinstance(datum, boolean)
 * 
 * def make_float_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_53make_float_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_53make_float_check = {"make_float_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_53make_float_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_53make_float_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_float_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_52make_float_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":397
 * 
 * def make_float_check(schema):
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)             # <<<<<<<<<<<<<<
 * 
 * def make_double_check(schema):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_float_check_lambda11(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_float_check_lambda11 = {"lambda11", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_float_check_lambda11, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_float_check_lambda11(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda11 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda11(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_lambda_funcdef_lambda11(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda11", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyInt_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyLong_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyFloat_Check(__pyx_v_datum); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.make_float_check.lambda11", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":396
 * #     return lambda datum: isinstance(datum, boolean)
 * 
 * def make_float_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_52make_float_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_float_check", 0);

  /* "spavro/fast_binary.pyx":397
 * 
 * def make_float_check(schema):
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)             # <<<<<<<<<<<<<<
 * 
 * def make_double_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_float_check_lambda11, 0, __pyx_n_s_make_float_check_locals_lambda, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":396
 * #     return lambda datum: isinstance(datum, boolean)
 * 
 * def make_float_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */

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

/* "spavro/fast_binary.pyx":399
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_double_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_55make_double_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_55make_double_check = {"make_double_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_55make_double_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_55make_double_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_double_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_54make_double_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":400
 * 
 * def make_double_check(schema):
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)             # <<<<<<<<<<<<<<
 * 
 * def make_byte_check(schema):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_double_check_lambda12(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_double_check_lambda12 = {"lambda12", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_double_check_lambda12, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_double_check_lambda12(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda12 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda12(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_lambda_funcdef_lambda12(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda12", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyInt_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyLong_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyFloat_Check(__pyx_v_datum); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.make_double_check.lambda12", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":399
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_double_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_54make_double_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_double_check", 0);

  /* "spavro/fast_binary.pyx":400
 * 
 * def make_double_check(schema):
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)             # <<<<<<<<<<<<<<
 * 
 * def make_byte_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_double_check_lambda12, 0, __pyx_n_s_make_double_check_locals_lambda, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":399
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_double_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */

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

/* "spavro/fast_binary.pyx":402
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_byte_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_57make_byte_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_57make_byte_check = {"make_byte_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_57make_byte_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_57make_byte_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_byte_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_56make_byte_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":403
 * 
 * def make_byte_check(schema):
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)             # <<<<<<<<<<<<<<
 * 
 * def make_array_check(schema):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_byte_check_lambda13(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_byte_check_lambda13 = {"lambda13", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_byte_check_lambda13, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_byte_check_lambda13(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda13 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda13(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_lambda_funcdef_lambda13(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda13", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyString_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyBytes_Check(__pyx_v_datum); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.make_byte_check.lambda13", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":402
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_byte_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_56make_byte_check(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_byte_check", 0);

  /* "spavro/fast_binary.pyx":403
 * 
 * def make_byte_check(schema):
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)             # <<<<<<<<<<<<<<
 * 
 * def make_array_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_byte_check_lambda13, 0, __pyx_n_s_make_byte_check_locals_lambda, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":402
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_byte_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 */

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

/* "spavro/fast_binary.pyx":405
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 * def make_array_check(schema):             # <<<<<<<<<<<<<<
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_59make_array_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_59make_array_check = {"make_array_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_59make_array_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_59make_array_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_array_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_58make_array_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":407
 * def make_array_check(schema):
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):             # <<<<<<<<<<<<<<
 *         return all([item_check(item) for item in datum])
 *     return array_check
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_array_check_1array_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_array_check_1array_check = {"array_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_array_check_1array_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_array_check_1array_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_array_check_array_check(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_array_check_array_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *__pyx_outer_scope;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("array_check", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":408
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 *         return all([item_check(item) for item in datum])             # <<<<<<<<<<<<<<
 *     return array_check
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_v_datum)) || PyTuple_CheckExact(__pyx_v_datum)) {
    __pyx_t_2 = __pyx_v_datum; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_datum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 408, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 408, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 408, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
    __pyx_t_5 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_item_check)) { __Pyx_RaiseClosureNameError("item_check"); __PYX_ERR(0, 408, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_item_check);
    __pyx_t_6 = __pyx_cur_scope->__pyx_v_item_check; __pyx_t_7 = NULL;
    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);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_item};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_item};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_item);
        __Pyx_GIVEREF(__pyx_v_item);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_item);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __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_PyObject_Call(__pyx_builtin_all, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __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;

  /* "spavro/fast_binary.pyx":407
 * def make_array_check(schema):
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):             # <<<<<<<<<<<<<<
 *         return all([item_check(item) for item in datum])
 *     return array_check
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_array_check.array_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":405
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 * def make_array_check(schema):             # <<<<<<<<<<<<<<
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_58make_array_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *__pyx_cur_scope;
  PyObject *__pyx_v_array_check = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_array_check", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 405, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":406
 * 
 * def make_array_check(schema):
 *     item_check = get_check(schema['items'])             # <<<<<<<<<<<<<<
 *     def array_check(datum):
 *         return all([item_check(item) for item in datum])
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_item_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":407
 * def make_array_check(schema):
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):             # <<<<<<<<<<<<<<
 *         return all([item_check(item) for item in datum])
 *     return array_check
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_array_check_1array_check, 0, __pyx_n_s_make_array_check_locals_array_ch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_array_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":409
 *     def array_check(datum):
 *         return all([item_check(item) for item in datum])
 *     return array_check             # <<<<<<<<<<<<<<
 * 
 * def make_union_check(union_schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_array_check);
  __pyx_r = __pyx_v_array_check;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":405
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 * def make_array_check(schema):             # <<<<<<<<<<<<<<
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_array_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_array_check);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":411
 *     return array_check
 * 
 * def make_union_check(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_61make_union_check(PyObject *__pyx_self, PyObject *__pyx_v_union_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_61make_union_check = {"make_union_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_61make_union_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_61make_union_check(PyObject *__pyx_self, PyObject *__pyx_v_union_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_union_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_60make_union_check(__pyx_self, ((PyObject *)__pyx_v_union_schema));

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

/* "spavro/fast_binary.pyx":413
 * def make_union_check(union_schema):
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):             # <<<<<<<<<<<<<<
 *         return any([check(datum) for check in union_checks])
 *     return union_check
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_union_check_1union_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_union_check_1union_check = {"union_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_union_check_1union_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_union_check_1union_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("union_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_union_check_union_check(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_union_check_union_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *__pyx_outer_scope;
  PyObject *__pyx_v_check = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("union_check", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":414
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 *         return any([check(datum) for check in union_checks])             # <<<<<<<<<<<<<<
 *     return union_check
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_union_checks)) { __Pyx_RaiseClosureNameError("union_checks"); __PYX_ERR(0, 414, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_union_checks == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 414, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_union_checks; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_v_check);
    __pyx_t_5 = __pyx_v_check; __pyx_t_6 = NULL;
    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);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_datum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_datum};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_datum};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_datum);
        __Pyx_GIVEREF(__pyx_v_datum);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datum);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __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_PyObject_Call(__pyx_builtin_any, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __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;

  /* "spavro/fast_binary.pyx":413
 * def make_union_check(union_schema):
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):             # <<<<<<<<<<<<<<
 *         return any([check(datum) for check in union_checks])
 *     return union_check
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_check.union_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_check);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":411
 *     return array_check
 * 
 * def make_union_check(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_60make_union_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_union_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *__pyx_cur_scope;
  PyObject *__pyx_v_union_check = 0;
  PyObject *__pyx_v_schema = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("make_union_check", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 411, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":412
 * 
 * def make_union_check(union_schema):
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]             # <<<<<<<<<<<<<<
 *     def union_check(datum):
 *         return any([check(datum) for check in union_checks])
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_v_union_schema)) || PyTuple_CheckExact(__pyx_v_union_schema)) {
    __pyx_t_2 = __pyx_v_union_schema; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_union_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 412, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 412, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 412, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_schema, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_check); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    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);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_schema);
        __Pyx_GIVEREF(__pyx_v_schema);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_schema);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_union_checks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":413
 * def make_union_check(union_schema):
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):             # <<<<<<<<<<<<<<
 *         return any([check(datum) for check in union_checks])
 *     return union_check
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_union_check_1union_check, 0, __pyx_n_s_make_union_check_locals_union_ch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_union_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":415
 *     def union_check(datum):
 *         return any([check(datum) for check in union_checks])
 *     return union_check             # <<<<<<<<<<<<<<
 * 
 * def make_fixed_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_union_check);
  __pyx_r = __pyx_v_union_check;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":411
 *     return array_check
 * 
 * def make_union_check(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_union_check);
  __Pyx_XDECREF(__pyx_v_schema);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":417
 *     return union_check
 * 
 * def make_fixed_check(schema):             # <<<<<<<<<<<<<<
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_63make_fixed_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_63make_fixed_check = {"make_fixed_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_63make_fixed_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_63make_fixed_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_fixed_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_62make_fixed_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":419
 * def make_fixed_check(schema):
 *     cdef int size = schema['size']
 *     def fixed_check(datum):             # <<<<<<<<<<<<<<
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size
 *     return fixed_check
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_fixed_check_1fixed_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_fixed_check_1fixed_check = {"fixed_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_fixed_check_1fixed_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_fixed_check_1fixed_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fixed_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_fixed_check_fixed_check(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_fixed_check_fixed_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  __Pyx_RefNannySetupContext("fixed_check", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":420
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size             # <<<<<<<<<<<<<<
 *     return fixed_check
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyString_Check(__pyx_v_datum); 
  if (!__pyx_t_2) {
  } else {
    goto __pyx_L4_next_and;
  }
  __pyx_t_2 = PyBytes_Check(__pyx_v_datum); 
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_L4_next_and:;
  __pyx_t_4 = PyObject_Length(__pyx_v_datum); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 420, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_4 == __pyx_cur_scope->__pyx_v_size);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":419
 * def make_fixed_check(schema):
 *     cdef int size = schema['size']
 *     def fixed_check(datum):             # <<<<<<<<<<<<<<
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size
 *     return fixed_check
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_check.fixed_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":417
 *     return union_check
 * 
 * def make_fixed_check(schema):             # <<<<<<<<<<<<<<
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_62make_fixed_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *__pyx_cur_scope;
  PyObject *__pyx_v_fixed_check = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("make_fixed_check", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 417, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":418
 * 
 * def make_fixed_check(schema):
 *     cdef int size = schema['size']             # <<<<<<<<<<<<<<
 *     def fixed_check(datum):
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_cur_scope->__pyx_v_size = __pyx_t_2;

  /* "spavro/fast_binary.pyx":419
 * def make_fixed_check(schema):
 *     cdef int size = schema['size']
 *     def fixed_check(datum):             # <<<<<<<<<<<<<<
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size
 *     return fixed_check
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_fixed_check_1fixed_check, 0, __pyx_n_s_make_fixed_check_locals_fixed_ch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fixed_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":421
 *     def fixed_check(datum):
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size
 *     return fixed_check             # <<<<<<<<<<<<<<
 * 
 * def make_map_check(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fixed_check);
  __pyx_r = __pyx_v_fixed_check;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":417
 *     return union_check
 * 
 * def make_fixed_check(schema):             # <<<<<<<<<<<<<<
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fixed_check);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":423
 *     return fixed_check
 * 
 * def make_map_check(schema):             # <<<<<<<<<<<<<<
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_65make_map_check(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_65make_map_check = {"make_map_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_65make_map_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_65make_map_check(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_map_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_64make_map_check(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":425
 * def make_map_check(schema):
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])
 *     return map_check
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_14make_map_check_1map_check(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_14make_map_check_1map_check = {"map_check", (PyCFunction)__pyx_pw_6spavro_11fast_binary_14make_map_check_1map_check, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_14make_map_check_1map_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_check (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_14make_map_check_map_check(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_14make_map_check_map_check(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *__pyx_outer_scope;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("map_check", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":426
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])             # <<<<<<<<<<<<<<
 *     return map_check
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyDict_Check(__pyx_v_datum); 
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datum, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 426, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 426, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 426, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 426, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if !CYTHON_COMPILING_IN_PYPY
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 426, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_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, 426, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_key); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_key};
        __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_key};
        __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_key);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 426, __pyx_L1_error)
    if (__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_4 = __pyx_t_9;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L9_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_map_value_check)) { __Pyx_RaiseClosureNameError("map_value_check"); __PYX_ERR(0, 426, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_map_value_check);
    __pyx_t_6 = __pyx_cur_scope->__pyx_v_map_value_check; __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_12) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_value};
        __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_value};
        __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_value);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_4 = __pyx_t_9;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_L9_bool_binop_done:;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_all, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":425
 * def make_map_check(schema):
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])
 *     return map_check
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("spavro.fast_binary.make_map_check.map_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":423
 *     return fixed_check
 * 
 * def make_map_check(schema):             # <<<<<<<<<<<<<<
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_64make_map_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *__pyx_cur_scope;
  PyObject *__pyx_v_map_check = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_map_check", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 423, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":424
 * 
 * def make_map_check(schema):
 *     map_value_check = get_check(schema['values'])             # <<<<<<<<<<<<<<
 *     def map_check(datum):
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_map_value_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":425
 * def make_map_check(schema):
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])
 *     return map_check
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_14make_map_check_1map_check, 0, __pyx_n_s_make_map_check_locals_map_check, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_map_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":427
 *     def map_check(datum):
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])
 *     return map_check             # <<<<<<<<<<<<<<
 * 
 * check_type_map = {
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_map_check);
  __pyx_r = __pyx_v_map_check;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":423
 *     return fixed_check
 * 
 * def make_map_check(schema):             # <<<<<<<<<<<<<<
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_map_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_map_check);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":448
 * # ====================
 * 
 * def make_union_writer(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list type_list = [get_type(schema) for schema in union_schema]
 *     # cdef dict writer_lookup
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_67make_union_writer(PyObject *__pyx_self, PyObject *__pyx_v_union_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_67make_union_writer = {"make_union_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_67make_union_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_67make_union_writer(PyObject *__pyx_self, PyObject *__pyx_v_union_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_union_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_66make_union_writer(__pyx_self, ((PyObject *)__pyx_v_union_schema));

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

/* "spavro/fast_binary.pyx":477
 *         # or a float and a double in a union (which is valid but nonsensical
 *         # in python but valid in avro)
 *         def simple_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             return writer_lookup_dict[type(datum)]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_1simple_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_union_writer_1simple_writer_lookup = {"simple_writer_lookup", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_union_writer_1simple_writer_lookup, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_1simple_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simple_writer_lookup (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_union_writer_simple_writer_lookup(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_writer_simple_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("simple_writer_lookup", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":478
 *         # in python but valid in avro)
 *         def simple_writer_lookup(datum):
 *             return writer_lookup_dict[type(datum)]             # <<<<<<<<<<<<<<
 * 
 *         writer_lookup = simple_writer_lookup
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_writer_lookup_dict)) { __Pyx_RaiseClosureNameError("writer_lookup_dict"); __PYX_ERR(0, 478, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_writer_lookup_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 478, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)Py_TYPE(__pyx_v_datum))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":477
 *         # or a float and a double in a union (which is valid but nonsensical
 *         # in python but valid in avro)
 *         def simple_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             return writer_lookup_dict[type(datum)]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_writer.simple_writer_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":495
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 * 
 *         def complex_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             cdef:
 *                 long idx
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_3complex_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_union_writer_3complex_writer_lookup = {"complex_writer_lookup", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_union_writer_3complex_writer_lookup, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_3complex_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("complex_writer_lookup (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_union_writer_2complex_writer_lookup(__pyx_self, ((PyObject *)__pyx_v_datum));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_writer_2complex_writer_lookup(PyObject *__pyx_self, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_outer_scope;
  long __pyx_v_idx;
  PyObject *__pyx_v_lookup_result = 0;
  PyObject *__pyx_v_get_check = NULL;
  PyObject *__pyx_v_writer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  PyObject *(*__pyx_t_8)(PyObject *);
  long __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("complex_writer_lookup", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":499
 *                 long idx
 *                 list lookup_result
 *             lookup_result = writer_lookup_dict[type(datum)]             # <<<<<<<<<<<<<<
 *             if len(lookup_result) == 1:
 *                 idx, get_check, writer = lookup_result[0]
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_writer_lookup_dict)) { __Pyx_RaiseClosureNameError("writer_lookup_dict"); __PYX_ERR(0, 499, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_writer_lookup_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 499, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)Py_TYPE(__pyx_v_datum))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 499, __pyx_L1_error)
  __pyx_v_lookup_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":500
 *                 list lookup_result
 *             lookup_result = writer_lookup_dict[type(datum)]
 *             if len(lookup_result) == 1:             # <<<<<<<<<<<<<<
 *                 idx, get_check, writer = lookup_result[0]
 *             else:
 */
  if (unlikely(__pyx_v_lookup_result == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 500, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_v_lookup_result); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 == 1) != 0);
  if (__pyx_t_3) {

    /* "spavro/fast_binary.pyx":501
 *             lookup_result = writer_lookup_dict[type(datum)]
 *             if len(lookup_result) == 1:
 *                 idx, get_check, writer = lookup_result[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 for idx, get_check, writer in lookup_result:
 */
    if (unlikely(__pyx_v_lookup_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 501, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_lookup_result, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 501, __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_5 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 501, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_idx = __pyx_t_9;
    __pyx_v_get_check = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_writer = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":500
 *                 list lookup_result
 *             lookup_result = writer_lookup_dict[type(datum)]
 *             if len(lookup_result) == 1:             # <<<<<<<<<<<<<<
 *                 idx, get_check, writer = lookup_result[0]
 *             else:
 */
    goto __pyx_L3;
  }

  /* "spavro/fast_binary.pyx":503
 *                 idx, get_check, writer = lookup_result[0]
 *             else:
 *                 for idx, get_check, writer in lookup_result:             # <<<<<<<<<<<<<<
 *                     if get_check(datum):
 *                         break
 */
  /*else*/ {
    if (unlikely(__pyx_v_lookup_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 503, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_lookup_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    for (;;) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 503, __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, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        #if !CYTHON_COMPILING_IN_PYPY
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 503, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 2; __pyx_t_7 = __pyx_t_8(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_10), 3) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 503, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_idx = __pyx_t_9;
      __Pyx_XDECREF_SET(__pyx_v_get_check, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_writer, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "spavro/fast_binary.pyx":504
 *             else:
 *                 for idx, get_check, writer in lookup_result:
 *                     if get_check(datum):             # <<<<<<<<<<<<<<
 *                         break
 *                 else:
 */
      __Pyx_INCREF(__pyx_v_get_check);
      __pyx_t_7 = __pyx_v_get_check; __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_datum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_datum};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_datum};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_datum);
          __Pyx_GIVEREF(__pyx_v_datum);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_datum);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_3) {

        /* "spavro/fast_binary.pyx":505
 *                 for idx, get_check, writer in lookup_result:
 *                     if get_check(datum):
 *                         break             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise TypeError("No matching schema for datum: {}".format(datum))
 */
        goto __pyx_L7_break;

        /* "spavro/fast_binary.pyx":504
 *             else:
 *                 for idx, get_check, writer in lookup_result:
 *                     if get_check(datum):             # <<<<<<<<<<<<<<
 *                         break
 *                 else:
 */
      }

      /* "spavro/fast_binary.pyx":503
 *                 idx, get_check, writer = lookup_result[0]
 *             else:
 *                 for idx, get_check, writer in lookup_result:             # <<<<<<<<<<<<<<
 *                     if get_check(datum):
 *                         break
 */
    }
    /*else*/ {

      /* "spavro/fast_binary.pyx":507
 *                         break
 *                 else:
 *                     raise TypeError("No matching schema for datum: {}".format(datum))             # <<<<<<<<<<<<<<
 *             return idx, writer
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_No_matching_schema_for_datum, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_datum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_datum};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_datum};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_datum);
          __Pyx_GIVEREF(__pyx_v_datum);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_datum);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 507, __pyx_L1_error)
    }

    /* "spavro/fast_binary.pyx":503
 *                 idx, get_check, writer = lookup_result[0]
 *             else:
 *                 for idx, get_check, writer in lookup_result:             # <<<<<<<<<<<<<<
 *                     if get_check(datum):
 *                         break
 */
    __pyx_L7_break:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "spavro/fast_binary.pyx":508
 *                 else:
 *                     raise TypeError("No matching schema for datum: {}".format(datum))
 *             return idx, writer             # <<<<<<<<<<<<<<
 * 
 *         writer_lookup = complex_writer_lookup
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_writer);
  __Pyx_GIVEREF(__pyx_v_writer);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_writer);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":495
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 * 
 *         def complex_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             cdef:
 *                 long idx
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_writer.complex_writer_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lookup_result);
  __Pyx_XDECREF(__pyx_v_get_check);
  __Pyx_XDECREF(__pyx_v_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":512
 *         writer_lookup = complex_writer_lookup
 * 
 *     def write_union(outbuf, datum):             # <<<<<<<<<<<<<<
 *         idx, data_writer = writer_lookup(datum)
 *         write_long(outbuf, idx)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_5write_union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_union_writer_5write_union = {"write_union", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_union_writer_5write_union, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_5write_union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_union (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_union", 1, 2, 2, 1); __PYX_ERR(0, 512, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_union") < 0)) __PYX_ERR(0, 512, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_union", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 512, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_union_writer.write_union", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_union_writer_4write_union(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_union_writer_4write_union(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_outer_scope;
  PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_data_writer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("write_union", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":513
 * 
 *     def write_union(outbuf, datum):
 *         idx, data_writer = writer_lookup(datum)             # <<<<<<<<<<<<<<
 *         write_long(outbuf, idx)
 *         data_writer(outbuf, datum)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_writer_lookup)) { __Pyx_RaiseClosureNameError("writer_lookup"); __PYX_ERR(0, 513, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_writer_lookup);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_writer_lookup; __pyx_t_3 = NULL;
  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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_datum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_datum);
      __Pyx_GIVEREF(__pyx_v_datum);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_datum);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 513, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 513, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_idx = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_data_writer = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":514
 *     def write_union(outbuf, datum):
 *         idx, data_writer = writer_lookup(datum)
 *         write_long(outbuf, idx)             # <<<<<<<<<<<<<<
 *         data_writer(outbuf, datum)
 *     write_union.__reduce__ = lambda: (make_union_writer, (union_schema,))
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_outbuf, __pyx_v_idx};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_outbuf, __pyx_v_idx};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_outbuf);
    __Pyx_INCREF(__pyx_v_idx);
    __Pyx_GIVEREF(__pyx_v_idx);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_idx);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":515
 *         idx, data_writer = writer_lookup(datum)
 *         write_long(outbuf, idx)
 *         data_writer(outbuf, datum)             # <<<<<<<<<<<<<<
 *     write_union.__reduce__ = lambda: (make_union_writer, (union_schema,))
 *     return write_union
 */
  __Pyx_INCREF(__pyx_v_data_writer);
  __pyx_t_4 = __pyx_v_data_writer; __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_outbuf, __pyx_v_datum};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_outbuf, __pyx_v_datum};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_outbuf);
    __Pyx_INCREF(__pyx_v_datum);
    __Pyx_GIVEREF(__pyx_v_datum);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_datum);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":512
 *         writer_lookup = complex_writer_lookup
 * 
 *     def write_union(outbuf, datum):             # <<<<<<<<<<<<<<
 *         idx, data_writer = writer_lookup(datum)
 *         write_long(outbuf, idx)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_writer.write_union", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_data_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":516
 *         write_long(outbuf, idx)
 *         data_writer(outbuf, datum)
 *     write_union.__reduce__ = lambda: (make_union_writer, (union_schema,))             # <<<<<<<<<<<<<<
 *     return write_union
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_6lambda14(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_union_writer_6lambda14 = {"lambda14", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_union_writer_6lambda14, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_union_writer_6lambda14(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda14 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda14(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda14(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda14", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_union_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_union_schema)) { __Pyx_RaiseClosureNameError("union_schema"); __PYX_ERR(0, 516, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_union_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_union_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_union_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":448
 * # ====================
 * 
 * def make_union_writer(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list type_list = [get_type(schema) for schema in union_schema]
 *     # cdef dict writer_lookup
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_66make_union_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_union_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_cur_scope;
  PyObject *__pyx_v_type_list = 0;
  char __pyx_v_simple_union;
  long __pyx_v_idx;
  PyObject *__pyx_v_simple_writer_lookup = 0;
  PyObject *__pyx_v_schema = NULL;
  PyObject *__pyx_v_python_type = NULL;
  PyObject *__pyx_v_complex_writer_lookup = 0;
  PyObject *__pyx_v_write_union = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("make_union_writer", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 448, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_union_schema = __pyx_v_union_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_union_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_union_schema);

  /* "spavro/fast_binary.pyx":449
 * 
 * def make_union_writer(union_schema):
 *     cdef list type_list = [get_type(schema) for schema in union_schema]             # <<<<<<<<<<<<<<
 *     # cdef dict writer_lookup
 *     # cdef list record_list
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_union_schema; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_union_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 449, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 449, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 449, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_schema, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_v_schema, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_type_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":464
 *     # enums, strings and fixed are all python data type unicode or string
 *     # so those won't work either when mixed
 *     simple_union = not(type_list.count('record') > 1 or             # <<<<<<<<<<<<<<
 *                       len(set(type_list) & set(['string', 'enum', 'fixed'])) > 1 or
 *                       len(set(type_list) & set(['record', 'map'])) > 1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_list, __pyx_n_s_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }

  /* "spavro/fast_binary.pyx":465
 *     # so those won't work either when mixed
 *     simple_union = not(type_list.count('record') > 1 or
 *                       len(set(type_list) & set(['string', 'enum', 'fixed'])) > 1 or             # <<<<<<<<<<<<<<
 *                       len(set(type_list) & set(['record', 'map'])) > 1)
 * 
 */
  __pyx_t_1 = PySet_New(__pyx_v_type_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PySet_Add(__pyx_t_2, __pyx_n_s_string) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_s_enum) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_s_fixed) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_t_5 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = PySet_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = ((__pyx_t_3 > 1) != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }

  /* "spavro/fast_binary.pyx":466
 *     simple_union = not(type_list.count('record') > 1 or
 *                       len(set(type_list) & set(['string', 'enum', 'fixed'])) > 1 or
 *                       len(set(type_list) & set(['record', 'map'])) > 1)             # <<<<<<<<<<<<<<
 * 
 *     if simple_union:
 */
  __pyx_t_5 = PySet_New(__pyx_v_type_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PySet_Add(__pyx_t_2, __pyx_n_s_record) < 0) __PYX_ERR(0, 466, __pyx_L1_error)
  if (PySet_Add(__pyx_t_2, __pyx_n_s_map) < 0) __PYX_ERR(0, 466, __pyx_L1_error)
  __pyx_t_1 = PyNumber_And(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((__pyx_t_3 > 1) != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;

  /* "spavro/fast_binary.pyx":464
 *     # enums, strings and fixed are all python data type unicode or string
 *     # so those won't work either when mixed
 *     simple_union = not(type_list.count('record') > 1 or             # <<<<<<<<<<<<<<
 *                       len(set(type_list) & set(['string', 'enum', 'fixed'])) > 1 or
 *                       len(set(type_list) & set(['record', 'map'])) > 1)
 */
  __pyx_v_simple_union = (!__pyx_t_6);

  /* "spavro/fast_binary.pyx":468
 *                       len(set(type_list) & set(['record', 'map'])) > 1)
 * 
 *     if simple_union:             # <<<<<<<<<<<<<<
 *         writer_lookup_dict = {avro_to_py[get_type(schema)]: (idx, get_writer(schema)) for idx, schema in enumerate(union_schema)}
 *         if int in writer_lookup_dict:
 */
  __pyx_t_6 = (__pyx_v_simple_union != 0);
  if (__pyx_t_6) {

    /* "spavro/fast_binary.pyx":469
 * 
 *     if simple_union:
 *         writer_lookup_dict = {avro_to_py[get_type(schema)]: (idx, get_writer(schema)) for idx, schema in enumerate(union_schema)}             # <<<<<<<<<<<<<<
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 */
    { /* enter inner scope */
      long __pyx_8genexpr1__pyx_v_idx;
      PyObject *__pyx_8genexpr1__pyx_v_schema = NULL;
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = 0;
      if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) {
        __pyx_t_2 = __pyx_cur_scope->__pyx_v_union_schema; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_union_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L11_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L11_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L11_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 469, __pyx_L11_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_schema, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_8genexpr1__pyx_v_idx = __pyx_t_8;
        __pyx_t_8 = (__pyx_t_8 + 1);
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_avro_to_py); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_8genexpr1__pyx_v_schema, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PyObject_GetItem(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_8genexpr1__pyx_v_idx); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_writer); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        if (!__pyx_t_12) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_8genexpr1__pyx_v_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_8genexpr1__pyx_v_schema};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_8genexpr1__pyx_v_schema};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 469, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
            __Pyx_INCREF(__pyx_8genexpr1__pyx_v_schema);
            __Pyx_GIVEREF(__pyx_8genexpr1__pyx_v_schema);
            PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_8genexpr1__pyx_v_schema);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5);
        __pyx_t_9 = 0;
        __pyx_t_5 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_10, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 469, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_schema);
      goto __pyx_L14_exit_scope;
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_schema);
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_v_writer_lookup_dict = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":470
 *     if simple_union:
 *         writer_lookup_dict = {avro_to_py[get_type(schema)]: (idx, get_writer(schema)) for idx, schema in enumerate(union_schema)}
 *         if int in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:
 */
    __pyx_t_6 = (__Pyx_PyDict_ContainsTF(((PyObject *)(&PyInt_Type)), __pyx_cur_scope->__pyx_v_writer_lookup_dict, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 470, __pyx_L1_error)
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "spavro/fast_binary.pyx":471
 *         writer_lookup_dict = {avro_to_py[get_type(schema)]: (idx, get_writer(schema)) for idx, schema in enumerate(union_schema)}
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]             # <<<<<<<<<<<<<<
 *         if unicode in writer_lookup_dict:
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyLong_Type)), __pyx_t_1) < 0)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "spavro/fast_binary.pyx":470
 *     if simple_union:
 *         writer_lookup_dict = {avro_to_py[get_type(schema)]: (idx, get_writer(schema)) for idx, schema in enumerate(union_schema)}
 *         if int in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:
 */
    }

    /* "spavro/fast_binary.pyx":472
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 *         # warning, this will fail if there's both a long and int in a union
 */
    __pyx_t_7 = (__Pyx_PyDict_ContainsTF(((PyObject *)(&PyUnicode_Type)), __pyx_cur_scope->__pyx_v_writer_lookup_dict, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 472, __pyx_L1_error)
    __pyx_t_6 = (__pyx_t_7 != 0);
    if (__pyx_t_6) {

      /* "spavro/fast_binary.pyx":473
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]             # <<<<<<<<<<<<<<
 *         # warning, this will fail if there's both a long and int in a union
 *         # or a float and a double in a union (which is valid but nonsensical
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyString_Type)), __pyx_t_1) < 0)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "spavro/fast_binary.pyx":472
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 *         # warning, this will fail if there's both a long and int in a union
 */
    }

    /* "spavro/fast_binary.pyx":477
 *         # or a float and a double in a union (which is valid but nonsensical
 *         # in python but valid in avro)
 *         def simple_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             return writer_lookup_dict[type(datum)]
 * 
 */
    __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_union_writer_1simple_writer_lookup, 0, __pyx_n_s_make_union_writer_locals_simple, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_simple_writer_lookup = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":480
 *             return writer_lookup_dict[type(datum)]
 * 
 *         writer_lookup = simple_writer_lookup             # <<<<<<<<<<<<<<
 *     else:
 *         writer_lookup_dict = {}
 */
    __Pyx_INCREF(__pyx_v_simple_writer_lookup);
    __Pyx_GIVEREF(__pyx_v_simple_writer_lookup);
    __pyx_cur_scope->__pyx_v_writer_lookup = __pyx_v_simple_writer_lookup;

    /* "spavro/fast_binary.pyx":468
 *                       len(set(type_list) & set(['record', 'map'])) > 1)
 * 
 *     if simple_union:             # <<<<<<<<<<<<<<
 *         writer_lookup_dict = {avro_to_py[get_type(schema)]: (idx, get_writer(schema)) for idx, schema in enumerate(union_schema)}
 *         if int in writer_lookup_dict:
 */
    goto __pyx_L8;
  }

  /* "spavro/fast_binary.pyx":482
 *         writer_lookup = simple_writer_lookup
 *     else:
 *         writer_lookup_dict = {}             # <<<<<<<<<<<<<<
 *         for idx, schema in enumerate(union_schema):
 *             python_type = avro_to_py[get_type(schema)]
 */
  /*else*/ {
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_v_writer_lookup_dict = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":483
 *     else:
 *         writer_lookup_dict = {}
 *         for idx, schema in enumerate(union_schema):             # <<<<<<<<<<<<<<
 *             python_type = avro_to_py[get_type(schema)]
 *             if python_type in writer_lookup_dict:
 */
    __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_union_schema)) {
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_union_schema; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_union_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 483, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_schema, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_v_idx = __pyx_t_8;
      __pyx_t_8 = (__pyx_t_8 + 1);

      /* "spavro/fast_binary.pyx":484
 *         writer_lookup_dict = {}
 *         for idx, schema in enumerate(union_schema):
 *             python_type = avro_to_py[get_type(schema)]             # <<<<<<<<<<<<<<
 *             if python_type in writer_lookup_dict:
 *                 writer_lookup_dict[python_type] = writer_lookup_dict[python_type] + [(idx, get_check(schema), get_writer(schema))]
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_avro_to_py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_v_schema, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyObject_GetItem(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_python_type, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "spavro/fast_binary.pyx":485
 *         for idx, schema in enumerate(union_schema):
 *             python_type = avro_to_py[get_type(schema)]
 *             if python_type in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *                 writer_lookup_dict[python_type] = writer_lookup_dict[python_type] + [(idx, get_check(schema), get_writer(schema))]
 *             else:
 */
      __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_python_type, __pyx_cur_scope->__pyx_v_writer_lookup_dict, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 485, __pyx_L1_error)
      __pyx_t_7 = (__pyx_t_6 != 0);
      if (__pyx_t_7) {

        /* "spavro/fast_binary.pyx":486
 *             python_type = avro_to_py[get_type(schema)]
 *             if python_type in writer_lookup_dict:
 *                 writer_lookup_dict[python_type] = writer_lookup_dict[python_type] + [(idx, get_check(schema), get_writer(schema))]             # <<<<<<<<<<<<<<
 *             else:
 *                 writer_lookup_dict[python_type] = [(idx, get_check(schema), get_writer(schema))]
 */
        __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, __pyx_v_python_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyInt_From_long(__pyx_v_idx); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_check); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = NULL;
        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);
          }
        }
        if (!__pyx_t_9) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_schema};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_schema};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = NULL;
            __Pyx_INCREF(__pyx_v_schema);
            __Pyx_GIVEREF(__pyx_v_schema);
            PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_schema);
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_writer); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
          }
        }
        if (!__pyx_t_9) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_13)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_schema};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_schema};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
            __Pyx_INCREF(__pyx_v_schema);
            __Pyx_GIVEREF(__pyx_v_schema);
            PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_schema);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_5);
        __pyx_t_11 = 0;
        __pyx_t_2 = 0;
        __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_13);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_13 = PyNumber_Add(__pyx_t_10, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, __pyx_v_python_type, __pyx_t_13) < 0)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "spavro/fast_binary.pyx":485
 *         for idx, schema in enumerate(union_schema):
 *             python_type = avro_to_py[get_type(schema)]
 *             if python_type in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *                 writer_lookup_dict[python_type] = writer_lookup_dict[python_type] + [(idx, get_check(schema), get_writer(schema))]
 *             else:
 */
        goto __pyx_L19;
      }

      /* "spavro/fast_binary.pyx":488
 *                 writer_lookup_dict[python_type] = writer_lookup_dict[python_type] + [(idx, get_check(schema), get_writer(schema))]
 *             else:
 *                 writer_lookup_dict[python_type] = [(idx, get_check(schema), get_writer(schema))]             # <<<<<<<<<<<<<<
 * 
 *         if int in writer_lookup_dict:
 */
      /*else*/ {
        __pyx_t_13 = __Pyx_PyInt_From_long(__pyx_v_idx); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_check); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (!__pyx_t_2) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_schema};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_schema};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
            __Pyx_INCREF(__pyx_v_schema);
            __Pyx_GIVEREF(__pyx_v_schema);
            PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_schema);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_writer); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        if (!__pyx_t_2) {
          __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_schema); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 488, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_schema};
            __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_schema};
            __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
            __Pyx_INCREF(__pyx_v_schema);
            __Pyx_GIVEREF(__pyx_v_schema);
            PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_schema);
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 488, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
        __pyx_t_13 = 0;
        __pyx_t_5 = 0;
        __pyx_t_10 = 0;
        __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, __pyx_v_python_type, __pyx_t_10) < 0)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_L19:;

      /* "spavro/fast_binary.pyx":483
 *     else:
 *         writer_lookup_dict = {}
 *         for idx, schema in enumerate(union_schema):             # <<<<<<<<<<<<<<
 *             python_type = avro_to_py[get_type(schema)]
 *             if python_type in writer_lookup_dict:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":490
 *                 writer_lookup_dict[python_type] = [(idx, get_check(schema), get_writer(schema))]
 * 
 *         if int in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:
 */
    __pyx_t_7 = (__Pyx_PyDict_ContainsTF(((PyObject *)(&PyInt_Type)), __pyx_cur_scope->__pyx_v_writer_lookup_dict, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
    __pyx_t_6 = (__pyx_t_7 != 0);
    if (__pyx_t_6) {

      /* "spavro/fast_binary.pyx":491
 * 
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]             # <<<<<<<<<<<<<<
 *         if unicode in writer_lookup_dict:
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyLong_Type)), __pyx_t_1) < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "spavro/fast_binary.pyx":490
 *                 writer_lookup_dict[python_type] = [(idx, get_check(schema), get_writer(schema))]
 * 
 *         if int in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:
 */
    }

    /* "spavro/fast_binary.pyx":492
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 * 
 */
    __pyx_t_6 = (__Pyx_PyDict_ContainsTF(((PyObject *)(&PyUnicode_Type)), __pyx_cur_scope->__pyx_v_writer_lookup_dict, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 492, __pyx_L1_error)
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "spavro/fast_binary.pyx":493
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]             # <<<<<<<<<<<<<<
 * 
 *         def complex_writer_lookup(datum):
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_writer_lookup_dict, ((PyObject *)(&PyString_Type)), __pyx_t_1) < 0)) __PYX_ERR(0, 493, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "spavro/fast_binary.pyx":492
 *         if int in writer_lookup_dict:
 *             writer_lookup_dict[long] = writer_lookup_dict[int]
 *         if unicode in writer_lookup_dict:             # <<<<<<<<<<<<<<
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 * 
 */
    }

    /* "spavro/fast_binary.pyx":495
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 * 
 *         def complex_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             cdef:
 *                 long idx
 */
    __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_union_writer_3complex_writer_lookup, 0, __pyx_n_s_make_union_writer_locals_complex, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_complex_writer_lookup = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":510
 *             return idx, writer
 * 
 *         writer_lookup = complex_writer_lookup             # <<<<<<<<<<<<<<
 * 
 *     def write_union(outbuf, datum):
 */
    __Pyx_INCREF(__pyx_v_complex_writer_lookup);
    __Pyx_GIVEREF(__pyx_v_complex_writer_lookup);
    __pyx_cur_scope->__pyx_v_writer_lookup = __pyx_v_complex_writer_lookup;
  }
  __pyx_L8:;

  /* "spavro/fast_binary.pyx":512
 *         writer_lookup = complex_writer_lookup
 * 
 *     def write_union(outbuf, datum):             # <<<<<<<<<<<<<<
 *         idx, data_writer = writer_lookup(datum)
 *         write_long(outbuf, idx)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_union_writer_5write_union, 0, __pyx_n_s_make_union_writer_locals_write_u, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_write_union = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":516
 *         write_long(outbuf, idx)
 *         data_writer(outbuf, datum)
 *     write_union.__reduce__ = lambda: (make_union_writer, (union_schema,))             # <<<<<<<<<<<<<<
 *     return write_union
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_union_writer_6lambda14, 0, __pyx_n_s_make_union_writer_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_write_union, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":517
 *         data_writer(outbuf, datum)
 *     write_union.__reduce__ = lambda: (make_union_writer, (union_schema,))
 *     return write_union             # <<<<<<<<<<<<<<
 * 
 * def make_enum_writer(schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_write_union);
  __pyx_r = __pyx_v_write_union;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":448
 * # ====================
 * 
 * def make_union_writer(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list type_list = [get_type(schema) for schema in union_schema]
 *     # cdef dict writer_lookup
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("spavro.fast_binary.make_union_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_type_list);
  __Pyx_XDECREF(__pyx_v_simple_writer_lookup);
  __Pyx_XDECREF(__pyx_v_schema);
  __Pyx_XDECREF(__pyx_v_python_type);
  __Pyx_XDECREF(__pyx_v_complex_writer_lookup);
  __Pyx_XDECREF(__pyx_v_write_union);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":519
 *     return write_union
 * 
 * def make_enum_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_69make_enum_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_69make_enum_writer = {"make_enum_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_69make_enum_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_69make_enum_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_enum_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_68make_enum_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":523
 * 
 *     # the datum can be str or unicode?
 *     def write_enum(outbuf, basestring datum):             # <<<<<<<<<<<<<<
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_writer_1write_enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_enum_writer_1write_enum = {"write_enum", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_enum_writer_1write_enum, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_writer_1write_enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_enum (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_enum", 1, 2, 2, 1); __PYX_ERR(0, 523, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_enum") < 0)) __PYX_ERR(0, 523, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_enum", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 523, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_writer.write_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datum), (&PyBaseString_Type), 1, "datum", 1))) __PYX_ERR(0, 523, __pyx_L1_error)
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_enum_writer_write_enum(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_enum_writer_write_enum(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *__pyx_outer_scope;
  int __pyx_v_enum_index;
  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;
  __Pyx_RefNannySetupContext("write_enum", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":524
 *     # the datum can be str or unicode?
 *     def write_enum(outbuf, basestring datum):
 *         cdef int enum_index = symbols.index(datum)             # <<<<<<<<<<<<<<
 *         write_int(outbuf, enum_index)
 *     write_enum.__reduce__ = lambda: (make_enum_writer, (schema,))
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_symbols)) { __Pyx_RaiseClosureNameError("symbols"); __PYX_ERR(0, 524, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_symbols, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_datum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_datum);
      __Pyx_GIVEREF(__pyx_v_datum);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_datum);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_enum_index = __pyx_t_5;

  /* "spavro/fast_binary.pyx":525
 *     def write_enum(outbuf, basestring datum):
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)             # <<<<<<<<<<<<<<
 *     write_enum.__reduce__ = lambda: (make_enum_writer, (schema,))
 *     return write_enum
 */
  __pyx_f_6spavro_11fast_binary_write_int(__pyx_v_outbuf, __pyx_v_enum_index);

  /* "spavro/fast_binary.pyx":523
 * 
 *     # the datum can be str or unicode?
 *     def write_enum(outbuf, basestring datum):             # <<<<<<<<<<<<<<
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_writer.write_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":526
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)
 *     write_enum.__reduce__ = lambda: (make_enum_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_enum
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_writer_2lambda15(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_enum_writer_2lambda15 = {"lambda15", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_enum_writer_2lambda15, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_enum_writer_2lambda15(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda15 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda15(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda15(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda15", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_enum_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 526, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":519
 *     return write_union
 * 
 * def make_enum_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_68make_enum_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *__pyx_cur_scope;
  PyObject *__pyx_v_write_enum = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_enum_writer", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 519, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":520
 * 
 * def make_enum_writer(schema):
 *     cdef list symbols = schema['symbols']             # <<<<<<<<<<<<<<
 * 
 *     # the datum can be str or unicode?
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_symbols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":523
 * 
 *     # the datum can be str or unicode?
 *     def write_enum(outbuf, basestring datum):             # <<<<<<<<<<<<<<
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_enum_writer_1write_enum, 0, __pyx_n_s_make_enum_writer_locals_write_en, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_write_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":526
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)
 *     write_enum.__reduce__ = lambda: (make_enum_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_enum
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_enum_writer_2lambda15, 0, __pyx_n_s_make_enum_writer_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_write_enum, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":527
 *         write_int(outbuf, enum_index)
 *     write_enum.__reduce__ = lambda: (make_enum_writer, (schema,))
 *     return write_enum             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_write_enum);
  __pyx_r = __pyx_v_write_enum;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":519
 *     return write_union
 * 
 * def make_enum_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_enum_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_write_enum);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":530
 * 
 * 
 * def make_record_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_71make_record_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_71make_record_writer = {"make_record_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_71make_record_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_71make_record_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_record_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_70make_record_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":533
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 *     def write_record(outbuf, datum):             # <<<<<<<<<<<<<<
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_writer_1write_record(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_18make_record_writer_1write_record = {"write_record", (PyCFunction)__pyx_pw_6spavro_11fast_binary_18make_record_writer_1write_record, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_writer_1write_record(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_record (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_record", 1, 2, 2, 1); __PYX_ERR(0, 533, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_record") < 0)) __PYX_ERR(0, 533, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_record", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 533, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_record_writer.write_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_18make_record_writer_write_record(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_18make_record_writer_write_record(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *__pyx_outer_scope;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("write_record", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":534
 * 
 *     def write_record(outbuf, datum):
 *         for field in fields:             # <<<<<<<<<<<<<<
 *             field.writer(outbuf, datum.get(field.name))
 *     write_record.__reduce__ = lambda: (make_record_writer, (schema,))
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_fields)) { __Pyx_RaiseClosureNameError("fields"); __PYX_ERR(0, 534, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_fields == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 534, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "spavro/fast_binary.pyx":535
 *     def write_record(outbuf, datum):
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))             # <<<<<<<<<<<<<<
 *     write_record.__reduce__ = lambda: (make_record_writer, (schema,))
 *     return write_record
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_writer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datum, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(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_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_v_outbuf);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "spavro/fast_binary.pyx":534
 * 
 *     def write_record(outbuf, datum):
 *         for field in fields:             # <<<<<<<<<<<<<<
 *             field.writer(outbuf, datum.get(field.name))
 *     write_record.__reduce__ = lambda: (make_record_writer, (schema,))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":533
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 *     def write_record(outbuf, datum):             # <<<<<<<<<<<<<<
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("spavro.fast_binary.make_record_writer.write_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":536
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))
 *     write_record.__reduce__ = lambda: (make_record_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_record
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_writer_2lambda16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_18make_record_writer_2lambda16 = {"lambda16", (PyCFunction)__pyx_pw_6spavro_11fast_binary_18make_record_writer_2lambda16, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_record_writer_2lambda16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda16 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda16(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda16(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda16", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_record_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 536, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":530
 * 
 * 
 * def make_record_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_70make_record_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *__pyx_cur_scope;
  PyObject *__pyx_v_write_record = 0;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __Pyx_RefNannySetupContext("make_record_writer", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 530, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":531
 * 
 * def make_record_writer(schema):
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]             # <<<<<<<<<<<<<<
 * 
 *     def write_record(outbuf, datum):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 531, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_WriteField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_GetItem(__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_writer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyObject_GetItem(__pyx_v_field, __pyx_n_s_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 531, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 531, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_t_8);
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":533
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 *     def write_record(outbuf, datum):             # <<<<<<<<<<<<<<
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_18make_record_writer_1write_record, 0, __pyx_n_s_make_record_writer_locals_write, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_write_record = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":536
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))
 *     write_record.__reduce__ = lambda: (make_record_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_record
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_18make_record_writer_2lambda16, 0, __pyx_n_s_make_record_writer_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_write_record, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":537
 *             field.writer(outbuf, datum.get(field.name))
 *     write_record.__reduce__ = lambda: (make_record_writer, (schema,))
 *     return write_record             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_write_record);
  __pyx_r = __pyx_v_write_record;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":530
 * 
 * 
 * def make_record_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("spavro.fast_binary.make_record_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_write_record);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":540
 * 
 * 
 * def make_array_writer(schema):             # <<<<<<<<<<<<<<
 *     item_writer = get_writer(schema['items'])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_73make_array_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_73make_array_writer = {"make_array_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_73make_array_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_73make_array_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_array_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_72make_array_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":543
 *     item_writer = get_writer(schema['items'])
 * 
 *     def write_array(outbuf, list datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_writer_1write_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_array_writer_1write_array = {"write_array", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_array_writer_1write_array, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_writer_1write_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_array (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_array", 1, 2, 2, 1); __PYX_ERR(0, 543, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_array") < 0)) __PYX_ERR(0, 543, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 543, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_array_writer.write_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datum), (&PyList_Type), 1, "datum", 1))) __PYX_ERR(0, 543, __pyx_L1_error)
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_array_writer_write_array(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_array_writer_write_array(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *__pyx_outer_scope;
  long __pyx_v_item_count;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("write_array", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":544
 * 
 *     def write_array(outbuf, list datum):
 *         cdef long item_count = len(datum)             # <<<<<<<<<<<<<<
 *         if item_count > 0:
 *             write_long(outbuf, item_count)
 */
  if (unlikely(__pyx_v_datum == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 544, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_datum); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 544, __pyx_L1_error)
  __pyx_v_item_count = __pyx_t_1;

  /* "spavro/fast_binary.pyx":545
 *     def write_array(outbuf, list datum):
 *         cdef long item_count = len(datum)
 *         if item_count > 0:             # <<<<<<<<<<<<<<
 *             write_long(outbuf, item_count)
 *         for item in datum:
 */
  __pyx_t_2 = ((__pyx_v_item_count > 0) != 0);
  if (__pyx_t_2) {

    /* "spavro/fast_binary.pyx":546
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 *             write_long(outbuf, item_count)             # <<<<<<<<<<<<<<
 *         for item in datum:
 *             item_writer(outbuf, item)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_item_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __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_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;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_v_outbuf);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "spavro/fast_binary.pyx":545
 *     def write_array(outbuf, list datum):
 *         cdef long item_count = len(datum)
 *         if item_count > 0:             # <<<<<<<<<<<<<<
 *             write_long(outbuf, item_count)
 *         for item in datum:
 */
  }

  /* "spavro/fast_binary.pyx":547
 *         if item_count > 0:
 *             write_long(outbuf, item_count)
 *         for item in datum:             # <<<<<<<<<<<<<<
 *             item_writer(outbuf, item)
 *         write_long(outbuf, 0)
 */
  if (unlikely(__pyx_v_datum == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 547, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_v_datum; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "spavro/fast_binary.pyx":548
 *             write_long(outbuf, item_count)
 *         for item in datum:
 *             item_writer(outbuf, item)             # <<<<<<<<<<<<<<
 *         write_long(outbuf, 0)
 *     write_array.__reduce__ = lambda: (make_array_writer, (schema,))
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_item_writer)) { __Pyx_RaiseClosureNameError("item_writer"); __PYX_ERR(0, 548, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_item_writer);
    __pyx_t_8 = __pyx_cur_scope->__pyx_v_item_writer; __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outbuf, __pyx_v_item};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outbuf, __pyx_v_item};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_v_outbuf);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_outbuf);
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_item);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "spavro/fast_binary.pyx":547
 *         if item_count > 0:
 *             write_long(outbuf, item_count)
 *         for item in datum:             # <<<<<<<<<<<<<<
 *             item_writer(outbuf, item)
 *         write_long(outbuf, 0)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spavro/fast_binary.pyx":549
 *         for item in datum:
 *             item_writer(outbuf, item)
 *         write_long(outbuf, 0)             # <<<<<<<<<<<<<<
 *     write_array.__reduce__ = lambda: (make_array_writer, (schema,))
 *     return write_array
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_outbuf, __pyx_int_0};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_outbuf, __pyx_int_0};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_outbuf);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_int_0);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spavro/fast_binary.pyx":543
 *     item_writer = get_writer(schema['items'])
 * 
 *     def write_array(outbuf, list datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_array_writer.write_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":550
 *             item_writer(outbuf, item)
 *         write_long(outbuf, 0)
 *     write_array.__reduce__ = lambda: (make_array_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_array
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_writer_2lambda17(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_array_writer_2lambda17 = {"lambda17", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_array_writer_2lambda17, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_array_writer_2lambda17(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda17 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda17(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda17(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda17", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_array_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 550, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":540
 * 
 * 
 * def make_array_writer(schema):             # <<<<<<<<<<<<<<
 *     item_writer = get_writer(schema['items'])
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_72make_array_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *__pyx_cur_scope;
  PyObject *__pyx_v_write_array = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_array_writer", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 540, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":541
 * 
 * def make_array_writer(schema):
 *     item_writer = get_writer(schema['items'])             # <<<<<<<<<<<<<<
 * 
 *     def write_array(outbuf, list datum):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_item_writer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":543
 *     item_writer = get_writer(schema['items'])
 * 
 *     def write_array(outbuf, list datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_array_writer_1write_array, 0, __pyx_n_s_make_array_writer_locals_write_a, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_write_array = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":550
 *             item_writer(outbuf, item)
 *         write_long(outbuf, 0)
 *     write_array.__reduce__ = lambda: (make_array_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_array
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_array_writer_2lambda17, 0, __pyx_n_s_make_array_writer_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_write_array, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":551
 *         write_long(outbuf, 0)
 *     write_array.__reduce__ = lambda: (make_array_writer, (schema,))
 *     return write_array             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_write_array);
  __pyx_r = __pyx_v_write_array;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":540
 * 
 * 
 * def make_array_writer(schema):             # <<<<<<<<<<<<<<
 *     item_writer = get_writer(schema['items'])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_array_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_write_array);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":554
 * 
 * 
 * def make_map_writer(schema):             # <<<<<<<<<<<<<<
 *     map_value_writer = get_writer(schema['values'])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_75make_map_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_75make_map_writer = {"make_map_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_75make_map_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_75make_map_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_map_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_74make_map_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":557
 *     map_value_writer = get_writer(schema['values'])
 * 
 *     def write_map(outbuf, datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_writer_1write_map(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_map_writer_1write_map = {"write_map", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_map_writer_1write_map, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_writer_1write_map(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_map (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_map", 1, 2, 2, 1); __PYX_ERR(0, 557, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_map") < 0)) __PYX_ERR(0, 557, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 557, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_map_writer.write_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_15make_map_writer_write_map(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_15make_map_writer_write_map(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *__pyx_outer_scope;
  long __pyx_v_item_count;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("write_map", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":558
 * 
 *     def write_map(outbuf, datum):
 *         cdef long item_count = len(datum)             # <<<<<<<<<<<<<<
 *         if item_count > 0:
 *             write_long(outbuf, item_count)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_datum); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __pyx_v_item_count = __pyx_t_1;

  /* "spavro/fast_binary.pyx":559
 *     def write_map(outbuf, datum):
 *         cdef long item_count = len(datum)
 *         if item_count > 0:             # <<<<<<<<<<<<<<
 *             write_long(outbuf, item_count)
 *         for key, val in datum.iteritems():
 */
  __pyx_t_2 = ((__pyx_v_item_count > 0) != 0);
  if (__pyx_t_2) {

    /* "spavro/fast_binary.pyx":560
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 *             write_long(outbuf, item_count)             # <<<<<<<<<<<<<<
 *         for key, val in datum.iteritems():
 *             write_utf8(outbuf, key)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_item_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __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_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;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_v_outbuf);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "spavro/fast_binary.pyx":559
 *     def write_map(outbuf, datum):
 *         cdef long item_count = len(datum)
 *         if item_count > 0:             # <<<<<<<<<<<<<<
 *             write_long(outbuf, item_count)
 *         for key, val in datum.iteritems():
 */
  }

  /* "spavro/fast_binary.pyx":561
 *         if item_count > 0:
 *             write_long(outbuf, item_count)
 *         for key, val in datum.iteritems():             # <<<<<<<<<<<<<<
 *             write_utf8(outbuf, key)
 *             map_value_writer(outbuf, val)
 */
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v_datum == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
    __PYX_ERR(0, 561, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_datum, 0, __pyx_n_s_iteritems, (&__pyx_t_9), (&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_9, &__pyx_t_1, &__pyx_t_4, &__pyx_t_8, NULL, __pyx_t_7);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "spavro/fast_binary.pyx":562
 *             write_long(outbuf, item_count)
 *         for key, val in datum.iteritems():
 *             write_utf8(outbuf, key)             # <<<<<<<<<<<<<<
 *             map_value_writer(outbuf, val)
 *         write_long(outbuf, 0)
 */
    __pyx_f_6spavro_11fast_binary_write_utf8(__pyx_v_outbuf, __pyx_v_key);

    /* "spavro/fast_binary.pyx":563
 *         for key, val in datum.iteritems():
 *             write_utf8(outbuf, key)
 *             map_value_writer(outbuf, val)             # <<<<<<<<<<<<<<
 *         write_long(outbuf, 0)
 *     write_map.__reduce__ = lambda: (make_map_writer, (schema,))
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_map_value_writer)) { __Pyx_RaiseClosureNameError("map_value_writer"); __PYX_ERR(0, 563, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_map_value_writer);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v_map_value_writer; __pyx_t_5 = NULL;
    __pyx_t_10 = 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_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outbuf, __pyx_v_val};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outbuf, __pyx_v_val};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_outbuf);
      __Pyx_GIVEREF(__pyx_v_outbuf);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_v_outbuf);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_v_val);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spavro/fast_binary.pyx":564
 *             write_utf8(outbuf, key)
 *             map_value_writer(outbuf, val)
 *         write_long(outbuf, 0)             # <<<<<<<<<<<<<<
 *     write_map.__reduce__ = lambda: (make_map_writer, (schema,))
 *     return write_map
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_outbuf, __pyx_int_0};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_outbuf, __pyx_int_0};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_outbuf);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_int_0);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spavro/fast_binary.pyx":557
 *     map_value_writer = get_writer(schema['values'])
 * 
 *     def write_map(outbuf, datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_map_writer.write_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":565
 *             map_value_writer(outbuf, val)
 *         write_long(outbuf, 0)
 *     write_map.__reduce__ = lambda: (make_map_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_map
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_writer_2lambda18(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_map_writer_2lambda18 = {"lambda18", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_map_writer_2lambda18, METH_NOARGS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_map_writer_2lambda18(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda18 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda18(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda18(PyObject *__pyx_self) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("lambda18", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_map_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_schema)) { __Pyx_RaiseClosureNameError("schema"); __PYX_ERR(0, 565, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_schema);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "spavro/fast_binary.pyx":554
 * 
 * 
 * def make_map_writer(schema):             # <<<<<<<<<<<<<<
 *     map_value_writer = get_writer(schema['values'])
 * 
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_74make_map_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *__pyx_cur_scope;
  PyObject *__pyx_v_write_map = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("make_map_writer", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 554, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_schema = __pyx_v_schema;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_schema);

  /* "spavro/fast_binary.pyx":555
 * 
 * def make_map_writer(schema):
 *     map_value_writer = get_writer(schema['values'])             # <<<<<<<<<<<<<<
 * 
 *     def write_map(outbuf, datum):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_schema, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_map_value_writer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":557
 *     map_value_writer = get_writer(schema['values'])
 * 
 *     def write_map(outbuf, datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_map_writer_1write_map, 0, __pyx_n_s_make_map_writer_locals_write_map, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_write_map = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":565
 *             map_value_writer(outbuf, val)
 *         write_long(outbuf, 0)
 *     write_map.__reduce__ = lambda: (make_map_writer, (schema,))             # <<<<<<<<<<<<<<
 *     return write_map
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_map_writer_2lambda18, 0, __pyx_n_s_make_map_writer_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_write_map, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":566
 *         write_long(outbuf, 0)
 *     write_map.__reduce__ = lambda: (make_map_writer, (schema,))
 *     return write_map             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_write_map);
  __pyx_r = __pyx_v_write_map;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":554
 * 
 * 
 * def make_map_writer(schema):             # <<<<<<<<<<<<<<
 *     map_value_writer = get_writer(schema['values'])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.make_map_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_write_map);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":569
 * 
 * 
 * def make_boolean_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_77make_boolean_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_76make_boolean_writer[] = "Create a boolean writer, adds a validation step before the actual\n    write function";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_77make_boolean_writer = {"make_boolean_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_77make_boolean_writer, METH_O, __pyx_doc_6spavro_11fast_binary_76make_boolean_writer};
static PyObject *__pyx_pw_6spavro_11fast_binary_77make_boolean_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_boolean_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_76make_boolean_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":572
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 *     def checked_boolean_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_boolean_writer_1checked_boolean_writer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_19make_boolean_writer_1checked_boolean_writer = {"checked_boolean_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_19make_boolean_writer_1checked_boolean_writer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_19make_boolean_writer_1checked_boolean_writer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checked_boolean_writer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checked_boolean_writer", 1, 2, 2, 1); __PYX_ERR(0, 572, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checked_boolean_writer") < 0)) __PYX_ERR(0, 572, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checked_boolean_writer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 572, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_boolean_writer.checked_boolean_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_19make_boolean_writer_checked_boolean_writer(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_19make_boolean_writer_checked_boolean_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char __pyx_t_4;
  __Pyx_RefNannySetupContext("checked_boolean_writer", 0);

  /* "spavro/fast_binary.pyx":573
 *     write function'''
 *     def checked_boolean_writer(outbuf, datum):
 *         if not isinstance(datum, bool):             # <<<<<<<<<<<<<<
 *             raise TypeError("Not a boolean value")
 *         write_boolean(outbuf, datum)
 */
  __pyx_t_1 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_datum, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_3) {

    /* "spavro/fast_binary.pyx":574
 *     def checked_boolean_writer(outbuf, datum):
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")             # <<<<<<<<<<<<<<
 *         write_boolean(outbuf, datum)
 *     return checked_boolean_writer
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __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, 574, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":573
 *     write function'''
 *     def checked_boolean_writer(outbuf, datum):
 *         if not isinstance(datum, bool):             # <<<<<<<<<<<<<<
 *             raise TypeError("Not a boolean value")
 *         write_boolean(outbuf, datum)
 */
  }

  /* "spavro/fast_binary.pyx":575
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")
 *         write_boolean(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return checked_boolean_writer
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_char(__pyx_v_datum); if (unlikely((__pyx_t_4 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_write_boolean(__pyx_v_outbuf, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":572
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 *     def checked_boolean_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_boolean_writer.checked_boolean_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":569
 * 
 * 
 * def make_boolean_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_76make_boolean_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_checked_boolean_writer = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_boolean_writer", 0);

  /* "spavro/fast_binary.pyx":572
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 *     def checked_boolean_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_19make_boolean_writer_1checked_boolean_writer, 0, __pyx_n_s_make_boolean_writer_locals_check, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_checked_boolean_writer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":576
 *             raise TypeError("Not a boolean value")
 *         write_boolean(outbuf, datum)
 *     return checked_boolean_writer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_checked_boolean_writer);
  __pyx_r = __pyx_v_checked_boolean_writer;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":569
 * 
 * 
 * def make_boolean_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_boolean_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_checked_boolean_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":579
 * 
 * 
 * def make_fixed_writer(schema):             # <<<<<<<<<<<<<<
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_79make_fixed_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_78make_fixed_writer[] = "A writer that must write X bytes defined by the schema";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_79make_fixed_writer = {"make_fixed_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_79make_fixed_writer, METH_O, __pyx_doc_6spavro_11fast_binary_78make_fixed_writer};
static PyObject *__pyx_pw_6spavro_11fast_binary_79make_fixed_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_fixed_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_78make_fixed_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":584
 *     # note: not a char* because those are null terminated and fixed
 *     # has no such limitation
 *     def checked_write_fixed(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_fixed_writer_1checked_write_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17make_fixed_writer_1checked_write_fixed = {"checked_write_fixed", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17make_fixed_writer_1checked_write_fixed, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17make_fixed_writer_1checked_write_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checked_write_fixed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checked_write_fixed", 1, 2, 2, 1); __PYX_ERR(0, 584, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checked_write_fixed") < 0)) __PYX_ERR(0, 584, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checked_write_fixed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 584, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_writer.checked_write_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17make_fixed_writer_checked_write_fixed(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17make_fixed_writer_checked_write_fixed(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *__pyx_cur_scope;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("checked_write_fixed", 0);
  __pyx_outer_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "spavro/fast_binary.pyx":585
 *     # has no such limitation
 *     def checked_write_fixed(outbuf, datum):
 *         if len(datum) != size:             # <<<<<<<<<<<<<<
 *             raise TypeError("Size Mismatch for Fixed data")
 *         write_fixed(outbuf, datum)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_datum); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 585, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != __pyx_cur_scope->__pyx_v_size) != 0);
  if (__pyx_t_2) {

    /* "spavro/fast_binary.pyx":586
 *     def checked_write_fixed(outbuf, datum):
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")             # <<<<<<<<<<<<<<
 *         write_fixed(outbuf, datum)
 *     return checked_write_fixed
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __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, 586, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":585
 *     # has no such limitation
 *     def checked_write_fixed(outbuf, datum):
 *         if len(datum) != size:             # <<<<<<<<<<<<<<
 *             raise TypeError("Size Mismatch for Fixed data")
 *         write_fixed(outbuf, datum)
 */
  }

  /* "spavro/fast_binary.pyx":587
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")
 *         write_fixed(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return checked_write_fixed
 * 
 */
  __pyx_f_6spavro_11fast_binary_write_fixed(__pyx_v_outbuf, __pyx_v_datum);

  /* "spavro/fast_binary.pyx":584
 *     # note: not a char* because those are null terminated and fixed
 *     # has no such limitation
 *     def checked_write_fixed(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_writer.checked_write_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":579
 * 
 * 
 * def make_fixed_writer(schema):             # <<<<<<<<<<<<<<
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_78make_fixed_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *__pyx_cur_scope;
  PyObject *__pyx_v_checked_write_fixed = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  __Pyx_RefNannySetupContext("make_fixed_writer", 0);
  __pyx_cur_scope = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *)__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer(__pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 579, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "spavro/fast_binary.pyx":581
 * def make_fixed_writer(schema):
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']             # <<<<<<<<<<<<<<
 *     # note: not a char* because those are null terminated and fixed
 *     # has no such limitation
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_v_schema, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_cur_scope->__pyx_v_size = __pyx_t_2;

  /* "spavro/fast_binary.pyx":584
 *     # note: not a char* because those are null terminated and fixed
 *     # has no such limitation
 *     def checked_write_fixed(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_fixed_writer_1checked_write_fixed, 0, __pyx_n_s_make_fixed_writer_locals_checked, ((PyObject*)__pyx_cur_scope), __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_checked_write_fixed = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":588
 *             raise TypeError("Size Mismatch for Fixed data")
 *         write_fixed(outbuf, datum)
 *     return checked_write_fixed             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_checked_write_fixed);
  __pyx_r = __pyx_v_checked_write_fixed;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":579
 * 
 * 
 * def make_fixed_writer(schema):             # <<<<<<<<<<<<<<
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_fixed_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_checked_write_fixed);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":591
 * 
 * 
 * def make_int_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_81make_int_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_80make_int_writer[] = "Create a int writer, adds a validation step before the actual\n    write function to make sure the int value doesn't overflow";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_81make_int_writer = {"make_int_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_81make_int_writer, METH_O, __pyx_doc_6spavro_11fast_binary_80make_int_writer};
static PyObject *__pyx_pw_6spavro_11fast_binary_81make_int_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_int_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_80make_int_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":594
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_int_writer_1checked_int_write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_15make_int_writer_1checked_int_write = {"checked_int_write", (PyCFunction)__pyx_pw_6spavro_11fast_binary_15make_int_writer_1checked_int_write, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_15make_int_writer_1checked_int_write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checked_int_write (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checked_int_write", 1, 2, 2, 1); __PYX_ERR(0, 594, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checked_int_write") < 0)) __PYX_ERR(0, 594, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checked_int_write", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 594, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_int_writer.checked_int_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_15make_int_writer_checked_int_write(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_15make_int_writer_checked_int_write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("checked_int_write", 0);

  /* "spavro/fast_binary.pyx":595
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)             # <<<<<<<<<<<<<<
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_datum, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }

  /* "spavro/fast_binary.pyx":596
 *     def checked_int_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):             # <<<<<<<<<<<<<<
 *             raise TypeError("Non integer value or overflow")
 *         write_long(outbuf, datum)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_INT_MIN_VALUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_datum, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_INT_MAX_VALUE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_datum, __pyx_t_6, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;

  /* "spavro/fast_binary.pyx":595
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)             # <<<<<<<<<<<<<<
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 */
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "spavro/fast_binary.pyx":597
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")             # <<<<<<<<<<<<<<
 *         write_long(outbuf, datum)
 *     return checked_int_write
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 597, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":595
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)             # <<<<<<<<<<<<<<
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 */
  }

  /* "spavro/fast_binary.pyx":598
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 *         write_long(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return checked_int_write
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_v_datum};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_v_datum};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_outbuf);
    __Pyx_INCREF(__pyx_v_datum);
    __Pyx_GIVEREF(__pyx_v_datum);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_datum);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":594
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_int_writer.checked_int_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":591
 * 
 * 
 * def make_int_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_80make_int_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_checked_int_write = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_int_writer", 0);

  /* "spavro/fast_binary.pyx":594
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_int_writer_1checked_int_write, 0, __pyx_n_s_make_int_writer_locals_checked_i, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_checked_int_write = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":599
 *             raise TypeError("Non integer value or overflow")
 *         write_long(outbuf, datum)
 *     return checked_int_write             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_checked_int_write);
  __pyx_r = __pyx_v_checked_int_write;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":591
 * 
 * 
 * def make_int_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_int_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_checked_int_write);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":602
 * 
 * 
 * def make_long_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_83make_long_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_82make_long_writer[] = "Create a long writer, adds a validation step before the actual\n    write function to make sure the long value doesn't overflow";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_83make_long_writer = {"make_long_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_83make_long_writer, METH_O, __pyx_doc_6spavro_11fast_binary_82make_long_writer};
static PyObject *__pyx_pw_6spavro_11fast_binary_83make_long_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_long_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_82make_long_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":605
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_long_writer_1checked_long_write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_16make_long_writer_1checked_long_write = {"checked_long_write", (PyCFunction)__pyx_pw_6spavro_11fast_binary_16make_long_writer_1checked_long_write, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_16make_long_writer_1checked_long_write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checked_long_write (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checked_long_write", 1, 2, 2, 1); __PYX_ERR(0, 605, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checked_long_write") < 0)) __PYX_ERR(0, 605, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checked_long_write", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_long_writer.checked_long_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_16make_long_writer_checked_long_write(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_16make_long_writer_checked_long_write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("checked_long_write", 0);

  /* "spavro/fast_binary.pyx":606
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)             # <<<<<<<<<<<<<<
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_datum, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }

  /* "spavro/fast_binary.pyx":607
 *     def checked_long_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):             # <<<<<<<<<<<<<<
 *             raise TypeError("Non integer value or overflow")
 *         write_long(outbuf, datum)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LONG_MIN_VALUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_datum, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_LONG_MAX_VALUE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_datum, __pyx_t_6, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;

  /* "spavro/fast_binary.pyx":606
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)             # <<<<<<<<<<<<<<
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 */
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "spavro/fast_binary.pyx":608
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")             # <<<<<<<<<<<<<<
 *         write_long(outbuf, datum)
 *     return checked_long_write
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 608, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":606
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):
 *         if not (isinstance(datum, six.integer_types)             # <<<<<<<<<<<<<<
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 */
  }

  /* "spavro/fast_binary.pyx":609
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")
 *         write_long(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return checked_long_write
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_v_datum};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_outbuf, __pyx_v_datum};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outbuf);
    __Pyx_GIVEREF(__pyx_v_outbuf);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_outbuf);
    __Pyx_INCREF(__pyx_v_datum);
    __Pyx_GIVEREF(__pyx_v_datum);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_datum);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":605
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.make_long_writer.checked_long_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":602
 * 
 * 
 * def make_long_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_82make_long_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_checked_long_write = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_long_writer", 0);

  /* "spavro/fast_binary.pyx":605
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_16make_long_writer_1checked_long_write, 0, __pyx_n_s_make_long_writer_locals_checked, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_checked_long_write = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":610
 *             raise TypeError("Non integer value or overflow")
 *         write_long(outbuf, datum)
 *     return checked_long_write             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_checked_long_write);
  __pyx_r = __pyx_v_checked_long_write;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":602
 * 
 * 
 * def make_long_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_long_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_checked_long_write);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":613
 * 
 * 
 * def make_string_writer(schema):             # <<<<<<<<<<<<<<
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_85make_string_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_85make_string_writer = {"make_string_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_85make_string_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_85make_string_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_string_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_84make_string_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

/* "spavro/fast_binary.pyx":614
 * 
 * def make_string_writer(schema):
 *     def checked_string_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_string_writer_1checked_string_writer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_18make_string_writer_1checked_string_writer = {"checked_string_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_18make_string_writer_1checked_string_writer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_18make_string_writer_1checked_string_writer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checked_string_writer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checked_string_writer", 1, 2, 2, 1); __PYX_ERR(0, 614, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checked_string_writer") < 0)) __PYX_ERR(0, 614, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checked_string_writer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 614, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.make_string_writer.checked_string_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_18make_string_writer_checked_string_writer(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_18make_string_writer_checked_string_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("checked_string_writer", 0);

  /* "spavro/fast_binary.pyx":615
 * def make_string_writer(schema):
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):             # <<<<<<<<<<<<<<
 *             raise TypeError("Non string value")
 *         write_utf8(outbuf, datum)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_string_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_datum, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
  if (__pyx_t_4) {

    /* "spavro/fast_binary.pyx":616
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")             # <<<<<<<<<<<<<<
 *         write_utf8(outbuf, datum)
 *     return checked_string_writer
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 616, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":615
 * def make_string_writer(schema):
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):             # <<<<<<<<<<<<<<
 *             raise TypeError("Non string value")
 *         write_utf8(outbuf, datum)
 */
  }

  /* "spavro/fast_binary.pyx":617
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")
 *         write_utf8(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return checked_string_writer
 * 
 */
  __pyx_f_6spavro_11fast_binary_write_utf8(__pyx_v_outbuf, __pyx_v_datum);

  /* "spavro/fast_binary.pyx":614
 * 
 * def make_string_writer(schema):
 *     def checked_string_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.make_string_writer.checked_string_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":613
 * 
 * 
 * def make_string_writer(schema):             # <<<<<<<<<<<<<<
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 */

static PyObject *__pyx_pf_6spavro_11fast_binary_84make_string_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_checked_string_writer = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_string_writer", 0);

  /* "spavro/fast_binary.pyx":614
 * 
 * def make_string_writer(schema):
 *     def checked_string_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_18make_string_writer_1checked_string_writer, 0, __pyx_n_s_make_string_writer_locals_checke, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_checked_string_writer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":618
 *             raise TypeError("Non string value")
 *         write_utf8(outbuf, datum)
 *     return checked_string_writer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_checked_string_writer);
  __pyx_r = __pyx_v_checked_string_writer;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":613
 * 
 * 
 * def make_string_writer(schema):             # <<<<<<<<<<<<<<
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.make_string_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_checked_string_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":621
 * 
 * 
 * def make_byte_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_bytes
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_87make_byte_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_87make_byte_writer = {"make_byte_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_87make_byte_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_87make_byte_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_byte_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_86make_byte_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_86make_byte_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_byte_writer", 0);

  /* "spavro/fast_binary.pyx":622
 * 
 * def make_byte_writer(schema):
 *     return write_bytes             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_6spavro_11fast_binary_write_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":621
 * 
 * 
 * def make_byte_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_bytes
 * 
 */

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

/* "spavro/fast_binary.pyx":625
 * 
 * 
 * def make_float_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_float
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_89make_float_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_89make_float_writer = {"make_float_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_89make_float_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_89make_float_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_float_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_88make_float_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_88make_float_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_float_writer", 0);

  /* "spavro/fast_binary.pyx":626
 * 
 * def make_float_writer(schema):
 *     return write_float             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_void____object____float___to_py(__pyx_f_6spavro_11fast_binary_write_float); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":625
 * 
 * 
 * def make_float_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_float
 * 
 */

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

/* "spavro/fast_binary.pyx":629
 * 
 * 
 * def make_double_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_double
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_91make_double_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_91make_double_writer = {"make_double_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_91make_double_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_91make_double_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_double_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_90make_double_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_90make_double_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_double_writer", 0);

  /* "spavro/fast_binary.pyx":630
 * 
 * def make_double_writer(schema):
 *     return write_double             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_void____object____double___to_py(__pyx_f_6spavro_11fast_binary_write_double); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":629
 * 
 * 
 * def make_double_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_double
 * 
 */

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

/* "spavro/fast_binary.pyx":633
 * 
 * 
 * def make_null_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_null
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_93make_null_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_93make_null_writer = {"make_null_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_93make_null_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_93make_null_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_null_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_92make_null_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_92make_null_writer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("make_null_writer", 0);

  /* "spavro/fast_binary.pyx":634
 * 
 * def make_null_writer(schema):
 *     return write_null             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_6spavro_11fast_binary_write_null); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":633
 * 
 * 
 * def make_null_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_null
 * 
 */

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

/* "spavro/fast_binary.pyx":657
 * 
 * class WriterPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.writer = None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17WriterPlaceholder_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17WriterPlaceholder_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17WriterPlaceholder_1__init__, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17WriterPlaceholder_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17WriterPlaceholder___init__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17WriterPlaceholder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "spavro/fast_binary.pyx":658
 * class WriterPlaceholder(object):
 *     def __init__(self):
 *         self.writer = None             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, fo, val):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_writer, Py_None) < 0) __PYX_ERR(0, 658, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":657
 * 
 * class WriterPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.writer = None
 * 
 */

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

/* "spavro/fast_binary.pyx":660
 *         self.writer = None
 * 
 *     def __call__(self, fo, val):             # <<<<<<<<<<<<<<
 *         return self.writer(fo, val)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17WriterPlaceholder_3__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17WriterPlaceholder_3__call__ = {"__call__", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17WriterPlaceholder_3__call__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17WriterPlaceholder_3__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fo = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fo,&__pyx_n_s_val,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 660, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 660, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 660, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_fo = values[1];
    __pyx_v_val = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 660, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.WriterPlaceholder.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17WriterPlaceholder_2__call__(__pyx_self, __pyx_v_self, __pyx_v_fo, __pyx_v_val);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17WriterPlaceholder_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fo, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "spavro/fast_binary.pyx":661
 * 
 *     def __call__(self, fo, val):
 *         return self.writer(fo, val)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __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;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_fo, __pyx_v_val};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_fo, __pyx_v_val};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_fo);
    __Pyx_GIVEREF(__pyx_v_fo);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_fo);
    __Pyx_INCREF(__pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_val);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":660
 *         self.writer = None
 * 
 *     def __call__(self, fo, val):             # <<<<<<<<<<<<<<
 *         return self.writer(fo, val)
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("spavro.fast_binary.WriterPlaceholder.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":664
 * 
 * 
 * def get_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_95get_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_95get_writer = {"get_writer", (PyCFunction)__pyx_pw_6spavro_11fast_binary_95get_writer, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_95get_writer(PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_writer (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_94get_writer(__pyx_self, ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_94get_writer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_v_schema_type = 0;
  PyObject *__pyx_v_placeholder = NULL;
  PyObject *__pyx_v_namespace = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_fullname = NULL;
  PyObject *__pyx_v_writer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("get_writer", 0);

  /* "spavro/fast_binary.pyx":665
 * 
 * def get_writer(schema):
 *     cdef unicode schema_type = get_type(schema)             # <<<<<<<<<<<<<<
 *     if schema_type in ('record', 'fixed', 'enum'):
 *         placeholder = WriterPlaceholder()
 */
  __pyx_t_1 = __pyx_f_6spavro_11fast_binary_get_type(__pyx_v_schema, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_schema_type = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":666
 * def get_writer(schema):
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):             # <<<<<<<<<<<<<<
 *         placeholder = WriterPlaceholder()
 *         # using a placeholder because this is recursive and the reader isn't defined
 */
  __Pyx_INCREF(__pyx_v_schema_type);
  __pyx_t_2 = __pyx_v_schema_type;
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_s_record, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 666, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_s_fixed, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 666, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_s_enum, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 666, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_3 != 0);
  if (__pyx_t_5) {

    /* "spavro/fast_binary.pyx":667
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 *         placeholder = WriterPlaceholder()             # <<<<<<<<<<<<<<
 *         # using a placeholder because this is recursive and the reader isn't defined
 *         # yet and nested records might refer to this parent schema name
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_WriterPlaceholder); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    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);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_placeholder = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":670
 *         # using a placeholder because this is recursive and the reader isn't defined
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')             # <<<<<<<<<<<<<<
 *         name = schema.get('name')
 *         if namespace:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_namespace = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":671
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')
 *         name = schema.get('name')             # <<<<<<<<<<<<<<
 *         if namespace:
 *            fullname = '.'.join([namespace, name])
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_name = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "spavro/fast_binary.pyx":672
 *         namespace = schema.get('namespace')
 *         name = schema.get('name')
 *         if namespace:             # <<<<<<<<<<<<<<
 *            fullname = '.'.join([namespace, name])
 *         else:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_namespace); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 672, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "spavro/fast_binary.pyx":673
 *         name = schema.get('name')
 *         if namespace:
 *            fullname = '.'.join([namespace, name])             # <<<<<<<<<<<<<<
 *         else:
 *             fullname = name
 */
      __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_namespace);
      __Pyx_GIVEREF(__pyx_v_namespace);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_namespace);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
      __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_fullname = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "spavro/fast_binary.pyx":672
 *         namespace = schema.get('namespace')
 *         name = schema.get('name')
 *         if namespace:             # <<<<<<<<<<<<<<
 *            fullname = '.'.join([namespace, name])
 *         else:
 */
      goto __pyx_L7;
    }

    /* "spavro/fast_binary.pyx":675
 *            fullname = '.'.join([namespace, name])
 *         else:
 *             fullname = name             # <<<<<<<<<<<<<<
 *         schema_cache[fullname] = placeholder
 *         writer = writer_type_map[schema_type](schema)
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_name);
      __pyx_v_fullname = __pyx_v_name;
    }
    __pyx_L7:;

    /* "spavro/fast_binary.pyx":676
 *         else:
 *             fullname = name
 *         schema_cache[fullname] = placeholder             # <<<<<<<<<<<<<<
 *         writer = writer_type_map[schema_type](schema)
 *         # now that we've returned, assign the reader to the placeholder
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_schema_cache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_fullname, __pyx_v_placeholder) < 0)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":677
 *             fullname = name
 *         schema_cache[fullname] = placeholder
 *         writer = writer_type_map[schema_type](schema)             # <<<<<<<<<<<<<<
 *         # now that we've returned, assign the reader to the placeholder
 *         # so that the execution will work
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_writer_type_map); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_schema_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_schema};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_schema};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 677, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_schema);
        __Pyx_GIVEREF(__pyx_v_schema);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_schema);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_writer = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "spavro/fast_binary.pyx":680
 *         # now that we've returned, assign the reader to the placeholder
 *         # so that the execution will work
 *         placeholder.writer = writer             # <<<<<<<<<<<<<<
 *         return writer
 *     try:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_placeholder, __pyx_n_s_writer, __pyx_v_writer) < 0) __PYX_ERR(0, 680, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":681
 *         # so that the execution will work
 *         placeholder.writer = writer
 *         return writer             # <<<<<<<<<<<<<<
 *     try:
 *         writer = writer_type_map[schema_type](schema)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_writer);
    __pyx_r = __pyx_v_writer;
    goto __pyx_L0;

    /* "spavro/fast_binary.pyx":666
 * def get_writer(schema):
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):             # <<<<<<<<<<<<<<
 *         placeholder = WriterPlaceholder()
 *         # using a placeholder because this is recursive and the reader isn't defined
 */
  }

  /* "spavro/fast_binary.pyx":682
 *         placeholder.writer = writer
 *         return writer
 *     try:             # <<<<<<<<<<<<<<
 *         writer = writer_type_map[schema_type](schema)
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "spavro/fast_binary.pyx":683
 *         return writer
 *     try:
 *         writer = writer_type_map[schema_type](schema)             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         writer = schema_cache[schema_type]
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_writer_type_map); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_schema_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L8_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_schema};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L8_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_v_schema);
          __Pyx_GIVEREF(__pyx_v_schema);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_schema);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_writer = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "spavro/fast_binary.pyx":682
 *         placeholder.writer = writer
 *         return writer
 *     try:             # <<<<<<<<<<<<<<
 *         writer = writer_type_map[schema_type](schema)
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "spavro/fast_binary.pyx":684
 *     try:
 *         writer = writer_type_map[schema_type](schema)
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         writer = schema_cache[schema_type]
 * 
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("spavro.fast_binary.get_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(0, 684, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_1);

      /* "spavro/fast_binary.pyx":685
 *         writer = writer_type_map[schema_type](schema)
 *     except KeyError:
 *         writer = schema_cache[schema_type]             # <<<<<<<<<<<<<<
 * 
 *     return writer
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_schema_cache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 685, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_13 = PyObject_GetItem(__pyx_t_7, __pyx_v_schema_type); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 685, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_writer, __pyx_t_13);
      __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L9_exception_handled;
    }
    goto __pyx_L10_except_error;
    __pyx_L10_except_error:;

    /* "spavro/fast_binary.pyx":682
 *         placeholder.writer = writer
 *         return writer
 *     try:             # <<<<<<<<<<<<<<
 *         writer = writer_type_map[schema_type](schema)
 *     except KeyError:
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    __pyx_L15_try_end:;
  }

  /* "spavro/fast_binary.pyx":687
 *         writer = schema_cache[schema_type]
 * 
 *     return writer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_writer);
  __pyx_r = __pyx_v_writer;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":664
 * 
 * 
 * def get_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("spavro.fast_binary.get_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_schema_type);
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XDECREF(__pyx_v_namespace);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_fullname);
  __Pyx_XDECREF(__pyx_v_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":699
 * class FastBinaryEncoder(object):
 *     """Write leaf values."""
 *     def __init__(self, writer):             # <<<<<<<<<<<<<<
 *         """
 *         writer is a Python object on which we can call write.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_17FastBinaryEncoder___init__[] = "\n        writer is a Python object on which we can call write.\n        ";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6spavro_11fast_binary_17FastBinaryEncoder___init__};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_writer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_writer,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_writer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 699, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 699, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_writer = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 699, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder___init__(__pyx_self, __pyx_v_self, __pyx_v_writer);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_writer) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "spavro/fast_binary.pyx":703
 *         writer is a Python object on which we can call write.
 *         """
 *         self.writer = writer             # <<<<<<<<<<<<<<
 * 
 *     def write(self, datum):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_writer, __pyx_v_writer) < 0) __PYX_ERR(0, 703, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":699
 * class FastBinaryEncoder(object):
 *     """Write leaf values."""
 *     def __init__(self, writer):             # <<<<<<<<<<<<<<
 *         """
 *         writer is a Python object on which we can call write.
 */

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

/* "spavro/fast_binary.pyx":705
 *         self.writer = writer
 * 
 *     def write(self, datum):             # <<<<<<<<<<<<<<
 *         self.writer.write(datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_3write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_3write = {"write", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_3write, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_3write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write", 1, 2, 2, 1); __PYX_ERR(0, 705, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) __PYX_ERR(0, 705, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 705, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_2write(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  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;
  __Pyx_RefNannySetupContext("write", 0);

  /* "spavro/fast_binary.pyx":706
 * 
 *     def write(self, datum):
 *         self.writer.write(datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_null(self, datum):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_datum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_datum};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_datum);
      __Pyx_GIVEREF(__pyx_v_datum);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_datum);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":705
 *         self.writer = writer
 * 
 *     def write(self, datum):             # <<<<<<<<<<<<<<
 *         self.writer.write(datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":708
 *         self.writer.write(datum)
 * 
 *     def write_null(self, datum):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_5write_null(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_5write_null = {"write_null", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_5write_null, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_5write_null(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_null (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_null", 1, 2, 2, 1); __PYX_ERR(0, 708, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_null") < 0)) __PYX_ERR(0, 708, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_null", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 708, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_4write_null(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_4write_null(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_null", 0);

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

/* "spavro/fast_binary.pyx":711
 *         pass
 * 
 *     def write_boolean(self, datum):             # <<<<<<<<<<<<<<
 *         write_boolean(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_7write_boolean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_7write_boolean = {"write_boolean", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_7write_boolean, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_7write_boolean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_boolean (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_boolean", 1, 2, 2, 1); __PYX_ERR(0, 711, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_boolean") < 0)) __PYX_ERR(0, 711, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_boolean", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 711, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_boolean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_6write_boolean(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_6write_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("write_boolean", 0);

  /* "spavro/fast_binary.pyx":712
 * 
 *     def write_boolean(self, datum):
 *         write_boolean(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_int(self, datum):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_char(__pyx_v_datum); if (unlikely((__pyx_t_2 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6spavro_11fast_binary_write_boolean(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spavro/fast_binary.pyx":711
 *         pass
 * 
 *     def write_boolean(self, datum):             # <<<<<<<<<<<<<<
 *         write_boolean(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_boolean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":714
 *         write_boolean(self.writer, datum)
 * 
 *     def write_int(self, datum):             # <<<<<<<<<<<<<<
 *         write_int(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_9write_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_9write_int = {"write_int", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_9write_int, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_9write_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_int (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_int", 1, 2, 2, 1); __PYX_ERR(0, 714, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_int") < 0)) __PYX_ERR(0, 714, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_int", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 714, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_8write_int(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_8write_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PY_LONG_LONG __pyx_t_2;
  __Pyx_RefNannySetupContext("write_int", 0);

  /* "spavro/fast_binary.pyx":715
 * 
 *     def write_int(self, datum):
 *         write_int(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_long(self, datum):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_datum); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L1_error)
  __pyx_f_6spavro_11fast_binary_write_int(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":714
 *         write_boolean(self.writer, datum)
 * 
 *     def write_int(self, datum):             # <<<<<<<<<<<<<<
 *         write_int(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":717
 *         write_int(self.writer, datum)
 * 
 *     def write_long(self, datum):             # <<<<<<<<<<<<<<
 *         write_long(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_11write_long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_11write_long = {"write_long", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_11write_long, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_11write_long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_long (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_long", 1, 2, 2, 1); __PYX_ERR(0, 717, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_long") < 0)) __PYX_ERR(0, 717, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_long", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 717, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_10write_long(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_10write_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("write_long", 0);

  /* "spavro/fast_binary.pyx":718
 * 
 *     def write_long(self, datum):
 *         write_long(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_float(self, datum):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_write_long); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_datum};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_datum};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_datum);
    __Pyx_GIVEREF(__pyx_v_datum);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_datum);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":717
 *         write_int(self.writer, datum)
 * 
 *     def write_long(self, datum):             # <<<<<<<<<<<<<<
 *         write_long(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":720
 *         write_long(self.writer, datum)
 * 
 *     def write_float(self, datum):             # <<<<<<<<<<<<<<
 *         write_float(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_13write_float(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_13write_float = {"write_float", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_13write_float, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_13write_float(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_float (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_float", 1, 2, 2, 1); __PYX_ERR(0, 720, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_float") < 0)) __PYX_ERR(0, 720, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_float", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 720, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_12write_float(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_12write_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  __Pyx_RefNannySetupContext("write_float", 0);

  /* "spavro/fast_binary.pyx":721
 * 
 *     def write_float(self, datum):
 *         write_float(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_double(self, datum):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_datum); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L1_error)
  __pyx_f_6spavro_11fast_binary_write_float(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":720
 *         write_long(self.writer, datum)
 * 
 *     def write_float(self, datum):             # <<<<<<<<<<<<<<
 *         write_float(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":723
 *         write_float(self.writer, datum)
 * 
 *     def write_double(self, datum):             # <<<<<<<<<<<<<<
 *         write_double(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_15write_double(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_15write_double = {"write_double", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_15write_double, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_15write_double(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_double (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_double", 1, 2, 2, 1); __PYX_ERR(0, 723, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_double") < 0)) __PYX_ERR(0, 723, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_double", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 723, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_14write_double(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_14write_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  __Pyx_RefNannySetupContext("write_double", 0);

  /* "spavro/fast_binary.pyx":724
 * 
 *     def write_double(self, datum):
 *         write_double(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_bytes(self, datum):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_datum); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error)
  __pyx_f_6spavro_11fast_binary_write_double(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":723
 *         write_float(self.writer, datum)
 * 
 *     def write_double(self, datum):             # <<<<<<<<<<<<<<
 *         write_double(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":726
 *         write_double(self.writer, datum)
 * 
 *     def write_bytes(self, datum):             # <<<<<<<<<<<<<<
 *         write_bytes(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_17write_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_17write_bytes = {"write_bytes", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_17write_bytes, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_17write_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_bytes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_bytes", 1, 2, 2, 1); __PYX_ERR(0, 726, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_bytes") < 0)) __PYX_ERR(0, 726, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_bytes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 726, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_16write_bytes(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_16write_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("write_bytes", 0);

  /* "spavro/fast_binary.pyx":727
 * 
 *     def write_bytes(self, datum):
 *         write_bytes(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_utf8(self, datum):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_f_6spavro_11fast_binary_write_bytes(__pyx_t_1, __pyx_v_datum);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":726
 *         write_double(self.writer, datum)
 * 
 *     def write_bytes(self, datum):             # <<<<<<<<<<<<<<
 *         write_bytes(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":729
 *         write_bytes(self.writer, datum)
 * 
 *     def write_utf8(self, datum):             # <<<<<<<<<<<<<<
 *         write_utf8(self.writer, datum)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_19write_utf8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_19write_utf8 = {"write_utf8", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_19write_utf8, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_19write_utf8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_utf8 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_utf8", 1, 2, 2, 1); __PYX_ERR(0, 729, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_utf8") < 0)) __PYX_ERR(0, 729, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_utf8", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 729, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_18write_utf8(__pyx_self, __pyx_v_self, __pyx_v_datum);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_18write_utf8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("write_utf8", 0);

  /* "spavro/fast_binary.pyx":730
 * 
 *     def write_utf8(self, datum):
 *         write_utf8(self.writer, datum)             # <<<<<<<<<<<<<<
 * 
 *     def write_crc32(self, bytes):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_f_6spavro_11fast_binary_write_utf8(__pyx_t_1, __pyx_v_datum);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":729
 *         write_bytes(self.writer, datum)
 * 
 *     def write_utf8(self, datum):             # <<<<<<<<<<<<<<
 *         write_utf8(self.writer, datum)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":732
 *         write_utf8(self.writer, datum)
 * 
 *     def write_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         """
 *         A 4-byte, big-endian CRC32 checksum
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_21write_crc32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_17FastBinaryEncoder_20write_crc32[] = "\n        A 4-byte, big-endian CRC32 checksum\n        ";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_21write_crc32 = {"write_crc32", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_21write_crc32, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6spavro_11fast_binary_17FastBinaryEncoder_20write_crc32};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryEncoder_21write_crc32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_bytes = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_crc32 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_bytes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_crc32", 1, 2, 2, 1); __PYX_ERR(0, 732, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_crc32") < 0)) __PYX_ERR(0, 732, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_bytes = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_crc32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 732, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_crc32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_20write_crc32(__pyx_self, __pyx_v_self, __pyx_v_bytes);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryEncoder_20write_crc32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bytes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("write_crc32", 0);

  /* "spavro/fast_binary.pyx":736
 *         A 4-byte, big-endian CRC32 checksum
 *         """
 *         self.writer.write(struct.pack("!I", crc32(bytes) & 0xffffffff))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_struct); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_crc32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_bytes};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_bytes};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_bytes);
      __Pyx_GIVEREF(__pyx_v_bytes);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_bytes);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_And(__pyx_t_4, __pyx_int_4294967295); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_I, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_I, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_s_I);
    __Pyx_GIVEREF(__pyx_kp_s_I);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_kp_s_I);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":732
 *         write_utf8(self.writer, datum)
 * 
 *     def write_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         """
 *         A 4-byte, big-endian CRC32 checksum
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryEncoder.write_crc32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":742
 * class FastBinaryDecoder(object):
 *     """Read leaf values."""
 *     def __init__(self, reader):             # <<<<<<<<<<<<<<
 *         """
 *         reader is a Python object on which we can call read, seek, and tell.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6spavro_11fast_binary_17FastBinaryDecoder___init__[] = "\n        reader is a Python object on which we can call read, seek, and tell.\n        ";
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6spavro_11fast_binary_17FastBinaryDecoder___init__};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_reader = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 742, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 742, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 742, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder___init__(__pyx_self, __pyx_v_self, __pyx_v_reader);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reader) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "spavro/fast_binary.pyx":746
 *         reader is a Python object on which we can call read, seek, and tell.
 *         """
 *         self.reader = reader             # <<<<<<<<<<<<<<
 * 
 *     def read(self, n):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reader, __pyx_v_reader) < 0) __PYX_ERR(0, 746, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":742
 * class FastBinaryDecoder(object):
 *     """Read leaf values."""
 *     def __init__(self, reader):             # <<<<<<<<<<<<<<
 *         """
 *         reader is a Python object on which we can call read, seek, and tell.
 */

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

/* "spavro/fast_binary.pyx":748
 *         self.reader = reader
 * 
 *     def read(self, n):             # <<<<<<<<<<<<<<
 *         return self.reader.read(n)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_3read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_3read = {"read", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_3read, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_3read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read", 1, 2, 2, 1); __PYX_ERR(0, 748, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 748, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 748, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_2read(__pyx_self, __pyx_v_self, __pyx_v_n);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_2read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  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;
  __Pyx_RefNannySetupContext("read", 0);

  /* "spavro/fast_binary.pyx":749
 * 
 *     def read(self, n):
 *         return self.reader.read(n)             # <<<<<<<<<<<<<<
 * 
 *     def read_null(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_n};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_n};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_n);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":748
 *         self.reader = reader
 * 
 *     def read(self, n):             # <<<<<<<<<<<<<<
 *         return self.reader.read(n)
 * 
 */

  /* 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("spavro.fast_binary.FastBinaryDecoder.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":751
 *         return self.reader.read(n)
 * 
 *     def read_null(self):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_5read_null(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_5read_null = {"read_null", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_5read_null, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_5read_null(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_null (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_4read_null(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_4read_null(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_null", 0);

  /* "spavro/fast_binary.pyx":752
 * 
 *     def read_null(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     def read_boolean(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":751
 *         return self.reader.read(n)
 * 
 *     def read_null(self):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */

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

/* "spavro/fast_binary.pyx":754
 *         return None
 * 
 *     def read_boolean(self):             # <<<<<<<<<<<<<<
 *         return read_boolean(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_7read_boolean(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_7read_boolean = {"read_boolean", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_7read_boolean, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_7read_boolean(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_boolean (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_6read_boolean(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_6read_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("read_boolean", 0);

  /* "spavro/fast_binary.pyx":755
 * 
 *     def read_boolean(self):
 *         return read_boolean(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def read_int(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_read_boolean); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spavro/fast_binary.pyx":754
 *         return None
 * 
 *     def read_boolean(self):             # <<<<<<<<<<<<<<
 *         return read_boolean(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_boolean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":757
 *         return read_boolean(self.reader)
 * 
 *     def read_int(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_9read_int(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_9read_int = {"read_int", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_9read_int, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_9read_int(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_int (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_8read_int(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_8read_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_int", 0);

  /* "spavro/fast_binary.pyx":758
 * 
 *     def read_int(self):
 *         return read_long(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def read_long(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_f_6spavro_11fast_binary_read_long(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __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;

  /* "spavro/fast_binary.pyx":757
 *         return read_boolean(self.reader)
 * 
 *     def read_int(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":760
 *         return read_long(self.reader)
 * 
 *     def read_long(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_11read_long(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_11read_long = {"read_long", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_11read_long, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_11read_long(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_long (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_10read_long(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_10read_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_long", 0);

  /* "spavro/fast_binary.pyx":761
 * 
 *     def read_long(self):
 *         return read_long(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def read_float(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_f_6spavro_11fast_binary_read_long(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __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;

  /* "spavro/fast_binary.pyx":760
 *         return read_long(self.reader)
 * 
 *     def read_long(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":763
 *         return read_long(self.reader)
 * 
 *     def read_float(self):             # <<<<<<<<<<<<<<
 *         return read_float(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_13read_float(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_13read_float = {"read_float", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_13read_float, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_13read_float(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_float (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_12read_float(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_12read_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_float", 0);

  /* "spavro/fast_binary.pyx":764
 * 
 *     def read_float(self):
 *         return read_float(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def read_double(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_f_6spavro_11fast_binary_read_float(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __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;

  /* "spavro/fast_binary.pyx":763
 *         return read_long(self.reader)
 * 
 *     def read_float(self):             # <<<<<<<<<<<<<<
 *         return read_float(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":766
 *         return read_float(self.reader)
 * 
 *     def read_double(self):             # <<<<<<<<<<<<<<
 *         return read_double(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_15read_double(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_15read_double = {"read_double", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_15read_double, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_15read_double(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_double (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_14read_double(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_14read_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_double", 0);

  /* "spavro/fast_binary.pyx":767
 * 
 *     def read_double(self):
 *         return read_double(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def read_bytes(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_f_6spavro_11fast_binary_read_double(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __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;

  /* "spavro/fast_binary.pyx":766
 *         return read_float(self.reader)
 * 
 *     def read_double(self):             # <<<<<<<<<<<<<<
 *         return read_double(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":769
 *         return read_double(self.reader)
 * 
 *     def read_bytes(self):             # <<<<<<<<<<<<<<
 *         return read_bytes(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_17read_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_17read_bytes = {"read_bytes", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_17read_bytes, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_17read_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_bytes (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_16read_bytes(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_16read_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_bytes", 0);

  /* "spavro/fast_binary.pyx":770
 * 
 *     def read_bytes(self):
 *         return read_bytes(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def read_utf8(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6spavro_11fast_binary_read_bytes(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __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;

  /* "spavro/fast_binary.pyx":769
 *         return read_double(self.reader)
 * 
 *     def read_bytes(self):             # <<<<<<<<<<<<<<
 *         return read_bytes(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":772
 *         return read_bytes(self.reader)
 * 
 *     def read_utf8(self):             # <<<<<<<<<<<<<<
 *         return read_utf8(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_19read_utf8(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_19read_utf8 = {"read_utf8", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_19read_utf8, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_19read_utf8(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_utf8 (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_18read_utf8(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_18read_utf8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("read_utf8", 0);

  /* "spavro/fast_binary.pyx":773
 * 
 *     def read_utf8(self):
 *         return read_utf8(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def check_crc32(self, bytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6spavro_11fast_binary_read_utf8(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __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;

  /* "spavro/fast_binary.pyx":772
 *         return read_bytes(self.reader)
 * 
 *     def read_utf8(self):             # <<<<<<<<<<<<<<
 *         return read_utf8(self.reader)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.read_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":775
 *         return read_utf8(self.reader)
 * 
 *     def check_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_21check_crc32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_21check_crc32 = {"check_crc32", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_21check_crc32, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_21check_crc32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_bytes = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_crc32 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_bytes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("check_crc32", 1, 2, 2, 1); __PYX_ERR(0, 775, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "check_crc32") < 0)) __PYX_ERR(0, 775, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_bytes = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check_crc32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 775, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.check_crc32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_20check_crc32(__pyx_self, __pyx_v_self, __pyx_v_bytes);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_20check_crc32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bytes) {
  PyObject *__pyx_v_checksum = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("check_crc32", 0);

  /* "spavro/fast_binary.pyx":776
 * 
 *     def check_crc32(self, bytes):
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]             # <<<<<<<<<<<<<<
 *         if crc32(bytes) & 0xffffffff != checksum:
 *             raise RuntimeError("Checksum failure")
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_struct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unpack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_I, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_I, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_s_I);
    __Pyx_GIVEREF(__pyx_kp_s_I);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_s_I);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_checksum = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "spavro/fast_binary.pyx":777
 *     def check_crc32(self, bytes):
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Checksum failure")
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_crc32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_bytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_bytes};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_bytes};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v_bytes);
      __Pyx_GIVEREF(__pyx_v_bytes);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_bytes);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_4294967295); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_checksum, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "spavro/fast_binary.pyx":778
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:
 *             raise RuntimeError("Checksum failure")             # <<<<<<<<<<<<<<
 * 
 *     def skip_null(self):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __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, 778, __pyx_L1_error)

    /* "spavro/fast_binary.pyx":777
 *     def check_crc32(self, bytes):
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Checksum failure")
 * 
 */
  }

  /* "spavro/fast_binary.pyx":775
 *         return read_utf8(self.reader)
 * 
 *     def check_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.check_crc32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_checksum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":780
 *             raise RuntimeError("Checksum failure")
 * 
 *     def skip_null(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_23skip_null(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_23skip_null = {"skip_null", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_23skip_null, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_23skip_null(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_null (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_22skip_null(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_22skip_null(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_null", 0);

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

/* "spavro/fast_binary.pyx":783
 *         pass
 * 
 *     def skip_boolean(self):             # <<<<<<<<<<<<<<
 *         self.reader.read(1)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_25skip_boolean(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_25skip_boolean = {"skip_boolean", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_25skip_boolean, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_25skip_boolean(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_boolean (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_24skip_boolean(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_24skip_boolean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("skip_boolean", 0);

  /* "spavro/fast_binary.pyx":784
 * 
 *     def skip_boolean(self):
 *         self.reader.read(1)             # <<<<<<<<<<<<<<
 * 
 *     def skip_int(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __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;

  /* "spavro/fast_binary.pyx":783
 *         pass
 * 
 *     def skip_boolean(self):             # <<<<<<<<<<<<<<
 *         self.reader.read(1)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_boolean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":786
 *         self.reader.read(1)
 * 
 *     def skip_int(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_27skip_int(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_27skip_int = {"skip_int", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_27skip_int, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_27skip_int(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_int (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_26skip_int(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_26skip_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("skip_int", 0);

  /* "spavro/fast_binary.pyx":787
 * 
 *     def skip_int(self):
 *         read_long(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def skip_long(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_f_6spavro_11fast_binary_read_long(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":786
 *         self.reader.read(1)
 * 
 *     def skip_int(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":789
 *         read_long(self.reader)
 * 
 *     def skip_long(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_29skip_long(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_29skip_long = {"skip_long", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_29skip_long, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_29skip_long(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_long (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_28skip_long(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_28skip_long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("skip_long", 0);

  /* "spavro/fast_binary.pyx":790
 * 
 *     def skip_long(self):
 *         read_long(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def skip_float(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_f_6spavro_11fast_binary_read_long(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":789
 *         read_long(self.reader)
 * 
 *     def skip_long(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":792
 *         read_long(self.reader)
 * 
 *     def skip_float(self):             # <<<<<<<<<<<<<<
 *         read_float(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_31skip_float(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_31skip_float = {"skip_float", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_31skip_float, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_31skip_float(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_float (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_30skip_float(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_30skip_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("skip_float", 0);

  /* "spavro/fast_binary.pyx":793
 * 
 *     def skip_float(self):
 *         read_float(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def skip_double(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_f_6spavro_11fast_binary_read_float(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":792
 *         read_long(self.reader)
 * 
 *     def skip_float(self):             # <<<<<<<<<<<<<<
 *         read_float(self.reader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":795
 *         read_float(self.reader)
 * 
 *     def skip_double(self):             # <<<<<<<<<<<<<<
 *         read_double(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_33skip_double(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_33skip_double = {"skip_double", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_33skip_double, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_33skip_double(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_double (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_32skip_double(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_32skip_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("skip_double", 0);

  /* "spavro/fast_binary.pyx":796
 * 
 *     def skip_double(self):
 *         read_double(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def skip_bytes(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_f_6spavro_11fast_binary_read_double(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":795
 *         read_float(self.reader)
 * 
 *     def skip_double(self):             # <<<<<<<<<<<<<<
 *         read_double(self.reader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":798
 *         read_double(self.reader)
 * 
 *     def skip_bytes(self):             # <<<<<<<<<<<<<<
 *         read_bytes(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_35skip_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_35skip_bytes = {"skip_bytes", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_35skip_bytes, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_35skip_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_bytes (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_34skip_bytes(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_34skip_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("skip_bytes", 0);

  /* "spavro/fast_binary.pyx":799
 * 
 *     def skip_bytes(self):
 *         read_bytes(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def skip_utf8(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6spavro_11fast_binary_read_bytes(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __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;

  /* "spavro/fast_binary.pyx":798
 *         read_double(self.reader)
 * 
 *     def skip_bytes(self):             # <<<<<<<<<<<<<<
 *         read_bytes(self.reader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":801
 *         read_bytes(self.reader)
 * 
 *     def skip_utf8(self):             # <<<<<<<<<<<<<<
 *         read_utf8(self.reader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_37skip_utf8(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_37skip_utf8 = {"skip_utf8", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_37skip_utf8, METH_O, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_37skip_utf8(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip_utf8 (wrapper)", 0);
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_36skip_utf8(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_36skip_utf8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("skip_utf8", 0);

  /* "spavro/fast_binary.pyx":802
 * 
 *     def skip_utf8(self):
 *         read_utf8(self.reader)             # <<<<<<<<<<<<<<
 * 
 *     def skip(self, n):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6spavro_11fast_binary_read_utf8(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __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;

  /* "spavro/fast_binary.pyx":801
 *         read_bytes(self.reader)
 * 
 *     def skip_utf8(self):             # <<<<<<<<<<<<<<
 *         read_utf8(self.reader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spavro/fast_binary.pyx":804
 *         read_utf8(self.reader)
 * 
 *     def skip(self, n):             # <<<<<<<<<<<<<<
 *         self.reader.seek(self.reader.tell() + n)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_39skip(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_39skip = {"skip", (PyCFunction)__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_39skip, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6spavro_11fast_binary_17FastBinaryDecoder_39skip(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("skip", 1, 2, 2, 1); __PYX_ERR(0, 804, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "skip") < 0)) __PYX_ERR(0, 804, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("skip", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 804, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_38skip(__pyx_self, __pyx_v_self, __pyx_v_n);

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

static PyObject *__pyx_pf_6spavro_11fast_binary_17FastBinaryDecoder_38skip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("skip", 0);

  /* "spavro/fast_binary.pyx":805
 * 
 *     def skip(self, n):
 *         self.reader.seek(self.reader.tell() + n)             # <<<<<<<<<<<<<<
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_seek); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reader); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tell); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":804
 *         read_utf8(self.reader)
 * 
 *     def skip(self, n):             # <<<<<<<<<<<<<<
 *         self.reader.seek(self.reader.tell() + n)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spavro.fast_binary.FastBinaryDecoder.skip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):
 *     def wrap(object outbuf, long long signed_datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 *         f(outbuf, signed_datum)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_wrap[] = "wrap(outbuf, signed_datum: 'long long') -> 'void'";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PY_LONG_LONG __pyx_v_signed_datum;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_signed_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signed_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_signed_datum = __Pyx_PyInt_As_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_signed_datum == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____long__long___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_wrap(__pyx_self, __pyx_v_outbuf, __pyx_v_signed_datum);

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PY_LONG_LONG __pyx_v_signed_datum) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object outbuf, long long signed_datum):
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 *         f(outbuf, signed_datum)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __pyx_cur_scope->__pyx_v_f(__pyx_v_outbuf, __pyx_v_signed_datum); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):
 *     def wrap(object outbuf, long long signed_datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 *         f(outbuf, signed_datum)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____long__long___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, long long signed_datum):
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 */

static PyObject *__Pyx_CFunc_void____object____long__long___to_py(void (*__pyx_v_f)(PyObject *, PY_LONG_LONG)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____long__long___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):
 *     def wrap(object outbuf, long long signed_datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 *         f(outbuf, signed_datum)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_48__Pyx_CFunc_void____object____long__long___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____lo, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 *         f(outbuf, signed_datum)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, long long signed_datum):
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____long__long___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo)"""
 *         return f(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap[] = "wrap(fo)";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object fo):
 *         """wrap(fo)"""
 *         return f(fo)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo)"""
 *         return f(fo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo)"""
 */

static PyObject *__Pyx_CFunc_object____object___to_py(PyObject *(*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_object____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo)"""
 *         return f(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_36__Pyx_CFunc_object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_object____object___t, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(fo)"""
 *         return f(fo)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_object____object___to_py")
 * cdef object __Pyx_CFunc_object____object___to_py(object (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo)"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_unicode____object___to_py")
 * cdef object __Pyx_CFunc_unicode____object___to_py(unicode (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> unicode"""
 *         return f(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_wrap[] = "wrap(fo) -> unicode";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object fo):
 *         """wrap(fo) -> unicode"""
 *         return f(fo)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_unicode____object___to_py")
 * cdef object __Pyx_CFunc_unicode____object___to_py(unicode (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> unicode"""
 *         return f(fo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_unicode____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_unicode____object___to_py")
 * cdef object __Pyx_CFunc_unicode____object___to_py(unicode (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> unicode"""
 */

static PyObject *__Pyx_CFunc_unicode____object___to_py(PyObject *(*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_unicode____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_unicode____object___to_py")
 * cdef object __Pyx_CFunc_unicode____object___to_py(unicode (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> unicode"""
 *         return f(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_37__Pyx_CFunc_unicode____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_unicode____object, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(fo) -> unicode"""
 *         return f(fo)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_unicode____object___to_py")
 * cdef object __Pyx_CFunc_unicode____object___to_py(unicode (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> unicode"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_unicode____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_double____object___to_py")
 * cdef object __Pyx_CFunc_double____object___to_py(double (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> float"""
 *         return f(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_wrap[] = "wrap(fo) -> float";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object fo):
 *         """wrap(fo) -> float"""
 *         return f(fo)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_fo); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_double____object___to_py")
 * cdef object __Pyx_CFunc_double____object___to_py(double (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> float"""
 *         return f(fo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_double____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_double____object___to_py")
 * cdef object __Pyx_CFunc_double____object___to_py(double (*f)(object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> float"""
 */

static PyObject *__Pyx_CFunc_double____object___to_py(double (*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_double____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_double____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_double____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_double____object___to_py")
 * cdef object __Pyx_CFunc_double____object___to_py(double (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> float"""
 *         return f(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_36__Pyx_CFunc_double____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_double____object___t, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(fo) -> float"""
 *         return f(fo)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_double____object___to_py")
 * cdef object __Pyx_CFunc_double____object___to_py(double (*f)(object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> float"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_double____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_long__long____object___to_py")
 * cdef object __Pyx_CFunc_long__long____object___to_py(long long (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> 'long long'"""
 *         return f(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_wrap[] = "wrap(fo) -> 'long long'";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object fo):
 *         """wrap(fo) -> 'long long'"""
 *         return f(fo)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_fo); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_long__long____object___to_py")
 * cdef object __Pyx_CFunc_long__long____object___to_py(long long (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> 'long long'"""
 *         return f(fo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_long__long____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_long__long____object___to_py")
 * cdef object __Pyx_CFunc_long__long____object___to_py(long long (*f)(object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> 'long long'"""
 */

static PyObject *__Pyx_CFunc_long__long____object___to_py(PY_LONG_LONG (*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_long__long____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_long__long____object___to_py")
 * cdef object __Pyx_CFunc_long__long____object___to_py(long long (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> 'long long'"""
 *         return f(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_40__Pyx_CFunc_long__long____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_long__long____object, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(fo) -> 'long long'"""
 *         return f(fo)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_long__long____object___to_py")
 * cdef object __Pyx_CFunc_long__long____object___to_py(long long (*f)(object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> 'long long'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_long__long____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_bytes____object___to_py")
 * cdef object __Pyx_CFunc_bytes____object___to_py(bytes (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> bytes"""
 *         return f(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_wrap[] = "wrap(fo) -> bytes";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object fo):
 *         """wrap(fo) -> bytes"""
 *         return f(fo)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_fo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_bytes____object___to_py")
 * cdef object __Pyx_CFunc_bytes____object___to_py(bytes (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> bytes"""
 *         return f(fo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_bytes____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_bytes____object___to_py")
 * cdef object __Pyx_CFunc_bytes____object___to_py(bytes (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> bytes"""
 */

static PyObject *__Pyx_CFunc_bytes____object___to_py(PyObject *(*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_bytes____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_bytes____object___to_py")
 * cdef object __Pyx_CFunc_bytes____object___to_py(bytes (*f)(object) ):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> bytes"""
 *         return f(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_35__Pyx_CFunc_bytes____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_bytes____object___to, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(fo) -> bytes"""
 *         return f(fo)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_bytes____object___to_py")
 * cdef object __Pyx_CFunc_bytes____object___to_py(bytes (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> bytes"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_bytes____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_float____object___to_py")
 * cdef object __Pyx_CFunc_float____object___to_py(float (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> 'float'"""
 *         return f(fo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_wrap[] = "wrap(fo) -> 'float'";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_fo));

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_fo) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object fo):
 *         """wrap(fo) -> 'float'"""
 *         return f(fo)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_fo); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_float____object___to_py")
 * cdef object __Pyx_CFunc_float____object___to_py(float (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> 'float'"""
 *         return f(fo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_float____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_float____object___to_py")
 * cdef object __Pyx_CFunc_float____object___to_py(float (*f)(object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> 'float'"""
 */

static PyObject *__Pyx_CFunc_float____object___to_py(float (*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_float____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_float____object___to_py")
 * cdef object __Pyx_CFunc_float____object___to_py(float (*f)(object) except *):
 *     def wrap(object fo):             # <<<<<<<<<<<<<<
 *         """wrap(fo) -> 'float'"""
 *         return f(fo)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_35__Pyx_CFunc_float____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_float____object___to, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(fo) -> 'float'"""
 *         return f(fo)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_float____object___to_py")
 * cdef object __Pyx_CFunc_float____object___to_py(float (*f)(object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object fo):
 *         """wrap(fo) -> 'float'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_float____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____object___to_py")
 * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *):
 *     def wrap(object outbuf, object datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum) -> 'void'"""
 *         f(outbuf, datum)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap[] = "wrap(outbuf, datum) -> 'void'";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_datum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, PyObject *__pyx_v_datum) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object outbuf, object datum):
 *         """wrap(outbuf, datum) -> 'void'"""
 *         f(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __pyx_cur_scope->__pyx_v_f(__pyx_v_outbuf, __pyx_v_datum); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____object___to_py")
 * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *):
 *     def wrap(object outbuf, object datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum) -> 'void'"""
 *         f(outbuf, datum)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____object___to_py")
 * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, object datum):
 *         """wrap(outbuf, datum) -> 'void'"""
 */

static PyObject *__Pyx_CFunc_void____object____object___to_py(void (*__pyx_v_f)(PyObject *, PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____object___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____object___to_py")
 * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *):
 *     def wrap(object outbuf, object datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum) -> 'void'"""
 *         f(outbuf, datum)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____ob, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(outbuf, datum) -> 'void'"""
 *         f(outbuf, datum)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____object___to_py")
 * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, object datum):
 *         """wrap(outbuf, datum) -> 'void'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____float___to_py")
 * cdef object __Pyx_CFunc_void____object____float___to_py(void (*f)(object, float) except *):
 *     def wrap(object outbuf, float datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 *         f(outbuf, datum)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_wrap[] = "wrap(outbuf, datum: 'float') -> 'void'";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  float __pyx_v_datum;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_datum == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____float___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_wrap(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, float __pyx_v_datum) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object outbuf, float datum):
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 *         f(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __pyx_cur_scope->__pyx_v_f(__pyx_v_outbuf, __pyx_v_datum); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____float___to_py")
 * cdef object __Pyx_CFunc_void____object____float___to_py(void (*f)(object, float) except *):
 *     def wrap(object outbuf, float datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 *         f(outbuf, datum)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____float___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____float___to_py")
 * cdef object __Pyx_CFunc_void____object____float___to_py(void (*f)(object, float) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, float datum):
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 */

static PyObject *__Pyx_CFunc_void____object____float___to_py(void (*__pyx_v_f)(PyObject *, float)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____float___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____float___to_py")
 * cdef object __Pyx_CFunc_void____object____float___to_py(void (*f)(object, float) except *):
 *     def wrap(object outbuf, float datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 *         f(outbuf, datum)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_43__Pyx_CFunc_void____object____float___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____fl, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 *         f(outbuf, datum)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____float___to_py")
 * cdef object __Pyx_CFunc_void____object____float___to_py(void (*f)(object, float) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, float datum):
 *         """wrap(outbuf, datum: 'float') -> 'void'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____float___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____double___to_py")
 * cdef object __Pyx_CFunc_void____object____double___to_py(void (*f)(object, double) except *):
 *     def wrap(object outbuf, double datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum: float) -> 'void'"""
 *         f(outbuf, datum)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_wrap[] = "wrap(outbuf, datum: float) -> 'void'";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_1wrap = {"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_outbuf = 0;
  double __pyx_v_datum;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_outbuf,&__pyx_n_s_datum,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_outbuf = values[0];
    __pyx_v_datum = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_datum == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____double___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_wrap(__pyx_self, __pyx_v_outbuf, __pyx_v_datum);

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

static PyObject *__pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_outbuf, double __pyx_v_datum) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object outbuf, double datum):
 *         """wrap(outbuf, datum: float) -> 'void'"""
 *         f(outbuf, datum)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __pyx_cur_scope->__pyx_v_f(__pyx_v_outbuf, __pyx_v_datum); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L1_error)

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____double___to_py")
 * cdef object __Pyx_CFunc_void____object____double___to_py(void (*f)(object, double) except *):
 *     def wrap(object outbuf, double datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum: float) -> 'void'"""
 *         f(outbuf, datum)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____double___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____double___to_py")
 * cdef object __Pyx_CFunc_void____object____double___to_py(void (*f)(object, double) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, double datum):
 *         """wrap(outbuf, datum: float) -> 'void'"""
 */

static PyObject *__Pyx_CFunc_void____object____double___to_py(void (*__pyx_v_f)(PyObject *, double)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____double___to_py", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 64, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____double___to_py")
 * cdef object __Pyx_CFunc_void____object____double___to_py(void (*f)(object, double) except *):
 *     def wrap(object outbuf, double datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, datum: float) -> 'void'"""
 *         f(outbuf, datum)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____double___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____do, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(outbuf, datum: float) -> 'void'"""
 *         f(outbuf, datum)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____double___to_py")
 * cdef object __Pyx_CFunc_void____object____double___to_py(void (*f)(object, double) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, double datum):
 *         """wrap(outbuf, datum: float) -> 'void'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____double___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct__make_union_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct__make_union_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct__make_union_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct__make_union_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct__make_union_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct__make_union_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct__make_union_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_readers);
  Py_CLEAR(p->__pyx_v_union_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct__make_union_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct__make_union_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct__make_union_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct__make_union_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *)o;
  if (p->__pyx_v_readers) {
    e = (*v)(p->__pyx_v_readers, a); if (e) return e;
  }
  if (p->__pyx_v_union_schema) {
    e = (*v)(p->__pyx_v_union_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct__make_union_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_readers);
  p->__pyx_v_readers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_union_schema);
  p->__pyx_v_union_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct__make_union_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct__make_union_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct__make_union_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct__make_union_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct__make_union_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct__make_union_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct__make_union_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_field);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *)o;
  if (p->__pyx_v_field) {
    e = (*v)(p->__pyx_v_field, a); if (e) return e;
  }
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_field);
  p->__pyx_v_field = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_1_make_record_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_schema);
  Py_CLEAR(p->__pyx_v_symbols);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *)o;
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  if (p->__pyx_v_symbols) {
    e = (*v)(p->__pyx_v_symbols, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_symbols);
  p->__pyx_v_symbols = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_2_make_enum_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_item_reader);
  Py_CLEAR(p->__pyx_v_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *)o;
  if (p->__pyx_v_item_reader) {
    e = (*v)(p->__pyx_v_item_reader, a); if (e) return e;
  }
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_item_reader);
  p->__pyx_v_item_reader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_3_make_array_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_schema);
  Py_CLEAR(p->__pyx_v_value_reader);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *)o;
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  if (p->__pyx_v_value_reader) {
    e = (*v)(p->__pyx_v_value_reader, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_value_reader);
  p->__pyx_v_value_reader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_4_make_map_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *)o;
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_5_make_fixed_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_schema);
  Py_CLEAR(p->__pyx_v_value_reader);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *)o;
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  if (p->__pyx_v_value_reader) {
    e = (*v)(p->__pyx_v_value_reader, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_value_reader);
  p->__pyx_v_value_reader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_6_make_skip_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_schema);
  Py_CLEAR(p->__pyx_v_value);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *)o;
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  if (p->__pyx_v_value) {
    e = (*v)(p->__pyx_v_value, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader *)o;
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_value);
  p->__pyx_v_value = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_7_make_default_reader", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_8_make_record_check", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_symbols);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *)o;
  if (p->__pyx_v_symbols) {
    e = (*v)(p->__pyx_v_symbols, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check *)o;
  tmp = ((PyObject*)p->__pyx_v_symbols);
  p->__pyx_v_symbols = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_9_make_enum_check", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_item_check);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *)o;
  if (p->__pyx_v_item_check) {
    e = (*v)(p->__pyx_v_item_check, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check *)o;
  tmp = ((PyObject*)p->__pyx_v_item_check);
  p->__pyx_v_item_check = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_10_make_array_check", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_union_checks);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *)o;
  if (p->__pyx_v_union_checks) {
    e = (*v)(p->__pyx_v_union_checks, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check *)o;
  tmp = ((PyObject*)p->__pyx_v_union_checks);
  p->__pyx_v_union_checks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_11_make_union_check", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_12_make_fixed_check", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_map_value_check);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *)o;
  if (p->__pyx_v_map_value_check) {
    e = (*v)(p->__pyx_v_map_value_check, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check *)o;
  tmp = ((PyObject*)p->__pyx_v_map_value_check);
  p->__pyx_v_map_value_check = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_13_make_map_check", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_union_schema);
  Py_CLEAR(p->__pyx_v_writer_lookup);
  Py_CLEAR(p->__pyx_v_writer_lookup_dict);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *)o;
  if (p->__pyx_v_union_schema) {
    e = (*v)(p->__pyx_v_union_schema, a); if (e) return e;
  }
  if (p->__pyx_v_writer_lookup) {
    e = (*v)(p->__pyx_v_writer_lookup, a); if (e) return e;
  }
  if (p->__pyx_v_writer_lookup_dict) {
    e = (*v)(p->__pyx_v_writer_lookup_dict, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer *)o;
  tmp = ((PyObject*)p->__pyx_v_union_schema);
  p->__pyx_v_union_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_writer_lookup);
  p->__pyx_v_writer_lookup = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_writer_lookup_dict);
  p->__pyx_v_writer_lookup_dict = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_14_make_union_writer", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_schema);
  Py_CLEAR(p->__pyx_v_symbols);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *)o;
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  if (p->__pyx_v_symbols) {
    e = (*v)(p->__pyx_v_symbols, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer *)o;
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_symbols);
  p->__pyx_v_symbols = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_15_make_enum_writer", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fields);
  Py_CLEAR(p->__pyx_v_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *)o;
  if (p->__pyx_v_fields) {
    e = (*v)(p->__pyx_v_fields, a); if (e) return e;
  }
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer *)o;
  tmp = ((PyObject*)p->__pyx_v_fields);
  p->__pyx_v_fields = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_16_make_record_writer", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_item_writer);
  Py_CLEAR(p->__pyx_v_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *)o;
  if (p->__pyx_v_item_writer) {
    e = (*v)(p->__pyx_v_item_writer, a); if (e) return e;
  }
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer *)o;
  tmp = ((PyObject*)p->__pyx_v_item_writer);
  p->__pyx_v_item_writer = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_17_make_array_writer", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer(PyObject *o) {
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_map_value_writer);
  Py_CLEAR(p->__pyx_v_schema);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *)o;
  if (p->__pyx_v_map_value_writer) {
    e = (*v)(p->__pyx_v_map_value_writer, a); if (e) return e;
  }
  if (p->__pyx_v_schema) {
    e = (*v)(p->__pyx_v_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *p = (struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer *)o;
  tmp = ((PyObject*)p->__pyx_v_map_value_writer);
  p->__pyx_v_map_value_writer = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_schema);
  p->__pyx_v_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_18_make_map_writer", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer, /*tp_traverse*/
  __pyx_tp_clear_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer[8];
static int __pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer = 0;

static PyObject *__pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer)))) {
    o = (PyObject*)__pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer[--__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer];
    memset(o, 0, sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer)))) {
    __pyx_freelist_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer[__pyx_freecount_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer++] = ((struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct_19_make_fixed_writer", /*tp_name*/
  sizeof(struct __pyx_obj_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_object____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_object____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_unicode____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_unicode____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_double____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_double____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_double____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_double____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_double____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_double____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_double____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_double____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_double____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_double____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_double____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_double____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_double____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_double____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_double____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_long__long____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_long__long____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_bytes____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_bytes____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_float____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_float____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_float____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_float____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_float____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_float____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_float____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_float____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____float___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_void____object____float___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____double___to_py = {
  PyVarObject_HEAD_INIT(0, 0)
  "spavro.fast_binary.__pyx_scope_struct____Pyx_CFunc_void____object____double___to_py", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {"get_type", (PyCFunction)__pyx_pw_6spavro_11fast_binary_3get_type, METH_O, 0},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "fast_binary",
    __pyx_k_Fast_Cython_extension_for_readin, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_CheckField, __pyx_k_CheckField, sizeof(__pyx_k_CheckField), 0, 0, 1, 1},
  {&__pyx_kp_s_Checksum_failure, __pyx_k_Checksum_failure, sizeof(__pyx_k_Checksum_failure), 0, 0, 1, 0},
  {&__pyx_n_s_FastBinaryDecoder, __pyx_k_FastBinaryDecoder, sizeof(__pyx_k_FastBinaryDecoder), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder___init, __pyx_k_FastBinaryDecoder___init, sizeof(__pyx_k_FastBinaryDecoder___init), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_check_crc32, __pyx_k_FastBinaryDecoder_check_crc32, sizeof(__pyx_k_FastBinaryDecoder_check_crc32), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read, __pyx_k_FastBinaryDecoder_read, sizeof(__pyx_k_FastBinaryDecoder_read), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_boolean, __pyx_k_FastBinaryDecoder_read_boolean, sizeof(__pyx_k_FastBinaryDecoder_read_boolean), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_bytes, __pyx_k_FastBinaryDecoder_read_bytes, sizeof(__pyx_k_FastBinaryDecoder_read_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_double, __pyx_k_FastBinaryDecoder_read_double, sizeof(__pyx_k_FastBinaryDecoder_read_double), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_float, __pyx_k_FastBinaryDecoder_read_float, sizeof(__pyx_k_FastBinaryDecoder_read_float), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_int, __pyx_k_FastBinaryDecoder_read_int, sizeof(__pyx_k_FastBinaryDecoder_read_int), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_long, __pyx_k_FastBinaryDecoder_read_long, sizeof(__pyx_k_FastBinaryDecoder_read_long), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_null, __pyx_k_FastBinaryDecoder_read_null, sizeof(__pyx_k_FastBinaryDecoder_read_null), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_read_utf8, __pyx_k_FastBinaryDecoder_read_utf8, sizeof(__pyx_k_FastBinaryDecoder_read_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip, __pyx_k_FastBinaryDecoder_skip, sizeof(__pyx_k_FastBinaryDecoder_skip), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_boolean, __pyx_k_FastBinaryDecoder_skip_boolean, sizeof(__pyx_k_FastBinaryDecoder_skip_boolean), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_bytes, __pyx_k_FastBinaryDecoder_skip_bytes, sizeof(__pyx_k_FastBinaryDecoder_skip_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_double, __pyx_k_FastBinaryDecoder_skip_double, sizeof(__pyx_k_FastBinaryDecoder_skip_double), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_float, __pyx_k_FastBinaryDecoder_skip_float, sizeof(__pyx_k_FastBinaryDecoder_skip_float), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_int, __pyx_k_FastBinaryDecoder_skip_int, sizeof(__pyx_k_FastBinaryDecoder_skip_int), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_long, __pyx_k_FastBinaryDecoder_skip_long, sizeof(__pyx_k_FastBinaryDecoder_skip_long), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_null, __pyx_k_FastBinaryDecoder_skip_null, sizeof(__pyx_k_FastBinaryDecoder_skip_null), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryDecoder_skip_utf8, __pyx_k_FastBinaryDecoder_skip_utf8, sizeof(__pyx_k_FastBinaryDecoder_skip_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder, __pyx_k_FastBinaryEncoder, sizeof(__pyx_k_FastBinaryEncoder), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder___init, __pyx_k_FastBinaryEncoder___init, sizeof(__pyx_k_FastBinaryEncoder___init), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write, __pyx_k_FastBinaryEncoder_write, sizeof(__pyx_k_FastBinaryEncoder_write), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_boolean, __pyx_k_FastBinaryEncoder_write_boolean, sizeof(__pyx_k_FastBinaryEncoder_write_boolean), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_bytes, __pyx_k_FastBinaryEncoder_write_bytes, sizeof(__pyx_k_FastBinaryEncoder_write_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_crc32, __pyx_k_FastBinaryEncoder_write_crc32, sizeof(__pyx_k_FastBinaryEncoder_write_crc32), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_double, __pyx_k_FastBinaryEncoder_write_double, sizeof(__pyx_k_FastBinaryEncoder_write_double), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_float, __pyx_k_FastBinaryEncoder_write_float, sizeof(__pyx_k_FastBinaryEncoder_write_float), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_int, __pyx_k_FastBinaryEncoder_write_int, sizeof(__pyx_k_FastBinaryEncoder_write_int), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_long, __pyx_k_FastBinaryEncoder_write_long, sizeof(__pyx_k_FastBinaryEncoder_write_long), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_null, __pyx_k_FastBinaryEncoder_write_null, sizeof(__pyx_k_FastBinaryEncoder_write_null), 0, 0, 1, 1},
  {&__pyx_n_s_FastBinaryEncoder_write_utf8, __pyx_k_FastBinaryEncoder_write_utf8, sizeof(__pyx_k_FastBinaryEncoder_write_utf8), 0, 0, 1, 1},
  {&__pyx_kp_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 0},
  {&__pyx_n_s_INT_MAX_VALUE, __pyx_k_INT_MAX_VALUE, sizeof(__pyx_k_INT_MAX_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_INT_MIN_VALUE, __pyx_k_INT_MIN_VALUE, sizeof(__pyx_k_INT_MIN_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_LONG_MAX_VALUE, __pyx_k_LONG_MAX_VALUE, sizeof(__pyx_k_LONG_MAX_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_LONG_MIN_VALUE, __pyx_k_LONG_MIN_VALUE, sizeof(__pyx_k_LONG_MIN_VALUE), 0, 0, 1, 1},
  {&__pyx_kp_s_No_matching_schema_for_datum, __pyx_k_No_matching_schema_for_datum, sizeof(__pyx_k_No_matching_schema_for_datum), 0, 0, 1, 0},
  {&__pyx_kp_s_Non_integer_value_or_overflow, __pyx_k_Non_integer_value_or_overflow, sizeof(__pyx_k_Non_integer_value_or_overflow), 0, 0, 1, 0},
  {&__pyx_kp_s_Non_string_value, __pyx_k_Non_string_value, sizeof(__pyx_k_Non_string_value), 0, 0, 1, 0},
  {&__pyx_kp_s_Not_a_boolean_value, __pyx_k_Not_a_boolean_value, sizeof(__pyx_k_Not_a_boolean_value), 0, 0, 1, 0},
  {&__pyx_n_s_Pyx_CFunc_bytes____object___to, __pyx_k_Pyx_CFunc_bytes____object___to, sizeof(__pyx_k_Pyx_CFunc_bytes____object___to), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_double____object___t, __pyx_k_Pyx_CFunc_double____object___t, sizeof(__pyx_k_Pyx_CFunc_double____object___t), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_float____object___to, __pyx_k_Pyx_CFunc_float____object___to, sizeof(__pyx_k_Pyx_CFunc_float____object___to), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_long__long____object, __pyx_k_Pyx_CFunc_long__long____object, sizeof(__pyx_k_Pyx_CFunc_long__long____object), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_object____object___t, __pyx_k_Pyx_CFunc_object____object___t, sizeof(__pyx_k_Pyx_CFunc_object____object___t), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_unicode____object, __pyx_k_Pyx_CFunc_unicode____object, sizeof(__pyx_k_Pyx_CFunc_unicode____object), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_void____object____do, __pyx_k_Pyx_CFunc_void____object____do, sizeof(__pyx_k_Pyx_CFunc_void____object____do), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_void____object____fl, __pyx_k_Pyx_CFunc_void____object____fl, sizeof(__pyx_k_Pyx_CFunc_void____object____fl), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_void____object____lo, __pyx_k_Pyx_CFunc_void____object____lo, sizeof(__pyx_k_Pyx_CFunc_void____object____lo), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_void____object____ob, __pyx_k_Pyx_CFunc_void____object____ob, sizeof(__pyx_k_Pyx_CFunc_void____object____ob), 0, 0, 1, 1},
  {&__pyx_n_s_ReadField, __pyx_k_ReadField, sizeof(__pyx_k_ReadField), 0, 0, 1, 1},
  {&__pyx_kp_s_Read_leaf_values, __pyx_k_Read_leaf_values, sizeof(__pyx_k_Read_leaf_values), 0, 0, 1, 0},
  {&__pyx_n_s_ReaderPlaceholder, __pyx_k_ReaderPlaceholder, sizeof(__pyx_k_ReaderPlaceholder), 0, 0, 1, 1},
  {&__pyx_n_s_ReaderPlaceholder___call, __pyx_k_ReaderPlaceholder___call, sizeof(__pyx_k_ReaderPlaceholder___call), 0, 0, 1, 1},
  {&__pyx_n_s_ReaderPlaceholder___init, __pyx_k_ReaderPlaceholder___init, sizeof(__pyx_k_ReaderPlaceholder___init), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Size_Mismatch_for_Fixed_data, __pyx_k_Size_Mismatch_for_Fixed_data, sizeof(__pyx_k_Size_Mismatch_for_Fixed_data), 0, 0, 1, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_WriteField, __pyx_k_WriteField, sizeof(__pyx_k_WriteField), 0, 0, 1, 1},
  {&__pyx_kp_s_Write_leaf_values, __pyx_k_Write_leaf_values, sizeof(__pyx_k_Write_leaf_values), 0, 0, 1, 0},
  {&__pyx_n_s_WriterPlaceholder, __pyx_k_WriterPlaceholder, sizeof(__pyx_k_WriterPlaceholder), 0, 0, 1, 1},
  {&__pyx_n_s_WriterPlaceholder___call, __pyx_k_WriterPlaceholder___call, sizeof(__pyx_k_WriterPlaceholder___call), 0, 0, 1, 1},
  {&__pyx_n_s_WriterPlaceholder___init, __pyx_k_WriterPlaceholder___init, sizeof(__pyx_k_WriterPlaceholder___init), 0, 0, 1, 1},
  {&__pyx_n_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 1},
  {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0},
  {&__pyx_kp_b__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 0, 0},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_u_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 1, 0, 1},
  {&__pyx_n_s_array_check, __pyx_k_array_check, sizeof(__pyx_k_array_check), 0, 0, 1, 1},
  {&__pyx_n_s_array_reader, __pyx_k_array_reader, sizeof(__pyx_k_array_reader), 0, 0, 1, 1},
  {&__pyx_n_s_avro_to_py, __pyx_k_avro_to_py, sizeof(__pyx_k_avro_to_py), 0, 0, 1, 1},
  {&__pyx_n_s_binascii, __pyx_k_binascii, sizeof(__pyx_k_binascii), 0, 0, 1, 1},
  {&__pyx_n_s_block_count, __pyx_k_block_count, sizeof(__pyx_k_block_count), 0, 0, 1, 1},
  {&__pyx_n_s_block_size, __pyx_k_block_size, sizeof(__pyx_k_block_size), 0, 0, 1, 1},
  {&__pyx_n_s_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 0, 0, 1, 1},
  {&__pyx_n_u_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 0, 1, 0, 1},
  {&__pyx_n_s_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
  {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
  {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1},
  {&__pyx_n_s_check_crc32, __pyx_k_check_crc32, sizeof(__pyx_k_check_crc32), 0, 0, 1, 1},
  {&__pyx_n_s_check_string, __pyx_k_check_string, sizeof(__pyx_k_check_string), 0, 0, 1, 1},
  {&__pyx_n_s_check_type_map, __pyx_k_check_type_map, sizeof(__pyx_k_check_type_map), 0, 0, 1, 1},
  {&__pyx_n_s_checked_boolean_writer, __pyx_k_checked_boolean_writer, sizeof(__pyx_k_checked_boolean_writer), 0, 0, 1, 1},
  {&__pyx_n_s_checked_int_write, __pyx_k_checked_int_write, sizeof(__pyx_k_checked_int_write), 0, 0, 1, 1},
  {&__pyx_n_s_checked_long_write, __pyx_k_checked_long_write, sizeof(__pyx_k_checked_long_write), 0, 0, 1, 1},
  {&__pyx_n_s_checked_string_writer, __pyx_k_checked_string_writer, sizeof(__pyx_k_checked_string_writer), 0, 0, 1, 1},
  {&__pyx_n_s_checked_write_fixed, __pyx_k_checked_write_fixed, sizeof(__pyx_k_checked_write_fixed), 0, 0, 1, 1},
  {&__pyx_n_s_checksum, __pyx_k_checksum, sizeof(__pyx_k_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_complex_writer_lookup, __pyx_k_complex_writer_lookup, sizeof(__pyx_k_complex_writer_lookup), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_s_crc32, __pyx_k_crc32, sizeof(__pyx_k_crc32), 0, 0, 1, 1},
  {&__pyx_n_s_data_writer, __pyx_k_data_writer, sizeof(__pyx_k_data_writer), 0, 0, 1, 1},
  {&__pyx_n_s_datum, __pyx_k_datum, sizeof(__pyx_k_datum), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
  {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 1, 0, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_u_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 1, 0, 1},
  {&__pyx_n_s_enum_check, __pyx_k_enum_check, sizeof(__pyx_k_enum_check), 0, 0, 1, 1},
  {&__pyx_n_s_enum_index, __pyx_k_enum_index, sizeof(__pyx_k_enum_index), 0, 0, 1, 1},
  {&__pyx_n_s_enum_reader, __pyx_k_enum_reader, sizeof(__pyx_k_enum_reader), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_s_fixed, __pyx_k_fixed, sizeof(__pyx_k_fixed), 0, 0, 1, 1},
  {&__pyx_n_u_fixed, __pyx_k_fixed, sizeof(__pyx_k_fixed), 0, 1, 0, 1},
  {&__pyx_n_s_fixed_check, __pyx_k_fixed_check, sizeof(__pyx_k_fixed_check), 0, 0, 1, 1},
  {&__pyx_n_s_fixed_reader, __pyx_k_fixed_reader, sizeof(__pyx_k_fixed_reader), 0, 0, 1, 1},
  {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1},
  {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 1, 0, 1},
  {&__pyx_n_s_fo, __pyx_k_fo, sizeof(__pyx_k_fo), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fullname, __pyx_k_fullname, sizeof(__pyx_k_fullname), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_check, __pyx_k_get_check, sizeof(__pyx_k_get_check), 0, 0, 1, 1},
  {&__pyx_n_s_get_reader, __pyx_k_get_reader, sizeof(__pyx_k_get_reader), 0, 0, 1, 1},
  {&__pyx_n_s_get_writer, __pyx_k_get_writer, sizeof(__pyx_k_get_writer), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
  {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1},
  {&__pyx_n_s_integer_types, __pyx_k_integer_types, sizeof(__pyx_k_integer_types), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_item_check, __pyx_k_item_check, sizeof(__pyx_k_item_check), 0, 0, 1, 1},
  {&__pyx_n_s_item_count, __pyx_k_item_count, sizeof(__pyx_k_item_count), 0, 0, 1, 1},
  {&__pyx_n_s_item_reader, __pyx_k_item_reader, sizeof(__pyx_k_item_reader), 0, 0, 1, 1},
  {&__pyx_n_s_item_writer, __pyx_k_item_writer, sizeof(__pyx_k_item_writer), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 0, 1, 1},
  {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 1, 0, 1},
  {&__pyx_n_s_lookup_result, __pyx_k_lookup_result, sizeof(__pyx_k_lookup_result), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_check, __pyx_k_make_array_check, sizeof(__pyx_k_make_array_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_check_locals_array_ch, __pyx_k_make_array_check_locals_array_ch, sizeof(__pyx_k_make_array_check_locals_array_ch), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_reader, __pyx_k_make_array_reader, sizeof(__pyx_k_make_array_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_reader_locals_array_r, __pyx_k_make_array_reader_locals_array_r, sizeof(__pyx_k_make_array_reader_locals_array_r), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_reader_locals_lambda, __pyx_k_make_array_reader_locals_lambda, sizeof(__pyx_k_make_array_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_writer, __pyx_k_make_array_writer, sizeof(__pyx_k_make_array_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_writer_locals_lambda, __pyx_k_make_array_writer_locals_lambda, sizeof(__pyx_k_make_array_writer_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_array_writer_locals_write_a, __pyx_k_make_array_writer_locals_write_a, sizeof(__pyx_k_make_array_writer_locals_write_a), 0, 0, 1, 1},
  {&__pyx_n_s_make_boolean_check, __pyx_k_make_boolean_check, sizeof(__pyx_k_make_boolean_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_boolean_check_locals_lambda, __pyx_k_make_boolean_check_locals_lambda, sizeof(__pyx_k_make_boolean_check_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_boolean_reader, __pyx_k_make_boolean_reader, sizeof(__pyx_k_make_boolean_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_boolean_writer, __pyx_k_make_boolean_writer, sizeof(__pyx_k_make_boolean_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_boolean_writer_locals_check, __pyx_k_make_boolean_writer_locals_check, sizeof(__pyx_k_make_boolean_writer_locals_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_byte_check, __pyx_k_make_byte_check, sizeof(__pyx_k_make_byte_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_byte_check_locals_lambda, __pyx_k_make_byte_check_locals_lambda, sizeof(__pyx_k_make_byte_check_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_byte_reader, __pyx_k_make_byte_reader, sizeof(__pyx_k_make_byte_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_byte_writer, __pyx_k_make_byte_writer, sizeof(__pyx_k_make_byte_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_default_reader, __pyx_k_make_default_reader, sizeof(__pyx_k_make_default_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_default_reader_locals_lambd, __pyx_k_make_default_reader_locals_lambd, sizeof(__pyx_k_make_default_reader_locals_lambd), 0, 0, 1, 1},
  {&__pyx_n_s_make_default_reader_locals_read, __pyx_k_make_default_reader_locals_read, sizeof(__pyx_k_make_default_reader_locals_read), 0, 0, 1, 1},
  {&__pyx_n_s_make_double_check, __pyx_k_make_double_check, sizeof(__pyx_k_make_double_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_double_check_locals_lambda, __pyx_k_make_double_check_locals_lambda, sizeof(__pyx_k_make_double_check_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_double_reader, __pyx_k_make_double_reader, sizeof(__pyx_k_make_double_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_double_writer, __pyx_k_make_double_writer, sizeof(__pyx_k_make_double_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_check, __pyx_k_make_enum_check, sizeof(__pyx_k_make_enum_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_check_locals_enum_chec, __pyx_k_make_enum_check_locals_enum_chec, sizeof(__pyx_k_make_enum_check_locals_enum_chec), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_reader, __pyx_k_make_enum_reader, sizeof(__pyx_k_make_enum_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_reader_locals_enum_rea, __pyx_k_make_enum_reader_locals_enum_rea, sizeof(__pyx_k_make_enum_reader_locals_enum_rea), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_reader_locals_lambda, __pyx_k_make_enum_reader_locals_lambda, sizeof(__pyx_k_make_enum_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_writer, __pyx_k_make_enum_writer, sizeof(__pyx_k_make_enum_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_writer_locals_lambda, __pyx_k_make_enum_writer_locals_lambda, sizeof(__pyx_k_make_enum_writer_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_writer_locals_write_en, __pyx_k_make_enum_writer_locals_write_en, sizeof(__pyx_k_make_enum_writer_locals_write_en), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_check, __pyx_k_make_fixed_check, sizeof(__pyx_k_make_fixed_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_check_locals_fixed_ch, __pyx_k_make_fixed_check_locals_fixed_ch, sizeof(__pyx_k_make_fixed_check_locals_fixed_ch), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_reader, __pyx_k_make_fixed_reader, sizeof(__pyx_k_make_fixed_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_reader_locals_fixed_r, __pyx_k_make_fixed_reader_locals_fixed_r, sizeof(__pyx_k_make_fixed_reader_locals_fixed_r), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_reader_locals_lambda, __pyx_k_make_fixed_reader_locals_lambda, sizeof(__pyx_k_make_fixed_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_writer, __pyx_k_make_fixed_writer, sizeof(__pyx_k_make_fixed_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_fixed_writer_locals_checked, __pyx_k_make_fixed_writer_locals_checked, sizeof(__pyx_k_make_fixed_writer_locals_checked), 0, 0, 1, 1},
  {&__pyx_n_s_make_float_check, __pyx_k_make_float_check, sizeof(__pyx_k_make_float_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_float_check_locals_lambda, __pyx_k_make_float_check_locals_lambda, sizeof(__pyx_k_make_float_check_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_float_reader, __pyx_k_make_float_reader, sizeof(__pyx_k_make_float_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_float_writer, __pyx_k_make_float_writer, sizeof(__pyx_k_make_float_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_int_writer, __pyx_k_make_int_writer, sizeof(__pyx_k_make_int_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_int_writer_locals_checked_i, __pyx_k_make_int_writer_locals_checked_i, sizeof(__pyx_k_make_int_writer_locals_checked_i), 0, 0, 1, 1},
  {&__pyx_n_s_make_long_check, __pyx_k_make_long_check, sizeof(__pyx_k_make_long_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_long_check_locals_lambda, __pyx_k_make_long_check_locals_lambda, sizeof(__pyx_k_make_long_check_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_long_reader, __pyx_k_make_long_reader, sizeof(__pyx_k_make_long_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_long_writer, __pyx_k_make_long_writer, sizeof(__pyx_k_make_long_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_long_writer_locals_checked, __pyx_k_make_long_writer_locals_checked, sizeof(__pyx_k_make_long_writer_locals_checked), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_check, __pyx_k_make_map_check, sizeof(__pyx_k_make_map_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_check_locals_map_check, __pyx_k_make_map_check_locals_map_check, sizeof(__pyx_k_make_map_check_locals_map_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_reader, __pyx_k_make_map_reader, sizeof(__pyx_k_make_map_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_reader_locals_lambda, __pyx_k_make_map_reader_locals_lambda, sizeof(__pyx_k_make_map_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_reader_locals_map_reade, __pyx_k_make_map_reader_locals_map_reade, sizeof(__pyx_k_make_map_reader_locals_map_reade), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_writer, __pyx_k_make_map_writer, sizeof(__pyx_k_make_map_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_writer_locals_lambda, __pyx_k_make_map_writer_locals_lambda, sizeof(__pyx_k_make_map_writer_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_map_writer_locals_write_map, __pyx_k_make_map_writer_locals_write_map, sizeof(__pyx_k_make_map_writer_locals_write_map), 0, 0, 1, 1},
  {&__pyx_n_s_make_null_check, __pyx_k_make_null_check, sizeof(__pyx_k_make_null_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_null_check_locals_lambda, __pyx_k_make_null_check_locals_lambda, sizeof(__pyx_k_make_null_check_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_null_reader, __pyx_k_make_null_reader, sizeof(__pyx_k_make_null_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_null_writer, __pyx_k_make_null_writer, sizeof(__pyx_k_make_null_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_check, __pyx_k_make_record_check, sizeof(__pyx_k_make_record_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_check_locals_record, __pyx_k_make_record_check_locals_record, sizeof(__pyx_k_make_record_check_locals_record), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_reader, __pyx_k_make_record_reader, sizeof(__pyx_k_make_record_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_reader_locals_lambda, __pyx_k_make_record_reader_locals_lambda, sizeof(__pyx_k_make_record_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_reader_locals_record, __pyx_k_make_record_reader_locals_record, sizeof(__pyx_k_make_record_reader_locals_record), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_writer, __pyx_k_make_record_writer, sizeof(__pyx_k_make_record_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_writer_locals_lambda, __pyx_k_make_record_writer_locals_lambda, sizeof(__pyx_k_make_record_writer_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_record_writer_locals_write, __pyx_k_make_record_writer_locals_write, sizeof(__pyx_k_make_record_writer_locals_write), 0, 0, 1, 1},
  {&__pyx_n_s_make_skip_reader, __pyx_k_make_skip_reader, sizeof(__pyx_k_make_skip_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_skip_reader_locals_lambda, __pyx_k_make_skip_reader_locals_lambda, sizeof(__pyx_k_make_skip_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_skip_reader_locals_read_ski, __pyx_k_make_skip_reader_locals_read_ski, sizeof(__pyx_k_make_skip_reader_locals_read_ski), 0, 0, 1, 1},
  {&__pyx_n_s_make_string_check, __pyx_k_make_string_check, sizeof(__pyx_k_make_string_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_string_reader, __pyx_k_make_string_reader, sizeof(__pyx_k_make_string_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_string_writer, __pyx_k_make_string_writer, sizeof(__pyx_k_make_string_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_string_writer_locals_checke, __pyx_k_make_string_writer_locals_checke, sizeof(__pyx_k_make_string_writer_locals_checke), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_check, __pyx_k_make_union_check, sizeof(__pyx_k_make_union_check), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_check_locals_union_ch, __pyx_k_make_union_check_locals_union_ch, sizeof(__pyx_k_make_union_check_locals_union_ch), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_reader, __pyx_k_make_union_reader, sizeof(__pyx_k_make_union_reader), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_reader_locals_lambda, __pyx_k_make_union_reader_locals_lambda, sizeof(__pyx_k_make_union_reader_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_reader_locals_union_r, __pyx_k_make_union_reader_locals_union_r, sizeof(__pyx_k_make_union_reader_locals_union_r), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_writer, __pyx_k_make_union_writer, sizeof(__pyx_k_make_union_writer), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_writer_locals_complex, __pyx_k_make_union_writer_locals_complex, sizeof(__pyx_k_make_union_writer_locals_complex), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_writer_locals_lambda, __pyx_k_make_union_writer_locals_lambda, sizeof(__pyx_k_make_union_writer_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_writer_locals_simple, __pyx_k_make_union_writer_locals_simple, sizeof(__pyx_k_make_union_writer_locals_simple), 0, 0, 1, 1},
  {&__pyx_n_s_make_union_writer_locals_write_u, __pyx_k_make_union_writer_locals_write_u, sizeof(__pyx_k_make_union_writer_locals_write_u), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_u_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 1, 0, 1},
  {&__pyx_n_s_map_check, __pyx_k_map_check, sizeof(__pyx_k_map_check), 0, 0, 1, 1},
  {&__pyx_n_s_map_reader, __pyx_k_map_reader, sizeof(__pyx_k_map_reader), 0, 0, 1, 1},
  {&__pyx_n_s_map_value_check, __pyx_k_map_value_check, sizeof(__pyx_k_map_value_check), 0, 0, 1, 1},
  {&__pyx_n_s_map_value_writer, __pyx_k_map_value_writer, sizeof(__pyx_k_map_value_writer), 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_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 0, 0, 1, 1},
  {&__pyx_n_s_namspace_record_name, __pyx_k_namspace_record_name, sizeof(__pyx_k_namspace_record_name), 0, 0, 1, 1},
  {&__pyx_n_s_null, __pyx_k_null, sizeof(__pyx_k_null), 0, 0, 1, 1},
  {&__pyx_n_u_null, __pyx_k_null, sizeof(__pyx_k_null), 0, 1, 0, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_k_opt_ps_spavro_src_spavro_fast_b, sizeof(__pyx_k_opt_ps_spavro_src_spavro_fast_b), 0, 0, 1, 0},
  {&__pyx_n_s_outbuf, __pyx_k_outbuf, sizeof(__pyx_k_outbuf), 0, 0, 1, 1},
  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
  {&__pyx_n_s_placeholder, __pyx_k_placeholder, sizeof(__pyx_k_placeholder), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_py_to_avro, __pyx_k_py_to_avro, sizeof(__pyx_k_py_to_avro), 0, 0, 1, 1},
  {&__pyx_n_s_python_type, __pyx_k_python_type, sizeof(__pyx_k_python_type), 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_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_read_boolean, __pyx_k_read_boolean, sizeof(__pyx_k_read_boolean), 0, 0, 1, 1},
  {&__pyx_n_s_read_bytes, __pyx_k_read_bytes, sizeof(__pyx_k_read_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_read_default, __pyx_k_read_default, sizeof(__pyx_k_read_default), 0, 0, 1, 1},
  {&__pyx_n_s_read_double, __pyx_k_read_double, sizeof(__pyx_k_read_double), 0, 0, 1, 1},
  {&__pyx_n_s_read_float, __pyx_k_read_float, sizeof(__pyx_k_read_float), 0, 0, 1, 1},
  {&__pyx_n_s_read_int, __pyx_k_read_int, sizeof(__pyx_k_read_int), 0, 0, 1, 1},
  {&__pyx_n_s_read_items, __pyx_k_read_items, sizeof(__pyx_k_read_items), 0, 0, 1, 1},
  {&__pyx_n_s_read_long, __pyx_k_read_long, sizeof(__pyx_k_read_long), 0, 0, 1, 1},
  {&__pyx_n_s_read_null, __pyx_k_read_null, sizeof(__pyx_k_read_null), 0, 0, 1, 1},
  {&__pyx_n_s_read_skip, __pyx_k_read_skip, sizeof(__pyx_k_read_skip), 0, 0, 1, 1},
  {&__pyx_n_s_read_utf8, __pyx_k_read_utf8, sizeof(__pyx_k_read_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_reader, __pyx_k_reader, sizeof(__pyx_k_reader), 0, 0, 1, 1},
  {&__pyx_n_s_reader_type_map, __pyx_k_reader_type_map, sizeof(__pyx_k_reader_type_map), 0, 0, 1, 1},
  {&__pyx_n_s_readers, __pyx_k_readers, sizeof(__pyx_k_readers), 0, 0, 1, 1},
  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
  {&__pyx_n_u_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 1, 0, 1},
  {&__pyx_n_s_record_check, __pyx_k_record_check, sizeof(__pyx_k_record_check), 0, 0, 1, 1},
  {&__pyx_n_s_record_name, __pyx_k_record_name, sizeof(__pyx_k_record_name), 0, 0, 1, 1},
  {&__pyx_n_s_record_reader, __pyx_k_record_reader, sizeof(__pyx_k_record_reader), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_schema, __pyx_k_schema, sizeof(__pyx_k_schema), 0, 0, 1, 1},
  {&__pyx_n_s_schema_cache, __pyx_k_schema_cache, sizeof(__pyx_k_schema_cache), 0, 0, 1, 1},
  {&__pyx_n_s_schema_type, __pyx_k_schema_type, sizeof(__pyx_k_schema_type), 0, 0, 1, 1},
  {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_signed_datum, __pyx_k_signed_datum, sizeof(__pyx_k_signed_datum), 0, 0, 1, 1},
  {&__pyx_n_s_simple_union, __pyx_k_simple_union, sizeof(__pyx_k_simple_union), 0, 0, 1, 1},
  {&__pyx_n_s_simple_writer_lookup, __pyx_k_simple_writer_lookup, sizeof(__pyx_k_simple_writer_lookup), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_skip, __pyx_k_skip, sizeof(__pyx_k_skip), 0, 0, 1, 1},
  {&__pyx_n_s_skip_boolean, __pyx_k_skip_boolean, sizeof(__pyx_k_skip_boolean), 0, 0, 1, 1},
  {&__pyx_n_s_skip_bytes, __pyx_k_skip_bytes, sizeof(__pyx_k_skip_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_skip_double, __pyx_k_skip_double, sizeof(__pyx_k_skip_double), 0, 0, 1, 1},
  {&__pyx_n_s_skip_float, __pyx_k_skip_float, sizeof(__pyx_k_skip_float), 0, 0, 1, 1},
  {&__pyx_n_s_skip_int, __pyx_k_skip_int, sizeof(__pyx_k_skip_int), 0, 0, 1, 1},
  {&__pyx_n_s_skip_long, __pyx_k_skip_long, sizeof(__pyx_k_skip_long), 0, 0, 1, 1},
  {&__pyx_n_s_skip_null, __pyx_k_skip_null, sizeof(__pyx_k_skip_null), 0, 0, 1, 1},
  {&__pyx_n_s_skip_utf8, __pyx_k_skip_utf8, sizeof(__pyx_k_skip_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_spavro_fast_binary, __pyx_k_spavro_fast_binary, sizeof(__pyx_k_spavro_fast_binary), 0, 0, 1, 1},
  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
  {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 1},
  {&__pyx_n_s_string_types, __pyx_k_string_types, sizeof(__pyx_k_string_types), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_symbols, __pyx_k_symbols, sizeof(__pyx_k_symbols), 0, 0, 1, 1},
  {&__pyx_n_s_tell, __pyx_k_tell, sizeof(__pyx_k_tell), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_type_list, __pyx_k_type_list, sizeof(__pyx_k_type_list), 0, 0, 1, 1},
  {&__pyx_n_s_union, __pyx_k_union, sizeof(__pyx_k_union), 0, 0, 1, 1},
  {&__pyx_n_u_union, __pyx_k_union, sizeof(__pyx_k_union), 0, 1, 0, 1},
  {&__pyx_n_s_union_check, __pyx_k_union_check, sizeof(__pyx_k_union_check), 0, 0, 1, 1},
  {&__pyx_n_s_union_checks, __pyx_k_union_checks, sizeof(__pyx_k_union_checks), 0, 0, 1, 1},
  {&__pyx_n_s_union_index, __pyx_k_union_index, sizeof(__pyx_k_union_index), 0, 0, 1, 1},
  {&__pyx_n_s_union_reader, __pyx_k_union_reader, sizeof(__pyx_k_union_reader), 0, 0, 1, 1},
  {&__pyx_n_s_union_schema, __pyx_k_union_schema, sizeof(__pyx_k_union_schema), 0, 0, 1, 1},
  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_reader, __pyx_k_value_reader, sizeof(__pyx_k_value_reader), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_write_array, __pyx_k_write_array, sizeof(__pyx_k_write_array), 0, 0, 1, 1},
  {&__pyx_n_s_write_boolean, __pyx_k_write_boolean, sizeof(__pyx_k_write_boolean), 0, 0, 1, 1},
  {&__pyx_n_s_write_bytes, __pyx_k_write_bytes, sizeof(__pyx_k_write_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_write_crc32, __pyx_k_write_crc32, sizeof(__pyx_k_write_crc32), 0, 0, 1, 1},
  {&__pyx_n_s_write_double, __pyx_k_write_double, sizeof(__pyx_k_write_double), 0, 0, 1, 1},
  {&__pyx_n_s_write_enum, __pyx_k_write_enum, sizeof(__pyx_k_write_enum), 0, 0, 1, 1},
  {&__pyx_n_s_write_float, __pyx_k_write_float, sizeof(__pyx_k_write_float), 0, 0, 1, 1},
  {&__pyx_n_s_write_int, __pyx_k_write_int, sizeof(__pyx_k_write_int), 0, 0, 1, 1},
  {&__pyx_n_s_write_long, __pyx_k_write_long, sizeof(__pyx_k_write_long), 0, 0, 1, 1},
  {&__pyx_n_s_write_map, __pyx_k_write_map, sizeof(__pyx_k_write_map), 0, 0, 1, 1},
  {&__pyx_n_s_write_null, __pyx_k_write_null, sizeof(__pyx_k_write_null), 0, 0, 1, 1},
  {&__pyx_n_s_write_record, __pyx_k_write_record, sizeof(__pyx_k_write_record), 0, 0, 1, 1},
  {&__pyx_n_s_write_union, __pyx_k_write_union, sizeof(__pyx_k_write_union), 0, 0, 1, 1},
  {&__pyx_n_s_write_utf8, __pyx_k_write_utf8, sizeof(__pyx_k_write_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1},
  {&__pyx_n_s_writer_lookup, __pyx_k_writer_lookup, sizeof(__pyx_k_writer_lookup), 0, 0, 1, 1},
  {&__pyx_n_s_writer_lookup_dict, __pyx_k_writer_lookup_dict, sizeof(__pyx_k_writer_lookup_dict), 0, 0, 1, 1},
  {&__pyx_n_s_writer_type_map, __pyx_k_writer_type_map, sizeof(__pyx_k_writer_type_map), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 227, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 132, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) __PYX_ERR(0, 367, __pyx_L1_error)
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) __PYX_ERR(0, 414, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 483, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 507, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 778, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "spavro/fast_binary.pyx":21
 *         char* c_raw
 *         int shift = 7
 *     raw = fo.read(1)             # <<<<<<<<<<<<<<
 *     c_raw = raw
 *     temp_datum = <int>c_raw[0]
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "spavro/fast_binary.pyx":26
 *     accum = temp_datum & 0x7F
 *     while (temp_datum & 0x80) != 0:
 *         raw = fo.read(1)             # <<<<<<<<<<<<<<
 *         c_raw = raw
 *         temp_datum = <int>c_raw[0]
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "spavro/fast_binary.pyx":50
 *     whose value is either 0 (false) or 1 (true).
 *     """
 *     return fo.read(1) == b'\x01'             # <<<<<<<<<<<<<<
 * 
 * cdef float read_float(fo):
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "spavro/fast_binary.pyx":58
 *     Java's floatToIntBits and then encoded in little-endian format.
 *     """
 *     data = fo.read(4)             # <<<<<<<<<<<<<<
 *     cdef char* y = data
 *     return (<float*>y)[0]
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "spavro/fast_binary.pyx":68
 *     Java's doubleToLongBits and then encoded in little-endian format.
 *     """
 *     data = fo.read(8)             # <<<<<<<<<<<<<<
 *     cdef char* y = data
 *     return (<double*>y)[0]
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_8); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "spavro/fast_binary.pyx":97
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 *     def union_reader(fo):             # <<<<<<<<<<<<<<
 *         '''Read the long index for which schema to process, then use that'''
 *         union_index = read_long(fo)
 */
  __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fo, __pyx_n_s_union_index); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_union_reader, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 97, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":108
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 *     def record_reader(fo):             # <<<<<<<<<<<<<<
 *         return {field.name: field.reader(fo) for field in fields if not (field.skip and field.reader(fo) is None)}
 *     record_reader.__reduce__ = lambda: (make_record_reader, (schema,))
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_record_reader, 108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 108, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":117
 *     cdef list symbols = schema['symbols']
 * 
 *     def enum_reader(fo):             # <<<<<<<<<<<<<<
 *         return symbols[read_long(fo)]
 *     enum_reader.__reduce__ = lambda: (make_enum_reader, (schema,))
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_enum_reader, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 117, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":124
 * def make_array_reader(schema):
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count
 *         cdef list read_items = []
 */
  __pyx_tuple__13 = PyTuple_Pack(5, __pyx_n_s_fo, __pyx_n_s_block_count, __pyx_n_s_read_items, __pyx_n_s_block_size, __pyx_n_s_i); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_array_reader, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 124, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":142
 *     value_reader = get_reader(schema['values'])
 * 
 *     def map_reader(fo):             # <<<<<<<<<<<<<<
 *         cdef long block_count = read_long(fo)
 *         cdef dict read_items = {}
 */
  __pyx_tuple__16 = PyTuple_Pack(6, __pyx_n_s_fo, __pyx_n_s_block_count, __pyx_n_s_read_items, __pyx_n_s_block_size, __pyx_n_s__15, __pyx_n_s_key); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_map_reader, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 142, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":160
 *     cdef long size = schema['size']
 * 
 *     def fixed_reader(fo):             # <<<<<<<<<<<<<<
 *         return fo.read(size)
 *     fixed_reader.__reduce__ = lambda: (make_fixed_reader, (schema,))
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_fixed_reader, 160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 160, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":191
 *     # in the avro stream properly
 *     value_reader = get_reader(schema['value'])
 *     def read_skip(fo):             # <<<<<<<<<<<<<<
 *         value_reader(fo)
 *         return None
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_skip, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 191, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":200
 * def make_default_reader(schema):
 *     value = schema["value"]
 *     def read_default(fo):             # <<<<<<<<<<<<<<
 *         return value
 *     read_default.__reduce__ = lambda: (make_default_reader, (schema,))
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_default, 200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 200, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":240
 *         # using a placeholder because this is recursive and the reader isn't defined
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')             # <<<<<<<<<<<<<<
 *         record_name = schema.get('name')
 *         if namespace:
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_namespace); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "spavro/fast_binary.pyx":241
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')
 *         record_name = schema.get('name')             # <<<<<<<<<<<<<<
 *         if namespace:
 *            namspace_record_name = '.'.join([namespace, record_name])
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "spavro/fast_binary.pyx":292
 *     Bytes are encoded as a long followed by that many bytes of data.
 *     """
 *     write_bytes(outbuf, datum.encode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "spavro/fast_binary.pyx":366
 * def make_record_check(schema):
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([field.check(datum.get(field.name)) for field in fields])
 *     return record_check
 */
  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_datum, __pyx_n_s_field); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_record_check, 366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 366, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":373
 * def make_enum_check(schema):
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):             # <<<<<<<<<<<<<<
 *         return datum in symbols
 *     return enum_check
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_enum_check, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 373, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":407
 * def make_array_check(schema):
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):             # <<<<<<<<<<<<<<
 *         return all([item_check(item) for item in datum])
 *     return array_check
 */
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_datum, __pyx_n_s_item); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_array_check, 407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 407, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":413
 * def make_union_check(union_schema):
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):             # <<<<<<<<<<<<<<
 *         return any([check(datum) for check in union_checks])
 *     return union_check
 */
  __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_datum, __pyx_n_s_check); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_union_check, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 413, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":419
 * def make_fixed_check(schema):
 *     cdef int size = schema['size']
 *     def fixed_check(datum):             # <<<<<<<<<<<<<<
 *         return (isinstance(datum, str) or isinstance(datum, bytes)) and len(datum) == size
 *     return fixed_check
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_fixed_check, 419, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 419, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":425
 * def make_map_check(schema):
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):             # <<<<<<<<<<<<<<
 *         return isinstance(datum, dict) and all([check_string(key) and map_value_check(value) for key, value in datum.items()])
 *     return map_check
 */
  __pyx_tuple__38 = PyTuple_Pack(3, __pyx_n_s_datum, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_map_check, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 425, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":464
 *     # enums, strings and fixed are all python data type unicode or string
 *     # so those won't work either when mixed
 *     simple_union = not(type_list.count('record') > 1 or             # <<<<<<<<<<<<<<
 *                       len(set(type_list) & set(['string', 'enum', 'fixed'])) > 1 or
 *                       len(set(type_list) & set(['record', 'map'])) > 1)
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_n_s_record); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "spavro/fast_binary.pyx":477
 *         # or a float and a double in a union (which is valid but nonsensical
 *         # in python but valid in avro)
 *         def simple_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             return writer_lookup_dict[type(datum)]
 * 
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_simple_writer_lookup, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 477, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":495
 *             writer_lookup_dict[str] = writer_lookup_dict[unicode]
 * 
 *         def complex_writer_lookup(datum):             # <<<<<<<<<<<<<<
 *             cdef:
 *                 long idx
 */
  __pyx_tuple__43 = PyTuple_Pack(5, __pyx_n_s_datum, __pyx_n_s_idx, __pyx_n_s_lookup_result, __pyx_n_s_get_check, __pyx_n_s_writer); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_complex_writer_lookup, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 495, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":512
 *         writer_lookup = complex_writer_lookup
 * 
 *     def write_union(outbuf, datum):             # <<<<<<<<<<<<<<
 *         idx, data_writer = writer_lookup(datum)
 *         write_long(outbuf, idx)
 */
  __pyx_tuple__45 = PyTuple_Pack(4, __pyx_n_s_outbuf, __pyx_n_s_datum, __pyx_n_s_idx, __pyx_n_s_data_writer); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_union, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 512, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":523
 * 
 *     # the datum can be str or unicode?
 *     def write_enum(outbuf, basestring datum):             # <<<<<<<<<<<<<<
 *         cdef int enum_index = symbols.index(datum)
 *         write_int(outbuf, enum_index)
 */
  __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_outbuf, __pyx_n_s_datum, __pyx_n_s_enum_index); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_enum, 523, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 523, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":533
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 *     def write_record(outbuf, datum):             # <<<<<<<<<<<<<<
 *         for field in fields:
 *             field.writer(outbuf, datum.get(field.name))
 */
  __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_s_outbuf, __pyx_n_s_datum, __pyx_n_s_field); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_record, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 533, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":543
 *     item_writer = get_writer(schema['items'])
 * 
 *     def write_array(outbuf, list datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */
  __pyx_tuple__51 = PyTuple_Pack(4, __pyx_n_s_outbuf, __pyx_n_s_datum, __pyx_n_s_item_count, __pyx_n_s_item); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_array, 543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 543, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":557
 *     map_value_writer = get_writer(schema['values'])
 * 
 *     def write_map(outbuf, datum):             # <<<<<<<<<<<<<<
 *         cdef long item_count = len(datum)
 *         if item_count > 0:
 */
  __pyx_tuple__53 = PyTuple_Pack(5, __pyx_n_s_outbuf, __pyx_n_s_datum, __pyx_n_s_item_count, __pyx_n_s_key, __pyx_n_s_val); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_map, 557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 557, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":574
 *     def checked_boolean_writer(outbuf, datum):
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")             # <<<<<<<<<<<<<<
 *         write_boolean(outbuf, datum)
 *     return checked_boolean_writer
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_Not_a_boolean_value); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "spavro/fast_binary.pyx":572
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 *     def checked_boolean_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, bool):
 *             raise TypeError("Not a boolean value")
 */
  __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_checked_boolean_writer, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 572, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":586
 *     def checked_write_fixed(outbuf, datum):
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")             # <<<<<<<<<<<<<<
 *         write_fixed(outbuf, datum)
 *     return checked_write_fixed
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Size_Mismatch_for_Fixed_data); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "spavro/fast_binary.pyx":584
 *     # note: not a char* because those are null terminated and fixed
 *     # has no such limitation
 *     def checked_write_fixed(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if len(datum) != size:
 *             raise TypeError("Size Mismatch for Fixed data")
 */
  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_checked_write_fixed, 584, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 584, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":597
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")             # <<<<<<<<<<<<<<
 *         write_long(outbuf, datum)
 *     return checked_int_write
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Non_integer_value_or_overflow); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "spavro/fast_binary.pyx":594
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 *     def checked_int_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and INT_MIN_VALUE <= datum <= INT_MAX_VALUE):
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_checked_int_write, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 594, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":608
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 *             raise TypeError("Non integer value or overflow")             # <<<<<<<<<<<<<<
 *         write_long(outbuf, datum)
 *     return checked_long_write
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Non_integer_value_or_overflow); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "spavro/fast_binary.pyx":605
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 *     def checked_long_write(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not (isinstance(datum, six.integer_types)
 *                         and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE):
 */
  __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_checked_long_write, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 605, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":616
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")             # <<<<<<<<<<<<<<
 *         write_utf8(outbuf, datum)
 *     return checked_string_writer
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_Non_string_value); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "spavro/fast_binary.pyx":614
 * 
 * def make_string_writer(schema):
 *     def checked_string_writer(outbuf, datum):             # <<<<<<<<<<<<<<
 *         if not isinstance(datum, six.string_types):
 *             raise TypeError("Non string value")
 */
  __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_checked_string_writer, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 614, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":670
 *         # using a placeholder because this is recursive and the reader isn't defined
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')             # <<<<<<<<<<<<<<
 *         name = schema.get('name')
 *         if namespace:
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_namespace); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "spavro/fast_binary.pyx":671
 *         # yet and nested records might refer to this parent schema name
 *         namespace = schema.get('namespace')
 *         name = schema.get('name')             # <<<<<<<<<<<<<<
 *         if namespace:
 *            fullname = '.'.join([namespace, name])
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "spavro/fast_binary.pyx":776
 * 
 *     def check_crc32(self, bytes):
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]             # <<<<<<<<<<<<<<
 *         if crc32(bytes) & 0xffffffff != checksum:
 *             raise RuntimeError("Checksum failure")
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "spavro/fast_binary.pyx":778
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:
 *             raise RuntimeError("Checksum failure")             # <<<<<<<<<<<<<<
 * 
 *     def skip_null(self):
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_Checksum_failure); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "spavro/fast_binary.pyx":784
 * 
 *     def skip_boolean(self):
 *         self.reader.read(1)             # <<<<<<<<<<<<<<
 * 
 *     def skip_int(self):
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_void____object____long__long___to_py")
 * cdef object __Pyx_CFunc_void____object____long__long___to_py(void (*f)(object, long long) except *):
 *     def wrap(object outbuf, long long signed_datum):             # <<<<<<<<<<<<<<
 *         """wrap(outbuf, signed_datum: 'long long') -> 'void'"""
 *         f(outbuf, signed_datum)
 */
  __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_signed_datum); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__89 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_outbuf, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(1, 65, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":45
 * 
 * 
 * def read_boolean(fo):             # <<<<<<<<<<<<<<
 *     """
 *     a boolean is written as a single byte
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_boolean, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":94
 * 
 * 
 * def make_union_reader(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 */
  __pyx_tuple__97 = PyTuple_Pack(5, __pyx_n_s_union_schema, __pyx_n_s_readers, __pyx_n_s_union_reader, __pyx_n_s_union_reader, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_union_reader, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 94, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":105
 * 
 * 
 * def make_record_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 */
  __pyx_tuple__99 = PyTuple_Pack(5, __pyx_n_s_schema, __pyx_n_s_fields, __pyx_n_s_record_reader, __pyx_n_s_record_reader, __pyx_n_s_field); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_record_reader, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 105, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":114
 * 
 * 
 * def make_enum_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */
  __pyx_tuple__101 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_symbols, __pyx_n_s_enum_reader, __pyx_n_s_enum_reader); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_enum_reader, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 114, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":122
 *     return enum_reader
 * 
 * def make_array_reader(schema):             # <<<<<<<<<<<<<<
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):
 */
  __pyx_tuple__103 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_item_reader, __pyx_n_s_array_reader, __pyx_n_s_array_reader); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_array_reader, 122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 122, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":139
 *     return array_reader
 * 
 * def make_map_reader(schema):             # <<<<<<<<<<<<<<
 *     value_reader = get_reader(schema['values'])
 * 
 */
  __pyx_tuple__105 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_value_reader, __pyx_n_s_map_reader, __pyx_n_s_map_reader); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_map_reader, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 139, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":157
 *     return map_reader
 * 
 * def make_fixed_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef long size = schema['size']
 * 
 */
  __pyx_tuple__107 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_size, __pyx_n_s_fixed_reader, __pyx_n_s_fixed_reader); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_fixed_reader, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 157, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":165
 *     return fixed_reader
 * 
 * def make_null_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_null
 * 
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_null_reader, 165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 165, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":168
 *     return read_null
 * 
 * def make_string_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_utf8
 * 
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_string_reader, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 168, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":171
 *     return read_utf8
 * 
 * def make_boolean_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_boolean
 * 
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_boolean_reader, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 171, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":174
 *     return read_boolean
 * 
 * def make_double_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_double
 * 
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_double_reader, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 174, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":177
 *     return read_double
 * 
 * def make_long_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_long
 * 
 */
  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_long_reader, 177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 177, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":180
 *     return read_long
 * 
 * def make_byte_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_bytes
 * 
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_byte_reader, 180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 180, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":183
 *     return read_bytes
 * 
 * def make_float_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_float
 * 
 */
  __pyx_tuple__121 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_float_reader, 183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 183, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":187
 * 
 * 
 * def make_skip_reader(schema):             # <<<<<<<<<<<<<<
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 */
  __pyx_tuple__123 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_value_reader, __pyx_n_s_read_skip, __pyx_n_s_read_skip); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_skip_reader, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 187, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":198
 * 
 * 
 * def make_default_reader(schema):             # <<<<<<<<<<<<<<
 *     value = schema["value"]
 *     def read_default(fo):
 */
  __pyx_tuple__125 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_value, __pyx_n_s_read_default, __pyx_n_s_read_default); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_default_reader, 198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 198, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":228
 * 
 * class ReaderPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.reader = None
 * 
 */
  __pyx_tuple__127 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_init, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 228, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":231
 *         self.reader = None
 * 
 *     def __call__(self, fo):             # <<<<<<<<<<<<<<
 *         return self.reader(fo)
 * 
 */
  __pyx_tuple__129 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_call, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 231, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":234
 *         return self.reader(fo)
 * 
 * def get_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */
  __pyx_tuple__131 = PyTuple_Pack(7, __pyx_n_s_schema, __pyx_n_s_schema_type, __pyx_n_s_placeholder, __pyx_n_s_namespace, __pyx_n_s_record_name, __pyx_n_s_namspace_record_name, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_get_reader, 234, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 234, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":359
 * CheckField = namedtuple('CheckField', ['name', 'check'])
 * 
 * def get_check(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     return check_type_map[schema_type](schema)
 */
  __pyx_tuple__133 = PyTuple_Pack(2, __pyx_n_s_schema, __pyx_n_s_schema_type); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_get_check, 359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 359, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":364
 * 
 * 
 * def make_record_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 */
  __pyx_tuple__135 = PyTuple_Pack(5, __pyx_n_s_schema, __pyx_n_s_fields, __pyx_n_s_record_check, __pyx_n_s_record_check, __pyx_n_s_field); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_record_check, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 364, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":371
 * 
 * 
 * def make_enum_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 */
  __pyx_tuple__137 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_symbols, __pyx_n_s_enum_check, __pyx_n_s_enum_check); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_enum_check, 371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 371, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":378
 * 
 * 
 * def make_null_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: datum is None
 * 
 */
  __pyx_tuple__139 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_null_check, 378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 378, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":381
 *     return lambda datum: datum is None
 * 
 * def check_string(datum):             # <<<<<<<<<<<<<<
 *     return isinstance(datum, basestring)
 * 
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_check_string, 381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 381, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":384
 *     return isinstance(datum, basestring)
 * 
 * def make_string_check(schema):             # <<<<<<<<<<<<<<
 *     return check_string
 * 
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_string_check, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 384, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":387
 *     return check_string
 * 
 * def make_long_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_long_check, 387, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 387, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":390
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 * def make_boolean_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, bool)
 * 
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_boolean_check, 390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 390, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":396
 * #     return lambda datum: isinstance(datum, boolean)
 * 
 * def make_float_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */
  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_float_check, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 396, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":399
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_double_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */
  __pyx_tuple__151 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_double_check, 399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 399, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":402
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_byte_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_byte_check, 402, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 402, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":405
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 * def make_array_check(schema):             # <<<<<<<<<<<<<<
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 */
  __pyx_tuple__155 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_item_check, __pyx_n_s_array_check, __pyx_n_s_array_check); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_array_check, 405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 405, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":411
 *     return array_check
 * 
 * def make_union_check(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 */
  __pyx_tuple__157 = PyTuple_Pack(5, __pyx_n_s_union_schema, __pyx_n_s_union_checks, __pyx_n_s_union_check, __pyx_n_s_union_check, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_union_check, 411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 411, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":417
 *     return union_check
 * 
 * def make_fixed_check(schema):             # <<<<<<<<<<<<<<
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 */
  __pyx_tuple__159 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_size, __pyx_n_s_fixed_check, __pyx_n_s_fixed_check); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_fixed_check, 417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 417, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":423
 *     return fixed_check
 * 
 * def make_map_check(schema):             # <<<<<<<<<<<<<<
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 */
  __pyx_tuple__161 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_map_value_check, __pyx_n_s_map_check, __pyx_n_s_map_check); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_map_check, 423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 423, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":448
 * # ====================
 * 
 * def make_union_writer(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list type_list = [get_type(schema) for schema in union_schema]
 *     # cdef dict writer_lookup
 */
  __pyx_tuple__163 = PyTuple_Pack(15, __pyx_n_s_union_schema, __pyx_n_s_type_list, __pyx_n_s_writer_lookup_dict, __pyx_n_s_simple_union, __pyx_n_s_lookup_result, __pyx_n_s_idx, __pyx_n_s_simple_writer_lookup, __pyx_n_s_simple_writer_lookup, __pyx_n_s_writer_lookup, __pyx_n_s_schema, __pyx_n_s_python_type, __pyx_n_s_complex_writer_lookup, __pyx_n_s_complex_writer_lookup, __pyx_n_s_write_union, __pyx_n_s_write_union); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_union_writer, 448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 448, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":519
 *     return write_union
 * 
 * def make_enum_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_symbols, __pyx_n_s_write_enum, __pyx_n_s_write_enum); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_enum_writer, 519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 519, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":530
 * 
 * 
 * def make_record_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 */
  __pyx_tuple__167 = PyTuple_Pack(5, __pyx_n_s_schema, __pyx_n_s_fields, __pyx_n_s_write_record, __pyx_n_s_write_record, __pyx_n_s_field); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_record_writer, 530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 530, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":540
 * 
 * 
 * def make_array_writer(schema):             # <<<<<<<<<<<<<<
 *     item_writer = get_writer(schema['items'])
 * 
 */
  __pyx_tuple__169 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_item_writer, __pyx_n_s_write_array, __pyx_n_s_write_array); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_array_writer, 540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 540, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":554
 * 
 * 
 * def make_map_writer(schema):             # <<<<<<<<<<<<<<
 *     map_value_writer = get_writer(schema['values'])
 * 
 */
  __pyx_tuple__171 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_map_value_writer, __pyx_n_s_write_map, __pyx_n_s_write_map); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_map_writer, 554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 554, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":569
 * 
 * 
 * def make_boolean_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 */
  __pyx_tuple__173 = PyTuple_Pack(3, __pyx_n_s_schema, __pyx_n_s_checked_boolean_writer, __pyx_n_s_checked_boolean_writer); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_boolean_writer, 569, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 569, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":579
 * 
 * 
 * def make_fixed_writer(schema):             # <<<<<<<<<<<<<<
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']
 */
  __pyx_tuple__175 = PyTuple_Pack(4, __pyx_n_s_schema, __pyx_n_s_size, __pyx_n_s_checked_write_fixed, __pyx_n_s_checked_write_fixed); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_fixed_writer, 579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 579, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":591
 * 
 * 
 * def make_int_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 */
  __pyx_tuple__177 = PyTuple_Pack(3, __pyx_n_s_schema, __pyx_n_s_checked_int_write, __pyx_n_s_checked_int_write); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_int_writer, 591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 591, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":602
 * 
 * 
 * def make_long_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 */
  __pyx_tuple__179 = PyTuple_Pack(3, __pyx_n_s_schema, __pyx_n_s_checked_long_write, __pyx_n_s_checked_long_write); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_long_writer, 602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 602, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":613
 * 
 * 
 * def make_string_writer(schema):             # <<<<<<<<<<<<<<
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 */
  __pyx_tuple__181 = PyTuple_Pack(3, __pyx_n_s_schema, __pyx_n_s_checked_string_writer, __pyx_n_s_checked_string_writer); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_string_writer, 613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 613, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":621
 * 
 * 
 * def make_byte_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_bytes
 * 
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_byte_writer, 621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 621, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":625
 * 
 * 
 * def make_float_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_float
 * 
 */
  __pyx_tuple__185 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_float_writer, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 625, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":629
 * 
 * 
 * def make_double_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_double
 * 
 */
  __pyx_tuple__187 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_double_writer, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 629, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":633
 * 
 * 
 * def make_null_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_null
 * 
 */
  __pyx_tuple__189 = PyTuple_Pack(1, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_make_null_writer, 633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 633, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":657
 * 
 * class WriterPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.writer = None
 * 
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_init, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 657, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":660
 *         self.writer = None
 * 
 *     def __call__(self, fo, val):             # <<<<<<<<<<<<<<
 *         return self.writer(fo, val)
 * 
 */
  __pyx_tuple__193 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fo, __pyx_n_s_val); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_call, 660, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 660, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":664
 * 
 * 
 * def get_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */
  __pyx_tuple__195 = PyTuple_Pack(7, __pyx_n_s_schema, __pyx_n_s_schema_type, __pyx_n_s_placeholder, __pyx_n_s_namespace, __pyx_n_s_name, __pyx_n_s_fullname, __pyx_n_s_writer); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_get_writer, 664, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 664, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":699
 * class FastBinaryEncoder(object):
 *     """Write leaf values."""
 *     def __init__(self, writer):             # <<<<<<<<<<<<<<
 *         """
 *         writer is a Python object on which we can call write.
 */
  __pyx_tuple__197 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_writer); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_init, 699, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 699, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":705
 *         self.writer = writer
 * 
 *     def write(self, datum):             # <<<<<<<<<<<<<<
 *         self.writer.write(datum)
 * 
 */
  __pyx_tuple__199 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write, 705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 705, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":708
 *         self.writer.write(datum)
 * 
 *     def write_null(self, datum):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__201 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_null, 708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 708, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":711
 *         pass
 * 
 *     def write_boolean(self, datum):             # <<<<<<<<<<<<<<
 *         write_boolean(self.writer, datum)
 * 
 */
  __pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_boolean, 711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 711, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":714
 *         write_boolean(self.writer, datum)
 * 
 *     def write_int(self, datum):             # <<<<<<<<<<<<<<
 *         write_int(self.writer, datum)
 * 
 */
  __pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_int, 714, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 714, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":717
 *         write_int(self.writer, datum)
 * 
 *     def write_long(self, datum):             # <<<<<<<<<<<<<<
 *         write_long(self.writer, datum)
 * 
 */
  __pyx_tuple__207 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_long, 717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 717, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":720
 *         write_long(self.writer, datum)
 * 
 *     def write_float(self, datum):             # <<<<<<<<<<<<<<
 *         write_float(self.writer, datum)
 * 
 */
  __pyx_tuple__209 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_float, 720, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 720, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":723
 *         write_float(self.writer, datum)
 * 
 *     def write_double(self, datum):             # <<<<<<<<<<<<<<
 *         write_double(self.writer, datum)
 * 
 */
  __pyx_tuple__211 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_double, 723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 723, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":726
 *         write_double(self.writer, datum)
 * 
 *     def write_bytes(self, datum):             # <<<<<<<<<<<<<<
 *         write_bytes(self.writer, datum)
 * 
 */
  __pyx_tuple__213 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_bytes, 726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 726, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":729
 *         write_bytes(self.writer, datum)
 * 
 *     def write_utf8(self, datum):             # <<<<<<<<<<<<<<
 *         write_utf8(self.writer, datum)
 * 
 */
  __pyx_tuple__215 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_datum); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_utf8, 729, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 729, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":732
 *         write_utf8(self.writer, datum)
 * 
 *     def write_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         """
 *         A 4-byte, big-endian CRC32 checksum
 */
  __pyx_tuple__217 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_bytes); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_write_crc32, 732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 732, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":742
 * class FastBinaryDecoder(object):
 *     """Read leaf values."""
 *     def __init__(self, reader):             # <<<<<<<<<<<<<<
 *         """
 *         reader is a Python object on which we can call read, seek, and tell.
 */
  __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_init, 742, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 742, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":748
 *         self.reader = reader
 * 
 *     def read(self, n):             # <<<<<<<<<<<<<<
 *         return self.reader.read(n)
 * 
 */
  __pyx_tuple__221 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read, 748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 748, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":751
 *         return self.reader.read(n)
 * 
 *     def read_null(self):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_tuple__223 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_null, 751, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 751, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":754
 *         return None
 * 
 *     def read_boolean(self):             # <<<<<<<<<<<<<<
 *         return read_boolean(self.reader)
 * 
 */
  __pyx_tuple__225 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_boolean, 754, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 754, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":757
 *         return read_boolean(self.reader)
 * 
 *     def read_int(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */
  __pyx_tuple__227 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_int, 757, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 757, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":760
 *         return read_long(self.reader)
 * 
 *     def read_long(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */
  __pyx_tuple__229 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_long, 760, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 760, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":763
 *         return read_long(self.reader)
 * 
 *     def read_float(self):             # <<<<<<<<<<<<<<
 *         return read_float(self.reader)
 * 
 */
  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_float, 763, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 763, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":766
 *         return read_float(self.reader)
 * 
 *     def read_double(self):             # <<<<<<<<<<<<<<
 *         return read_double(self.reader)
 * 
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_double, 766, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 766, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":769
 *         return read_double(self.reader)
 * 
 *     def read_bytes(self):             # <<<<<<<<<<<<<<
 *         return read_bytes(self.reader)
 * 
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_bytes, 769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":772
 *         return read_bytes(self.reader)
 * 
 *     def read_utf8(self):             # <<<<<<<<<<<<<<
 *         return read_utf8(self.reader)
 * 
 */
  __pyx_tuple__237 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_read_utf8, 772, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 772, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":775
 *         return read_utf8(self.reader)
 * 
 *     def check_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:
 */
  __pyx_tuple__239 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_bytes, __pyx_n_s_checksum); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_check_crc32, 775, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 775, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":780
 *             raise RuntimeError("Checksum failure")
 * 
 *     def skip_null(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__241 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_null, 780, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 780, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":783
 *         pass
 * 
 *     def skip_boolean(self):             # <<<<<<<<<<<<<<
 *         self.reader.read(1)
 * 
 */
  __pyx_tuple__243 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_boolean, 783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 783, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":786
 *         self.reader.read(1)
 * 
 *     def skip_int(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */
  __pyx_tuple__245 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_int, 786, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 786, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":789
 *         read_long(self.reader)
 * 
 *     def skip_long(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_long, 789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 789, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":792
 *         read_long(self.reader)
 * 
 *     def skip_float(self):             # <<<<<<<<<<<<<<
 *         read_float(self.reader)
 * 
 */
  __pyx_tuple__249 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_float, 792, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 792, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":795
 *         read_float(self.reader)
 * 
 *     def skip_double(self):             # <<<<<<<<<<<<<<
 *         read_double(self.reader)
 * 
 */
  __pyx_tuple__251 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_double, 795, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 795, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":798
 *         read_double(self.reader)
 * 
 *     def skip_bytes(self):             # <<<<<<<<<<<<<<
 *         read_bytes(self.reader)
 * 
 */
  __pyx_tuple__253 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_bytes, 798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 798, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":801
 *         read_bytes(self.reader)
 * 
 *     def skip_utf8(self):             # <<<<<<<<<<<<<<
 *         read_utf8(self.reader)
 * 
 */
  __pyx_tuple__255 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip_utf8, 801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 801, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":804
 *         read_utf8(self.reader)
 * 
 *     def skip(self, n):             # <<<<<<<<<<<<<<
 *         self.reader.seek(self.reader.tell() + n)
 */
  __pyx_tuple__257 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opt_ps_spavro_src_spavro_fast_b, __pyx_n_s_skip, 804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2147483647 = PyInt_FromLong(2147483647L); if (unlikely(!__pyx_int_2147483647)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9223372036854775807 = PyInt_FromString((char *)"9223372036854775807", 0, 0); if (unlikely(!__pyx_int_9223372036854775807)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_2147483648 = PyInt_FromLong(-2147483648L); if (unlikely(!__pyx_int_neg_2147483648)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_9223372036854775808 = PyInt_FromString((char *)"-9223372036854775808", 0, 0); if (unlikely(!__pyx_int_neg_9223372036854775808)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initfast_binary(void); /*proto*/
PyMODINIT_FUNC initfast_binary(void)
#else
PyMODINIT_FUNC PyInit_fast_binary(void); /*proto*/
PyMODINIT_FUNC PyInit_fast_binary(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_fast_binary(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("fast_binary", __pyx_methods, __pyx_k_Fast_Cython_extension_for_readin, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_spavro__fast_binary) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "spavro.fast_binary")) {
      if (unlikely(PyDict_SetItemString(modules, "spavro.fast_binary", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct__make_union_reader) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct__make_union_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct__make_union_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct__make_union_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_1_make_record_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_2_make_enum_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_3_make_array_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_4_make_map_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_5_make_fixed_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader) < 0) __PYX_ERR(0, 187, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_6_make_skip_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_7_make_default_reader;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check) < 0) __PYX_ERR(0, 364, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_8_make_record_check;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check) < 0) __PYX_ERR(0, 371, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_9_make_enum_check;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_10_make_array_check;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_11_make_union_check;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_12_make_fixed_check;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_13_make_map_check;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_14_make_union_writer;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_15_make_enum_writer;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_16_make_record_writer;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer) < 0) __PYX_ERR(0, 540, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_17_make_array_writer;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_18_make_map_writer;
  if (PyType_Ready(&__pyx_type_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer) < 0) __PYX_ERR(0, 579, __pyx_L1_error)
  __pyx_type_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer.tp_print = 0;
  __pyx_ptype_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer = &__pyx_type_6spavro_11fast_binary___pyx_scope_struct_19_make_fixed_writer;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____long__long___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_object____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_object____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_object____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_unicode____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_unicode____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_unicode____object___to_py = &__pyx_scope_struct____Pyx_CFunc_unicode____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_double____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_double____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_double____object___to_py = &__pyx_scope_struct____Pyx_CFunc_double____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_long__long____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_long__long____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_long__long____object___to_py = &__pyx_scope_struct____Pyx_CFunc_long__long____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_bytes____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_bytes____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_bytes____object___to_py = &__pyx_scope_struct____Pyx_CFunc_bytes____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_float____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_float____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float____object___to_py = &__pyx_scope_struct____Pyx_CFunc_float____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_void____object____object___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____float___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_void____object____float___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____float___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____float___to_py;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____double___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_scope_struct____Pyx_CFunc_void____object____double___to_py.tp_print = 0;
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____double___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____double___to_py;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "spavro/fast_binary.pyx":8
 * no longer consult the schema saving lookups.'''
 * 
 * import six             # <<<<<<<<<<<<<<
 * INT_MIN_VALUE = -(1 << 31)
 * INT_MAX_VALUE = (1 << 31) - 1
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_six, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":9
 * 
 * import six
 * INT_MIN_VALUE = -(1 << 31)             # <<<<<<<<<<<<<<
 * INT_MAX_VALUE = (1 << 31) - 1
 * LONG_MIN_VALUE = -(1 << 63)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT_MIN_VALUE, __pyx_int_neg_2147483648) < 0) __PYX_ERR(0, 9, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":10
 * import six
 * INT_MIN_VALUE = -(1 << 31)
 * INT_MAX_VALUE = (1 << 31) - 1             # <<<<<<<<<<<<<<
 * LONG_MIN_VALUE = -(1 << 63)
 * LONG_MAX_VALUE = (1 << 63) - 1
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT_MAX_VALUE, __pyx_int_2147483647) < 0) __PYX_ERR(0, 10, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":11
 * INT_MIN_VALUE = -(1 << 31)
 * INT_MAX_VALUE = (1 << 31) - 1
 * LONG_MIN_VALUE = -(1 << 63)             # <<<<<<<<<<<<<<
 * LONG_MAX_VALUE = (1 << 63) - 1
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_MIN_VALUE, __pyx_int_neg_9223372036854775808) < 0) __PYX_ERR(0, 11, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":12
 * INT_MAX_VALUE = (1 << 31) - 1
 * LONG_MIN_VALUE = -(1 << 63)
 * LONG_MAX_VALUE = (1 << 63) - 1             # <<<<<<<<<<<<<<
 * 
 * cdef long long read_long(fo):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_MAX_VALUE, __pyx_int_9223372036854775807) < 0) __PYX_ERR(0, 12, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":45
 * 
 * 
 * def read_boolean(fo):             # <<<<<<<<<<<<<<
 *     """
 *     a boolean is written as a single byte
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_1read_boolean, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_boolean, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":81
 * 
 * # ======================================================================
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * ReadField = namedtuple('ReadField', ['name', 'reader', 'skip'])
 * WriteField = namedtuple('WriteField', ['name', 'writer'])
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_namedtuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __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_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_1) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":82
 * # ======================================================================
 * from collections import namedtuple
 * ReadField = namedtuple('ReadField', ['name', 'reader', 'skip'])             # <<<<<<<<<<<<<<
 * WriteField = namedtuple('WriteField', ['name', 'writer'])
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_name);
  __Pyx_INCREF(__pyx_n_s_reader);
  __Pyx_GIVEREF(__pyx_n_s_reader);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_reader);
  __Pyx_INCREF(__pyx_n_s_skip);
  __Pyx_GIVEREF(__pyx_n_s_skip);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_skip);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_ReadField, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_ReadField, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_ReadField);
    __Pyx_GIVEREF(__pyx_n_s_ReadField);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_ReadField);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReadField, __pyx_t_2) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":83
 * from collections import namedtuple
 * ReadField = namedtuple('ReadField', ['name', 'reader', 'skip'])
 * WriteField = namedtuple('WriteField', ['name', 'writer'])             # <<<<<<<<<<<<<<
 * 
 * cpdef unicode get_type(schema):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_name);
  __Pyx_INCREF(__pyx_n_s_writer);
  __Pyx_GIVEREF(__pyx_n_s_writer);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_writer);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_WriteField, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_WriteField, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_WriteField);
    __Pyx_GIVEREF(__pyx_n_s_WriteField);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_n_s_WriteField);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WriteField, __pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":94
 * 
 * 
 * def make_union_reader(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list readers = [get_reader(schema) for schema in union_schema]
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_5make_union_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_union_reader, __pyx_t_2) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":105
 * 
 * 
 * def make_record_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [ReadField(field['name'], get_reader(field['type']), get_type(field['type']) == 'skip') for field in schema['fields']]
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_7make_record_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_record_reader, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":114
 * 
 * 
 * def make_enum_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_9make_enum_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_enum_reader, __pyx_t_2) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":122
 *     return enum_reader
 * 
 * def make_array_reader(schema):             # <<<<<<<<<<<<<<
 *     item_reader = get_reader(schema['items'])
 *     def array_reader(fo):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_11make_array_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_array_reader, __pyx_t_2) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":139
 *     return array_reader
 * 
 * def make_map_reader(schema):             # <<<<<<<<<<<<<<
 *     value_reader = get_reader(schema['values'])
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_13make_map_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_map_reader, __pyx_t_2) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":157
 *     return map_reader
 * 
 * def make_fixed_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef long size = schema['size']
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_15make_fixed_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_fixed_reader, __pyx_t_2) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":165
 *     return fixed_reader
 * 
 * def make_null_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_null
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17make_null_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_null_reader, __pyx_t_2) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":168
 *     return read_null
 * 
 * def make_string_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_utf8
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_19make_string_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_string_reader, __pyx_t_2) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":171
 *     return read_utf8
 * 
 * def make_boolean_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_boolean
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_21make_boolean_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_boolean_reader, __pyx_t_2) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":174
 *     return read_boolean
 * 
 * def make_double_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_double
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_23make_double_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_double_reader, __pyx_t_2) < 0) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":177
 *     return read_double
 * 
 * def make_long_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_long
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_25make_long_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_long_reader, __pyx_t_2) < 0) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":180
 *     return read_long
 * 
 * def make_byte_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_bytes
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_27make_byte_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_byte_reader, __pyx_t_2) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":183
 *     return read_bytes
 * 
 * def make_float_reader(schema):             # <<<<<<<<<<<<<<
 *     return read_float
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_29make_float_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_float_reader, __pyx_t_2) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":187
 * 
 * 
 * def make_skip_reader(schema):             # <<<<<<<<<<<<<<
 *     # this will create a regular reader that will iterate the bytes
 *     # in the avro stream properly
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_31make_skip_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_skip_reader, __pyx_t_2) < 0) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":198
 * 
 * 
 * def make_default_reader(schema):             # <<<<<<<<<<<<<<
 *     value = schema["value"]
 *     def read_default(fo):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_33make_default_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_default_reader, __pyx_t_2) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":207
 * 
 * reader_type_map = {
 *     'union': make_union_reader,             # <<<<<<<<<<<<<<
 *     'record': make_record_reader,
 *     'null': make_null_reader,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_union_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_union, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":208
 * reader_type_map = {
 *     'union': make_union_reader,
 *     'record': make_record_reader,             # <<<<<<<<<<<<<<
 *     'null': make_null_reader,
 *     'string': make_string_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_record_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_record, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":209
 *     'union': make_union_reader,
 *     'record': make_record_reader,
 *     'null': make_null_reader,             # <<<<<<<<<<<<<<
 *     'string': make_string_reader,
 *     'boolean': make_boolean_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_null_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_null, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":210
 *     'record': make_record_reader,
 *     'null': make_null_reader,
 *     'string': make_string_reader,             # <<<<<<<<<<<<<<
 *     'boolean': make_boolean_reader,
 *     'double': make_double_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_string_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_string, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":211
 *     'null': make_null_reader,
 *     'string': make_string_reader,
 *     'boolean': make_boolean_reader,             # <<<<<<<<<<<<<<
 *     'double': make_double_reader,
 *     'float': make_float_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_boolean_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_boolean, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":212
 *     'string': make_string_reader,
 *     'boolean': make_boolean_reader,
 *     'double': make_double_reader,             # <<<<<<<<<<<<<<
 *     'float': make_float_reader,
 *     'long': make_long_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_double_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_double, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":213
 *     'boolean': make_boolean_reader,
 *     'double': make_double_reader,
 *     'float': make_float_reader,             # <<<<<<<<<<<<<<
 *     'long': make_long_reader,
 *     'bytes': make_byte_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_float_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_float, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":214
 *     'double': make_double_reader,
 *     'float': make_float_reader,
 *     'long': make_long_reader,             # <<<<<<<<<<<<<<
 *     'bytes': make_byte_reader,
 *     'int': make_long_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_long_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_long, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":215
 *     'float': make_float_reader,
 *     'long': make_long_reader,
 *     'bytes': make_byte_reader,             # <<<<<<<<<<<<<<
 *     'int': make_long_reader,
 *     'fixed': make_fixed_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_byte_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bytes, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":216
 *     'long': make_long_reader,
 *     'bytes': make_byte_reader,
 *     'int': make_long_reader,             # <<<<<<<<<<<<<<
 *     'fixed': make_fixed_reader,
 *     'enum': make_enum_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_long_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_int, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":217
 *     'bytes': make_byte_reader,
 *     'int': make_long_reader,
 *     'fixed': make_fixed_reader,             # <<<<<<<<<<<<<<
 *     'enum': make_enum_reader,
 *     'array': make_array_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_fixed_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fixed, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":218
 *     'int': make_long_reader,
 *     'fixed': make_fixed_reader,
 *     'enum': make_enum_reader,             # <<<<<<<<<<<<<<
 *     'array': make_array_reader,
 *     'map': make_map_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_enum_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":219
 *     'fixed': make_fixed_reader,
 *     'enum': make_enum_reader,
 *     'array': make_array_reader,             # <<<<<<<<<<<<<<
 *     'map': make_map_reader,
 *     'skip': make_skip_reader,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_array_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":220
 *     'enum': make_enum_reader,
 *     'array': make_array_reader,
 *     'map': make_map_reader,             # <<<<<<<<<<<<<<
 *     'skip': make_skip_reader,
 *     'default': make_default_reader
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_map_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_map, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":221
 *     'array': make_array_reader,
 *     'map': make_map_reader,
 *     'skip': make_skip_reader,             # <<<<<<<<<<<<<<
 *     'default': make_default_reader
 * }
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_skip_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_skip, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":223
 *     'skip': make_skip_reader,
 *     'default': make_default_reader
 * }             # <<<<<<<<<<<<<<
 * 
 * schema_cache = {}
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_default_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reader_type_map, __pyx_t_2) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":225
 * }
 * 
 * schema_cache = {}             # <<<<<<<<<<<<<<
 * 
 * class ReaderPlaceholder(object):
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_schema_cache, __pyx_t_2) < 0) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":227
 * schema_cache = {}
 * 
 * class ReaderPlaceholder(object):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         self.reader = None
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ReaderPlaceholder, __pyx_n_s_ReaderPlaceholder, (PyObject *) NULL, __pyx_n_s_spavro_fast_binary, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "spavro/fast_binary.pyx":228
 * 
 * class ReaderPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.reader = None
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17ReaderPlaceholder_1__init__, 0, __pyx_n_s_ReaderPlaceholder___init, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "spavro/fast_binary.pyx":231
 *         self.reader = None
 * 
 *     def __call__(self, fo):             # <<<<<<<<<<<<<<
 *         return self.reader(fo)
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17ReaderPlaceholder_3__call__, 0, __pyx_n_s_ReaderPlaceholder___call, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_call, __pyx_t_6) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "spavro/fast_binary.pyx":227
 * schema_cache = {}
 * 
 * class ReaderPlaceholder(object):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         self.reader = None
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ReaderPlaceholder, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReaderPlaceholder, __pyx_t_6) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":234
 *         return self.reader(fo)
 * 
 * def get_reader(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_35get_reader, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_reader, __pyx_t_2) < 0) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":275
 *     outbuf.write((<char *>&datum)[:sizeof(char)])
 * 
 * write_long = write_int             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_CFunc_void____object____long__long___to_py(__pyx_f_6spavro_11fast_binary_write_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_write_long, __pyx_t_2) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":330
 * 
 * avro_to_py = {
 *     u"string": unicode,             # <<<<<<<<<<<<<<
 *     u"int": int,
 *     u"long": int,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_string, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":331
 * avro_to_py = {
 *     u"string": unicode,
 *     u"int": int,             # <<<<<<<<<<<<<<
 *     u"long": int,
 *     u"boolean": bool,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_int, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":332
 *     u"string": unicode,
 *     u"int": int,
 *     u"long": int,             # <<<<<<<<<<<<<<
 *     u"boolean": bool,
 *     u"null": type(None),
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_long, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":333
 *     u"int": int,
 *     u"long": int,
 *     u"boolean": bool,             # <<<<<<<<<<<<<<
 *     u"null": type(None),
 *     u"float": float,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_boolean, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":334
 *     u"long": int,
 *     u"boolean": bool,
 *     u"null": type(None),             # <<<<<<<<<<<<<<
 *     u"float": float,
 *     u"double": float,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_null, ((PyObject *)Py_TYPE(Py_None))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":335
 *     u"boolean": bool,
 *     u"null": type(None),
 *     u"float": float,             # <<<<<<<<<<<<<<
 *     u"double": float,
 *     u"array": list,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_float, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":336
 *     u"null": type(None),
 *     u"float": float,
 *     u"double": float,             # <<<<<<<<<<<<<<
 *     u"array": list,
 *     u"record": dict,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_double, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":337
 *     u"float": float,
 *     u"double": float,
 *     u"array": list,             # <<<<<<<<<<<<<<
 *     u"record": dict,
 *     u"enum": unicode,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_array, ((PyObject *)(&PyList_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":338
 *     u"double": float,
 *     u"array": list,
 *     u"record": dict,             # <<<<<<<<<<<<<<
 *     u"enum": unicode,
 *     u"fixed": str,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_record, ((PyObject *)(&PyDict_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":339
 *     u"array": list,
 *     u"record": dict,
 *     u"enum": unicode,             # <<<<<<<<<<<<<<
 *     u"fixed": str,
 *     u"map": dict
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_enum, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":340
 *     u"record": dict,
 *     u"enum": unicode,
 *     u"fixed": str,             # <<<<<<<<<<<<<<
 *     u"map": dict
 * }
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_fixed, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":342
 *     u"fixed": str,
 *     u"map": dict
 * }             # <<<<<<<<<<<<<<
 * 
 * py_to_avro = {
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_map, ((PyObject *)(&PyDict_Type))) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_avro_to_py, __pyx_t_2) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":345
 * 
 * py_to_avro = {
 *     unicode: u'string',             # <<<<<<<<<<<<<<
 *     str: u'string',
 *     int: u'int',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyUnicode_Type)), __pyx_n_u_string) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":346
 * py_to_avro = {
 *     unicode: u'string',
 *     str: u'string',             # <<<<<<<<<<<<<<
 *     int: u'int',
 *     long: u'long',
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyString_Type)), __pyx_n_u_string) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":347
 *     unicode: u'string',
 *     str: u'string',
 *     int: u'int',             # <<<<<<<<<<<<<<
 *     long: u'long',
 *     bool: u'boolean',
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyInt_Type)), __pyx_n_u_int) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":348
 *     str: u'string',
 *     int: u'int',
 *     long: u'long',             # <<<<<<<<<<<<<<
 *     bool: u'boolean',
 *     type(None): u'null',
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyLong_Type)), __pyx_n_u_long) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":349
 *     int: u'int',
 *     long: u'long',
 *     bool: u'boolean',             # <<<<<<<<<<<<<<
 *     type(None): u'null',
 *     float: u'double',
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject*)&PyBool_Type), __pyx_n_u_boolean) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":350
 *     long: u'long',
 *     bool: u'boolean',
 *     type(None): u'null',             # <<<<<<<<<<<<<<
 *     float: u'double',
 *     list: u'array',
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)Py_TYPE(Py_None)), __pyx_n_u_null) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":351
 *     bool: u'boolean',
 *     type(None): u'null',
 *     float: u'double',             # <<<<<<<<<<<<<<
 *     list: u'array',
 *     dict: u'record'
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyFloat_Type)), __pyx_n_u_double) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":352
 *     type(None): u'null',
 *     float: u'double',
 *     list: u'array',             # <<<<<<<<<<<<<<
 *     dict: u'record'
 * }
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyList_Type)), __pyx_n_u_array) < 0) __PYX_ERR(0, 345, __pyx_L1_error)

  /* "spavro/fast_binary.pyx":353
 *     float: u'double',
 *     list: u'array',
 *     dict: u'record'             # <<<<<<<<<<<<<<
 * }
 * 
 */
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)(&PyDict_Type)), __pyx_n_u_record) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_to_avro, __pyx_t_2) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":357
 * 
 * # ===============================
 * CheckField = namedtuple('CheckField', ['name', 'check'])             # <<<<<<<<<<<<<<
 * 
 * def get_check(schema):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_name);
  __Pyx_INCREF(__pyx_n_s_check);
  __Pyx_GIVEREF(__pyx_n_s_check);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_check);
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_CheckField, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_CheckField, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_CheckField);
    __Pyx_GIVEREF(__pyx_n_s_CheckField);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_n_s_CheckField);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CheckField, __pyx_t_2) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":359
 * CheckField = namedtuple('CheckField', ['name', 'check'])
 * 
 * def get_check(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     return check_type_map[schema_type](schema)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_37get_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_check, __pyx_t_2) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":364
 * 
 * 
 * def make_record_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [CheckField(field['name'], get_check(field['type'])) for field in schema['fields']]
 *     def record_check(datum):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_39make_record_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_record_check, __pyx_t_2) < 0) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":371
 * 
 * 
 * def make_enum_check(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 *     def enum_check(datum):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_41make_enum_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_enum_check, __pyx_t_2) < 0) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":378
 * 
 * 
 * def make_null_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: datum is None
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_43make_null_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_null_check, __pyx_t_2) < 0) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":381
 *     return lambda datum: datum is None
 * 
 * def check_string(datum):             # <<<<<<<<<<<<<<
 *     return isinstance(datum, basestring)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_45check_string, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_string, __pyx_t_2) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":384
 *     return isinstance(datum, basestring)
 * 
 * def make_string_check(schema):             # <<<<<<<<<<<<<<
 *     return check_string
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_47make_string_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_string_check, __pyx_t_2) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":387
 *     return check_string
 * 
 * def make_long_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_49make_long_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_long_check, __pyx_t_2) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":390
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long)
 * 
 * def make_boolean_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, bool)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_51make_boolean_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_boolean_check, __pyx_t_2) < 0) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":396
 * #     return lambda datum: isinstance(datum, boolean)
 * 
 * def make_float_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_53make_float_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_float_check, __pyx_t_2) < 0) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":399
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_double_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_55make_double_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_double_check, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":402
 *     return lambda datum: isinstance(datum, int) or isinstance(datum, long) or isinstance(datum, float)
 * 
 * def make_byte_check(schema):             # <<<<<<<<<<<<<<
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_57make_byte_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_byte_check, __pyx_t_2) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":405
 *     return lambda datum: isinstance(datum, str) or isinstance(datum, bytes)
 * 
 * def make_array_check(schema):             # <<<<<<<<<<<<<<
 *     item_check = get_check(schema['items'])
 *     def array_check(datum):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_59make_array_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_array_check, __pyx_t_2) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":411
 *     return array_check
 * 
 * def make_union_check(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list union_checks = [get_check(schema) for schema in union_schema]
 *     def union_check(datum):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_61make_union_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_union_check, __pyx_t_2) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":417
 *     return union_check
 * 
 * def make_fixed_check(schema):             # <<<<<<<<<<<<<<
 *     cdef int size = schema['size']
 *     def fixed_check(datum):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_63make_fixed_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_fixed_check, __pyx_t_2) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":423
 *     return fixed_check
 * 
 * def make_map_check(schema):             # <<<<<<<<<<<<<<
 *     map_value_check = get_check(schema['values'])
 *     def map_check(datum):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_65make_map_check, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_map_check, __pyx_t_2) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":430
 * 
 * check_type_map = {
 *     'union': make_union_check,             # <<<<<<<<<<<<<<
 *     'record': make_record_check,
 *     'null': make_null_check,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_union_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_union, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":431
 * check_type_map = {
 *     'union': make_union_check,
 *     'record': make_record_check,             # <<<<<<<<<<<<<<
 *     'null': make_null_check,
 *     'string': make_string_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_record_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_record, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":432
 *     'union': make_union_check,
 *     'record': make_record_check,
 *     'null': make_null_check,             # <<<<<<<<<<<<<<
 *     'string': make_string_check,
 *     'boolean': make_boolean_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_null_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_null, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":433
 *     'record': make_record_check,
 *     'null': make_null_check,
 *     'string': make_string_check,             # <<<<<<<<<<<<<<
 *     'boolean': make_boolean_check,
 *     'double': make_double_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_string_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_string, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":434
 *     'null': make_null_check,
 *     'string': make_string_check,
 *     'boolean': make_boolean_check,             # <<<<<<<<<<<<<<
 *     'double': make_double_check,
 *     'float': make_float_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_boolean_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_boolean, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":435
 *     'string': make_string_check,
 *     'boolean': make_boolean_check,
 *     'double': make_double_check,             # <<<<<<<<<<<<<<
 *     'float': make_float_check,
 *     'long': make_long_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_double_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_double, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":436
 *     'boolean': make_boolean_check,
 *     'double': make_double_check,
 *     'float': make_float_check,             # <<<<<<<<<<<<<<
 *     'long': make_long_check,
 *     'bytes': make_byte_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_float_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_float, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":437
 *     'double': make_double_check,
 *     'float': make_float_check,
 *     'long': make_long_check,             # <<<<<<<<<<<<<<
 *     'bytes': make_byte_check,
 *     'int': make_long_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_long_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_long, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":438
 *     'float': make_float_check,
 *     'long': make_long_check,
 *     'bytes': make_byte_check,             # <<<<<<<<<<<<<<
 *     'int': make_long_check,
 *     'fixed': make_fixed_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_byte_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bytes, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":439
 *     'long': make_long_check,
 *     'bytes': make_byte_check,
 *     'int': make_long_check,             # <<<<<<<<<<<<<<
 *     'fixed': make_fixed_check,
 *     'enum': make_enum_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_long_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_int, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":440
 *     'bytes': make_byte_check,
 *     'int': make_long_check,
 *     'fixed': make_fixed_check,             # <<<<<<<<<<<<<<
 *     'enum': make_enum_check,
 *     'array': make_array_check,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_fixed_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fixed, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":441
 *     'int': make_long_check,
 *     'fixed': make_fixed_check,
 *     'enum': make_enum_check,             # <<<<<<<<<<<<<<
 *     'array': make_array_check,
 *     'map': make_map_check
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_enum_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":442
 *     'fixed': make_fixed_check,
 *     'enum': make_enum_check,
 *     'array': make_array_check,             # <<<<<<<<<<<<<<
 *     'map': make_map_check
 * }
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_array_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":444
 *     'array': make_array_check,
 *     'map': make_map_check
 * }             # <<<<<<<<<<<<<<
 * 
 * # ====================
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_map_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_map, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_type_map, __pyx_t_2) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":448
 * # ====================
 * 
 * def make_union_writer(union_schema):             # <<<<<<<<<<<<<<
 *     cdef list type_list = [get_type(schema) for schema in union_schema]
 *     # cdef dict writer_lookup
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_67make_union_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_union_writer, __pyx_t_2) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":519
 *     return write_union
 * 
 * def make_enum_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list symbols = schema['symbols']
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_69make_enum_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_enum_writer, __pyx_t_2) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":530
 * 
 * 
 * def make_record_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef list fields = [WriteField(field['name'], get_writer(field['type'])) for field in schema['fields']]
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_71make_record_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_record_writer, __pyx_t_2) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":540
 * 
 * 
 * def make_array_writer(schema):             # <<<<<<<<<<<<<<
 *     item_writer = get_writer(schema['items'])
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_73make_array_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_array_writer, __pyx_t_2) < 0) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":554
 * 
 * 
 * def make_map_writer(schema):             # <<<<<<<<<<<<<<
 *     map_value_writer = get_writer(schema['values'])
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_75make_map_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_map_writer, __pyx_t_2) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":569
 * 
 * 
 * def make_boolean_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a boolean writer, adds a validation step before the actual
 *     write function'''
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_77make_boolean_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_boolean_writer, __pyx_t_2) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":579
 * 
 * 
 * def make_fixed_writer(schema):             # <<<<<<<<<<<<<<
 *     '''A writer that must write X bytes defined by the schema'''
 *     cdef long size = schema['size']
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_79make_fixed_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_fixed_writer, __pyx_t_2) < 0) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":591
 * 
 * 
 * def make_int_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a int writer, adds a validation step before the actual
 *     write function to make sure the int value doesn't overflow'''
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_81make_int_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_int_writer, __pyx_t_2) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":602
 * 
 * 
 * def make_long_writer(schema):             # <<<<<<<<<<<<<<
 *     '''Create a long writer, adds a validation step before the actual
 *     write function to make sure the long value doesn't overflow'''
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_83make_long_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_long_writer, __pyx_t_2) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":613
 * 
 * 
 * def make_string_writer(schema):             # <<<<<<<<<<<<<<
 *     def checked_string_writer(outbuf, datum):
 *         if not isinstance(datum, six.string_types):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_85make_string_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_string_writer, __pyx_t_2) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":621
 * 
 * 
 * def make_byte_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_bytes
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_87make_byte_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_byte_writer, __pyx_t_2) < 0) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":625
 * 
 * 
 * def make_float_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_float
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_89make_float_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_float_writer, __pyx_t_2) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":629
 * 
 * 
 * def make_double_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_double
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_91make_double_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_double_writer, __pyx_t_2) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":633
 * 
 * 
 * def make_null_writer(schema):             # <<<<<<<<<<<<<<
 *     return write_null
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_93make_null_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_null_writer, __pyx_t_2) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":639
 * # writer
 * writer_type_map = {
 *     'union': make_union_writer,             # <<<<<<<<<<<<<<
 *     'record': make_record_writer,
 *     'null': make_null_writer,
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_union_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_union, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":640
 * writer_type_map = {
 *     'union': make_union_writer,
 *     'record': make_record_writer,             # <<<<<<<<<<<<<<
 *     'null': make_null_writer,
 *     'string': make_string_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_record_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_record, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":641
 *     'union': make_union_writer,
 *     'record': make_record_writer,
 *     'null': make_null_writer,             # <<<<<<<<<<<<<<
 *     'string': make_string_writer,
 *     'boolean': make_boolean_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_null_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_null, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":642
 *     'record': make_record_writer,
 *     'null': make_null_writer,
 *     'string': make_string_writer,             # <<<<<<<<<<<<<<
 *     'boolean': make_boolean_writer,
 *     'double': make_double_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_string_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_string, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":643
 *     'null': make_null_writer,
 *     'string': make_string_writer,
 *     'boolean': make_boolean_writer,             # <<<<<<<<<<<<<<
 *     'double': make_double_writer,
 *     'float': make_float_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_boolean_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_boolean, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":644
 *     'string': make_string_writer,
 *     'boolean': make_boolean_writer,
 *     'double': make_double_writer,             # <<<<<<<<<<<<<<
 *     'float': make_float_writer,
 *     'long': make_long_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_double_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_double, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":645
 *     'boolean': make_boolean_writer,
 *     'double': make_double_writer,
 *     'float': make_float_writer,             # <<<<<<<<<<<<<<
 *     'long': make_long_writer,
 *     'bytes': make_byte_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_float_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_float, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":646
 *     'double': make_double_writer,
 *     'float': make_float_writer,
 *     'long': make_long_writer,             # <<<<<<<<<<<<<<
 *     'bytes': make_byte_writer,
 *     'int': make_int_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_long_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_long, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":647
 *     'float': make_float_writer,
 *     'long': make_long_writer,
 *     'bytes': make_byte_writer,             # <<<<<<<<<<<<<<
 *     'int': make_int_writer,
 *     'fixed': make_fixed_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_byte_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bytes, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":648
 *     'long': make_long_writer,
 *     'bytes': make_byte_writer,
 *     'int': make_int_writer,             # <<<<<<<<<<<<<<
 *     'fixed': make_fixed_writer,
 *     'enum': make_enum_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_int_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_int, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":649
 *     'bytes': make_byte_writer,
 *     'int': make_int_writer,
 *     'fixed': make_fixed_writer,             # <<<<<<<<<<<<<<
 *     'enum': make_enum_writer,
 *     'array': make_array_writer,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_fixed_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fixed, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":650
 *     'int': make_int_writer,
 *     'fixed': make_fixed_writer,
 *     'enum': make_enum_writer,             # <<<<<<<<<<<<<<
 *     'array': make_array_writer,
 *     'map': make_map_writer
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_enum_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":651
 *     'fixed': make_fixed_writer,
 *     'enum': make_enum_writer,
 *     'array': make_array_writer,             # <<<<<<<<<<<<<<
 *     'map': make_map_writer
 * }
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_array_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":653
 *     'array': make_array_writer,
 *     'map': make_map_writer
 * }             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_map_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_map, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_writer_type_map, __pyx_t_2) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":656
 * 
 * 
 * class WriterPlaceholder(object):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         self.writer = None
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_WriterPlaceholder, __pyx_n_s_WriterPlaceholder, (PyObject *) NULL, __pyx_n_s_spavro_fast_binary, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "spavro/fast_binary.pyx":657
 * 
 * class WriterPlaceholder(object):
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.writer = None
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17WriterPlaceholder_1__init__, 0, __pyx_n_s_WriterPlaceholder___init, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":660
 *         self.writer = None
 * 
 *     def __call__(self, fo, val):             # <<<<<<<<<<<<<<
 *         return self.writer(fo, val)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17WriterPlaceholder_3__call__, 0, __pyx_n_s_WriterPlaceholder___call, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_call, __pyx_t_4) < 0) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":656
 * 
 * 
 * class WriterPlaceholder(object):             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         self.writer = None
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_WriterPlaceholder, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WriterPlaceholder, __pyx_t_4) < 0) __PYX_ERR(0, 656, __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;

  /* "spavro/fast_binary.pyx":664
 * 
 * 
 * def get_writer(schema):             # <<<<<<<<<<<<<<
 *     cdef unicode schema_type = get_type(schema)
 *     if schema_type in ('record', 'fixed', 'enum'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_95get_writer, NULL, __pyx_n_s_spavro_fast_binary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_writer, __pyx_t_2) < 0) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":693
 * 
 * 
 * import struct             # <<<<<<<<<<<<<<
 * from binascii import crc32
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_struct, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_2) < 0) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spavro/fast_binary.pyx":694
 * 
 * import struct
 * from binascii import crc32             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_crc32);
  __Pyx_GIVEREF(__pyx_n_s_crc32);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_crc32);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_binascii, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_crc32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_crc32, __pyx_t_2) < 0) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spavro/fast_binary.pyx":697
 * 
 * 
 * class FastBinaryEncoder(object):             # <<<<<<<<<<<<<<
 *     """Write leaf values."""
 *     def __init__(self, writer):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FastBinaryEncoder, __pyx_n_s_FastBinaryEncoder, (PyObject *) NULL, __pyx_n_s_spavro_fast_binary, __pyx_kp_s_Write_leaf_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "spavro/fast_binary.pyx":699
 * class FastBinaryEncoder(object):
 *     """Write leaf values."""
 *     def __init__(self, writer):             # <<<<<<<<<<<<<<
 *         """
 *         writer is a Python object on which we can call write.
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_1__init__, 0, __pyx_n_s_FastBinaryEncoder___init, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":705
 *         self.writer = writer
 * 
 *     def write(self, datum):             # <<<<<<<<<<<<<<
 *         self.writer.write(datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_3write, 0, __pyx_n_s_FastBinaryEncoder_write, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write, __pyx_t_4) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":708
 *         self.writer.write(datum)
 * 
 *     def write_null(self, datum):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_5write_null, 0, __pyx_n_s_FastBinaryEncoder_write_null, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_null, __pyx_t_4) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":711
 *         pass
 * 
 *     def write_boolean(self, datum):             # <<<<<<<<<<<<<<
 *         write_boolean(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_7write_boolean, 0, __pyx_n_s_FastBinaryEncoder_write_boolean, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_boolean, __pyx_t_4) < 0) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":714
 *         write_boolean(self.writer, datum)
 * 
 *     def write_int(self, datum):             # <<<<<<<<<<<<<<
 *         write_int(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_9write_int, 0, __pyx_n_s_FastBinaryEncoder_write_int, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_int, __pyx_t_4) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":717
 *         write_int(self.writer, datum)
 * 
 *     def write_long(self, datum):             # <<<<<<<<<<<<<<
 *         write_long(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_11write_long, 0, __pyx_n_s_FastBinaryEncoder_write_long, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_long, __pyx_t_4) < 0) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":720
 *         write_long(self.writer, datum)
 * 
 *     def write_float(self, datum):             # <<<<<<<<<<<<<<
 *         write_float(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_13write_float, 0, __pyx_n_s_FastBinaryEncoder_write_float, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_float, __pyx_t_4) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":723
 *         write_float(self.writer, datum)
 * 
 *     def write_double(self, datum):             # <<<<<<<<<<<<<<
 *         write_double(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_15write_double, 0, __pyx_n_s_FastBinaryEncoder_write_double, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_double, __pyx_t_4) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":726
 *         write_double(self.writer, datum)
 * 
 *     def write_bytes(self, datum):             # <<<<<<<<<<<<<<
 *         write_bytes(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_17write_bytes, 0, __pyx_n_s_FastBinaryEncoder_write_bytes, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_bytes, __pyx_t_4) < 0) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":729
 *         write_bytes(self.writer, datum)
 * 
 *     def write_utf8(self, datum):             # <<<<<<<<<<<<<<
 *         write_utf8(self.writer, datum)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_19write_utf8, 0, __pyx_n_s_FastBinaryEncoder_write_utf8, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_utf8, __pyx_t_4) < 0) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":732
 *         write_utf8(self.writer, datum)
 * 
 *     def write_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         """
 *         A 4-byte, big-endian CRC32 checksum
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryEncoder_21write_crc32, 0, __pyx_n_s_FastBinaryEncoder_write_crc32, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_write_crc32, __pyx_t_4) < 0) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":697
 * 
 * 
 * class FastBinaryEncoder(object):             # <<<<<<<<<<<<<<
 *     """Write leaf values."""
 *     def __init__(self, writer):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FastBinaryEncoder, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FastBinaryEncoder, __pyx_t_4) < 0) __PYX_ERR(0, 697, __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;

  /* "spavro/fast_binary.pyx":740
 * 
 * 
 * class FastBinaryDecoder(object):             # <<<<<<<<<<<<<<
 *     """Read leaf values."""
 *     def __init__(self, reader):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FastBinaryDecoder, __pyx_n_s_FastBinaryDecoder, (PyObject *) NULL, __pyx_n_s_spavro_fast_binary, __pyx_kp_s_Read_leaf_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "spavro/fast_binary.pyx":742
 * class FastBinaryDecoder(object):
 *     """Read leaf values."""
 *     def __init__(self, reader):             # <<<<<<<<<<<<<<
 *         """
 *         reader is a Python object on which we can call read, seek, and tell.
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_1__init__, 0, __pyx_n_s_FastBinaryDecoder___init, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":748
 *         self.reader = reader
 * 
 *     def read(self, n):             # <<<<<<<<<<<<<<
 *         return self.reader.read(n)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_3read, 0, __pyx_n_s_FastBinaryDecoder_read, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":751
 *         return self.reader.read(n)
 * 
 *     def read_null(self):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_5read_null, 0, __pyx_n_s_FastBinaryDecoder_read_null, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_null, __pyx_t_4) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":754
 *         return None
 * 
 *     def read_boolean(self):             # <<<<<<<<<<<<<<
 *         return read_boolean(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_7read_boolean, 0, __pyx_n_s_FastBinaryDecoder_read_boolean, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_boolean, __pyx_t_4) < 0) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":757
 *         return read_boolean(self.reader)
 * 
 *     def read_int(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_9read_int, 0, __pyx_n_s_FastBinaryDecoder_read_int, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_int, __pyx_t_4) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":760
 *         return read_long(self.reader)
 * 
 *     def read_long(self):             # <<<<<<<<<<<<<<
 *         return read_long(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_11read_long, 0, __pyx_n_s_FastBinaryDecoder_read_long, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_long, __pyx_t_4) < 0) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":763
 *         return read_long(self.reader)
 * 
 *     def read_float(self):             # <<<<<<<<<<<<<<
 *         return read_float(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_13read_float, 0, __pyx_n_s_FastBinaryDecoder_read_float, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_float, __pyx_t_4) < 0) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":766
 *         return read_float(self.reader)
 * 
 *     def read_double(self):             # <<<<<<<<<<<<<<
 *         return read_double(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_15read_double, 0, __pyx_n_s_FastBinaryDecoder_read_double, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_double, __pyx_t_4) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":769
 *         return read_double(self.reader)
 * 
 *     def read_bytes(self):             # <<<<<<<<<<<<<<
 *         return read_bytes(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_17read_bytes, 0, __pyx_n_s_FastBinaryDecoder_read_bytes, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_bytes, __pyx_t_4) < 0) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":772
 *         return read_bytes(self.reader)
 * 
 *     def read_utf8(self):             # <<<<<<<<<<<<<<
 *         return read_utf8(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_19read_utf8, 0, __pyx_n_s_FastBinaryDecoder_read_utf8, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_utf8, __pyx_t_4) < 0) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":775
 *         return read_utf8(self.reader)
 * 
 *     def check_crc32(self, bytes):             # <<<<<<<<<<<<<<
 *         checksum = struct.unpack("!I", self.reader.read(4))[0]
 *         if crc32(bytes) & 0xffffffff != checksum:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_21check_crc32, 0, __pyx_n_s_FastBinaryDecoder_check_crc32, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_check_crc32, __pyx_t_4) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":780
 *             raise RuntimeError("Checksum failure")
 * 
 *     def skip_null(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_23skip_null, 0, __pyx_n_s_FastBinaryDecoder_skip_null, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_null, __pyx_t_4) < 0) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":783
 *         pass
 * 
 *     def skip_boolean(self):             # <<<<<<<<<<<<<<
 *         self.reader.read(1)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_25skip_boolean, 0, __pyx_n_s_FastBinaryDecoder_skip_boolean, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_boolean, __pyx_t_4) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":786
 *         self.reader.read(1)
 * 
 *     def skip_int(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_27skip_int, 0, __pyx_n_s_FastBinaryDecoder_skip_int, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_int, __pyx_t_4) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":789
 *         read_long(self.reader)
 * 
 *     def skip_long(self):             # <<<<<<<<<<<<<<
 *         read_long(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_29skip_long, 0, __pyx_n_s_FastBinaryDecoder_skip_long, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_long, __pyx_t_4) < 0) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":792
 *         read_long(self.reader)
 * 
 *     def skip_float(self):             # <<<<<<<<<<<<<<
 *         read_float(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_31skip_float, 0, __pyx_n_s_FastBinaryDecoder_skip_float, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_float, __pyx_t_4) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":795
 *         read_float(self.reader)
 * 
 *     def skip_double(self):             # <<<<<<<<<<<<<<
 *         read_double(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_33skip_double, 0, __pyx_n_s_FastBinaryDecoder_skip_double, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_double, __pyx_t_4) < 0) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":798
 *         read_double(self.reader)
 * 
 *     def skip_bytes(self):             # <<<<<<<<<<<<<<
 *         read_bytes(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_35skip_bytes, 0, __pyx_n_s_FastBinaryDecoder_skip_bytes, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_bytes, __pyx_t_4) < 0) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":801
 *         read_bytes(self.reader)
 * 
 *     def skip_utf8(self):             # <<<<<<<<<<<<<<
 *         read_utf8(self.reader)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_37skip_utf8, 0, __pyx_n_s_FastBinaryDecoder_skip_utf8, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip_utf8, __pyx_t_4) < 0) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":804
 *         read_utf8(self.reader)
 * 
 *     def skip(self, n):             # <<<<<<<<<<<<<<
 *         self.reader.seek(self.reader.tell() + n)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6spavro_11fast_binary_17FastBinaryDecoder_39skip, 0, __pyx_n_s_FastBinaryDecoder_skip, NULL, __pyx_n_s_spavro_fast_binary, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_skip, __pyx_t_4) < 0) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "spavro/fast_binary.pyx":740
 * 
 * 
 * class FastBinaryDecoder(object):             # <<<<<<<<<<<<<<
 *     """Read leaf values."""
 *     def __init__(self, reader):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FastBinaryDecoder, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FastBinaryDecoder, __pyx_t_4) < 0) __PYX_ERR(0, 740, __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;

  /* "spavro/fast_binary.pyx":1
 * # Copyright (C) 2017 Pluralsight LLC             # <<<<<<<<<<<<<<
 * '''Fast Cython extension for reading / writing and validating AVRO records.
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_void____object____double___to_py")
 * cdef object __Pyx_CFunc_void____object____double___to_py(void (*f)(object, double) except *):             # <<<<<<<<<<<<<<
 *     def wrap(object outbuf, double datum):
 *         """wrap(outbuf, datum: float) -> 'void'"""
 */

  /*--- 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);
  __Pyx_XDECREF(__pyx_t_6);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init spavro.fast_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init spavro.fast_binary");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

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

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

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

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
}
#endif  // CYTHON_FAST_PYCCALL

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = PyThreadState_GET();
    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 = f->f_localsplus;
    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;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int 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 (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, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif  // CPython < 3.6
#endif  // CYTHON_FAST_PYCALL

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* None */
  static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* GetItemInt */
  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_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((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* GetModuleGlobalName */
  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* FetchCommonType */
    static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
    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)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    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)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    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)
{
    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)
{
    PyObject *tmp;
    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;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    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) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__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) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__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) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static 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(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#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_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (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 = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    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)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(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_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
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)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 = PySequence_ITEM(arg, 0);
                if (unlikely(!arg0)) return NULL;
                result = (*meth)(self, arg0);
                Py_DECREF(arg0);
                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 in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        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 ((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;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    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,
    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_CyFunction_descr_get,
    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
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__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 (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    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);
}

/* BytesEquals */
        static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    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 = 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
    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;
        }
        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_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
}

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

/* RaiseDoubleKeywords */
        static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
        static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyObjectCallNoArg */
        #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* StringJoin */
          #if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* SaveResetException */
          #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
          #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    return PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

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

/* 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 = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
            static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* RaiseException */
            #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* ArgTypeTest */
              static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

/* PyObjectCallMethod0 */
              static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
              static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
              static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
              static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
              static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* Import */
              static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
              static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CalculateMetaclass */
              static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
              static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CodeObjectCache */
              static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
              #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* 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_PY_LONG_LONG(PY_LONG_LONG value) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_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(PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#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);
    }
}

/* CIntFromPy */
              static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PY_LONG_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 (PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_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 (PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_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 (PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PY_LONG_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 (PY_LONG_LONG) -1;
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#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 && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#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 && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
    const char neg_one = (char) -1, const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) 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 (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)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 (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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 (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            char 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 (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -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 */
              static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
#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 = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
  #else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
  #endif
#else
  res = PyNumber_Int(x);
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
