/* Generated by Cython 0.17.beta1 on Tue Jul 31 10:46:24 2012 */

#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 < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif

#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define PyIndex_Check(o)     (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)

  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif

#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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#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)
#endif

#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 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_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))

  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#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_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif

#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif

#if PY_VERSION_HEX < 0x03020000
  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) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif

#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

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__lxml__objectify
#define __PYX_HAVE_API__lxml__objectify
#include "stdio.h"
#include "string.h"
#include "lxml-version.h"
#include "libxml/xmlversion.h"
#include "libxml/xmlstring.h"
#include "libxml/encoding.h"
#include "libxml/chvalid.h"
#include "libxml/hash.h"
#include "libxml/tree.h"
#include "libxml/uri.h"
#include "libxml/HTMLtree.h"
#include "libxml/valid.h"
#include "libxml/xmlIO.h"
#include "libxml/xmlsave.h"
#include "libxml/globals.h"
#include "libxml/xmlmemory.h"
#include "etree_defs.h"
#include "lxml.etree_api.h"
#include "pythread.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


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

/* unused attribute */
#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

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


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))

#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
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[] = {
  "lxml.objectify.pyx",
  "objectpath.pxi",
  "etreepublic.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_4lxml_9objectify_PyType;
struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller;
struct __pyx_obj_4lxml_9objectify_ObjectifiedElement;
struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement;
struct __pyx_obj_4lxml_9objectify_NumberElement;
struct __pyx_obj_4lxml_9objectify_FloatElement;
struct __pyx_obj_4lxml_9objectify_IntElement;
struct __pyx_obj_4lxml_9objectify_BoolElement;
struct __pyx_obj_4lxml_9objectify_LongElement;
struct __pyx_obj_4lxml_9objectify_ElementMaker;
struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup;
struct __pyx_obj_4lxml_9objectify_NoneElement;
struct __pyx_obj_4lxml_9objectify_ObjectPath;
struct __pyx_obj_4lxml_9objectify_StringElement;
struct __pyx_t_4lxml_9objectify__ObjectPath;
typedef struct __pyx_t_4lxml_9objectify__ObjectPath __pyx_t_4lxml_9objectify__ObjectPath;

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":4
 * # ObjectPath
 * 
 * ctypedef struct _ObjectPath:             # <<<<<<<<<<<<<<
 *     const_xmlChar* href
 *     const_xmlChar* name
 */
struct __pyx_t_4lxml_9objectify__ObjectPath {
  const xmlChar *href;
  const xmlChar *name;
  Py_ssize_t index;
};

/* "src/lxml/lxml.objectify.pyx":115
 * 
 * # Forward declaration
 * cdef class PyType             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
struct __pyx_obj_4lxml_9objectify_PyType {
  PyObject_HEAD
  PyObject *name;
  PyObject *type_check;
  PyObject *stringify;
  PyObject *_type;
  PyObject *_schema_types;
};


/* "src/lxml/lxml.objectify.pyx":1126
 * # adapted ElementMaker supports registered PyTypes
 * 
 * cdef class _ObjectifyElementMakerCaller:             # <<<<<<<<<<<<<<
 *     cdef object _tag
 *     cdef object _nsmap
 */
struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
  PyObject_HEAD
  PyObject *_tag;
  PyObject *_nsmap;
  PyObject *_element_factory;
  int _annotate;
};


/* "src/lxml/lxml.objectify.pyx":120
 * # Element class for the main API
 * 
 * cdef class ObjectifiedElement(ElementBase):             # <<<<<<<<<<<<<<
 *     u"""Main XML Element class.
 * 
 */
struct __pyx_obj_4lxml_9objectify_ObjectifiedElement {
  struct LxmlElementBase __pyx_base;
};


/* "src/lxml/lxml.objectify.pyx":583
 * # Data type support in subclasses
 * 
 * cdef class ObjectifiedDataElement(ObjectifiedElement):             # <<<<<<<<<<<<<<
 *     u"""This is the base class for all data type Elements.  Subclasses should
 *     override the 'pyval' property and possibly the __str__ method.
 */
struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedElement __pyx_base;
};


/* "src/lxml/lxml.objectify.pyx":603
 *         cetree.setNodeText(self._c_node, s)
 * 
 * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *     cdef object _parse_value
 *     def _setValueParser(self, function):
 */
struct __pyx_obj_4lxml_9objectify_NumberElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
  PyObject *_parse_value;
};


/* "src/lxml/lxml.objectify.pyx":708
 *         self._parse_value = long
 * 
 * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<<
 *     def _init(self):
 *         self._parse_value = float
 */
struct __pyx_obj_4lxml_9objectify_FloatElement {
  struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
};


/* "src/lxml/lxml.objectify.pyx":700
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<<
 *     def _init(self):
 *         self._parse_value = int
 */
struct __pyx_obj_4lxml_9objectify_IntElement {
  struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
};


/* "src/lxml/lxml.objectify.pyx":802
 *             return None
 * 
 * cdef class BoolElement(IntElement):             # <<<<<<<<<<<<<<
 *     u"""Boolean type base on string values: 'true' or 'false'.
 * 
 */
struct __pyx_obj_4lxml_9objectify_BoolElement {
  struct __pyx_obj_4lxml_9objectify_IntElement __pyx_base;
};


/* "src/lxml/lxml.objectify.pyx":704
 *         self._parse_value = int
 * 
 * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<<
 *     def _init(self):
 *         self._parse_value = long
 */
struct __pyx_obj_4lxml_9objectify_LongElement {
  struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
};


/* "src/lxml/lxml.objectify.pyx":1206
 *         cetree.setNodeText(elem._c_node, text)
 * 
 * cdef class ElementMaker:             # <<<<<<<<<<<<<<
 *     u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
 * 
 */
struct __pyx_obj_4lxml_9objectify_ElementMaker {
  PyObject_HEAD
  PyObject *_makeelement;
  PyObject *_namespace;
  PyObject *_nsmap;
  int _annotate;
};


/* "src/lxml/lxml.objectify.pyx":1337
 * # Element class lookup
 * 
 * cdef class ObjectifyElementClassLookup(ElementClassLookup):             # <<<<<<<<<<<<<<
 *     u"""ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)
 *     Element class lookup method that uses the objectify classes.
 */
struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup {
  struct LxmlElementClassLookup __pyx_base;
  PyObject *empty_data_class;
  PyObject *tree_class;
};


/* "src/lxml/lxml.objectify.pyx":777
 *         return complex(textOf(self._c_node))
 * 
 * cdef class NoneElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         return u"None"
 */
struct __pyx_obj_4lxml_9objectify_NoneElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
};


/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":10
 * 
 * 
 * cdef class ObjectPath:             # <<<<<<<<<<<<<<
 *     u"""ObjectPath(path)
 *     Immutable object that represents a compiled object path.
 */
struct __pyx_obj_4lxml_9objectify_ObjectPath {
  PyObject_HEAD
  PyObject *find;
  PyObject *_path;
  PyObject *_path_str;
  __pyx_t_4lxml_9objectify__ObjectPath *_c_path;
  Py_ssize_t _path_len;
};


/* "src/lxml/lxml.objectify.pyx":712
 *         self._parse_value = float
 * 
 * cdef class StringElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *     u"""String data class.
 * 
 */
struct __pyx_obj_4lxml_9objectify_StringElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
};

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

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

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

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*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); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

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

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

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

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

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;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (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 = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

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

static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) {
    return unlikely(b < 0) ? b : !b;
}
static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
}

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        PyObject *m;
        m = __Pyx_GetAttrString(d, "get");
        if (!m) return NULL;
        value = PyObject_CallFunctionObjArgs(m, key,
                                             (default_value == Py_None) ? NULL : default_value, NULL);
        Py_DECREF(m);
    }
#endif
    return value;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
    ((ob)->ob_type == &PySet_Type || \
     (ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
#define PySet_Size(anyset) \
    PyObject_Size((anyset))
#define PySet_Contains(anyset, key) \
    PySequence_Contains((anyset), (key))
#define PySet_Pop(set) \
    PyObject_CallMethod(set, (char *)"pop", NULL)
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5  */

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

static CYTHON_INLINE PyObject* __Pyx_tp_new(PyObject* type_obj) {
    return (PyObject*) (((PyTypeObject*)(type_obj))->tp_new(
        (PyTypeObject*)(type_obj), __pyx_empty_tuple, NULL));
}

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

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

#define __Pyx_DelItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_DelItemInt_Fast(o, i) : \
                                                    __Pyx_DelItem_Generic(o, to_py_func(i)))
static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
    int r;
    if (!j) return -1;
    r = PyObject_DelItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_PYPY
    if (PySequence_Check(o)) {
        return PySequence_DelItem(o, i);
    }
#else
    PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
    if (likely(m && m->sq_ass_item)) {
        if (unlikely(i < 0) && likely(m->sq_length)) {
            Py_ssize_t l = m->sq_length(o);
            if (unlikely(l < 0)) return -1;
            i += l;
        }
        return m->sq_ass_item(o, i, (PyObject *)NULL);
    }
#endif
    return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
}

static int __Pyx_RegisterCleanup(void); /*proto*/
static PyObject* __pyx_module_cleanup(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef cleanup_def = {__Pyx_NAMESTR("__cleanup"), (PyCFunction)&__pyx_module_cleanup, METH_NOARGS, 0};

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);

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

#define __Pyx_PyNumber_Power2(a, b) PyNumber_Power(a, b, Py_None)

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

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

static int __Pyx_check_binary_version(void);

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __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);

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

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


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

/* Module declarations from 'libc' */

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

/* Module declarations from 'lxml.includes.tree' */

/* Module declarations from 'lxml.etree' */

/* Module declarations from 'lxml.includes' */

/* Module declarations from 'lxml.includes.etreepublic' */
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__Document = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__Element = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher = 0;
static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator = 0;

/* Module declarations from 'cython' */

/* Module declarations from 'lxml.python' */

/* Module declarations from 'lxml' */

/* Module declarations from 'lxml.objectify' */
static PyTypeObject *__pyx_ptype_4lxml_9objectify_PyType = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_NumberElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_IntElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_LongElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_FloatElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_StringElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_NoneElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_BoolElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ElementMaker = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectPath = 0;
static PyObject *__pyx_v_4lxml_9objectify_etree = 0;
static PyObject *__pyx_v_4lxml_9objectify_re = 0;
static PyObject *__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
static PyObject *__pyx_v_4lxml_9objectify_is_special_method = 0;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
static const xmlChar *__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = 0;
static const xmlChar *__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME;
static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = 0;
static const xmlChar *__pyx_v_4lxml_9objectify__XML_SCHEMA_NS;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = 0;
static const xmlChar *__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
static PyObject *__pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
static PyObject *__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
static PyObject *__pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
static int __pyx_v_4lxml_9objectify___RECURSIVE_STR;
static PyObject *__pyx_v_4lxml_9objectify__strip_attributes = 0;
static PyObject *__pyx_v_4lxml_9objectify__cleanup_namespaces = 0;
static PyObject *__pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
static PyObject *__pyx_v_4lxml_9objectify_objectify_parser = 0;
static PyObject *__pyx_v_4lxml_9objectify__fromstring = 0;
static PyObject *__pyx_v_4lxml_9objectify__parse = 0;
static PyObject *__pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
static PyObject *__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
static PyObject *__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *, const xmlChar *, const xmlChar *); /*proto*/
static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *, const xmlChar *, const xmlChar *, Py_ssize_t); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *, struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *, PyObject *, int); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void); /*proto*/
static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *, int); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *, struct LxmlDocument *, xmlNode *); /*proto*/
static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *, int, int, int, int, PyObject *, PyObject *); /*proto*/
static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *); /*proto*/
static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, PyObject *, int); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, int, PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *, PyObject *); /*proto*/
static int __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *, PyObject *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "lxml.objectify"
int __pyx_module_is_main_lxml__objectify = 0;

/* Implementation of 'lxml.objectify' */
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_oct;
static PyObject *__pyx_builtin_hex;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute_tag); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_14__setattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_22__setitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_function); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_2__int__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_4__long__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
#endif
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_6__float__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_10__str__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
#endif
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
#endif
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_18__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static Py_hash_t __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_22__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_28__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
#endif
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static int __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_50__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_52__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj_4lxml_9objectify_FloatElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_2strlen(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static int __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_6__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static Py_hash_t __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_12__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_14__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_16__int__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_18__long__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
#endif
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_20__float__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_22__complex__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
static int __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_6__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_type_check, PyObject *__pyx_v_type_class, PyObject *__pyx_v_stringify); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_before, PyObject *__pyx_v_after); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_types); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4name___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_self, PyObject *__pyx_v_children, PyObject *__pyx_v_attrib); /* proto */
static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_namespace, PyObject *__pyx_v_nsmap, PyObject *__pyx_v_annotate, PyObject *__pyx_v_makeelement); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_on); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_self, PyObject *__pyx_v_tree_class, PyObject *__pyx_v_empty_data_class); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_20pyannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_22xsiannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_24annotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype, PyObject *__pyx_v_empty_type, PyObject *__pyx_v_annotate_xsi, PyObject *__pyx_v_annotate_pytype); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, int __pyx_v_pytype, int __pyx_v_xsi, int __pyx_v_xsi_nil, int __pyx_v_cleanup_namespaces); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_parser); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__attributes); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__value, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__xsi, PyObject *__pyx_v__attributes); /* proto */
static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static void __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
static char __pyx_k_1[] = "http://codespeak.net/lxml/objectify/pytype";
static char __pyx_k_2[] = "UTF-8";
static char __pyx_k_3[] = "ElementChildIterator";
static char __pyx_k_4[] = "";
static char __pyx_k_5[] = "{%s}*";
static char __pyx_k_6[] = "attribute '%s' of '%s' objects is not writable";
static char __pyx_k_7[] = "assignment to root element is invalid";
static char __pyx_k_8[] = "deleting items not supported by root element";
static char __pyx_k_9[] = ".";
static char __pyx_k_10[] = "no such child: ";
static char __pyx_k_11[] = "Invalid slice";
static char __pyx_k_12[] = "attempt to assign sequence of size %d to extended slice of size %d";
static char __pyx_k_13[] = "invalid types for * operator";
static char __pyx_k_14[] = "Invalid boolean value: '%s'";
static char __pyx_k_15[] = "Type name must be a string";
static char __pyx_k_16[] = "Type check function must be callable (or None)";
static char __pyx_k_17[] = "Data classes must inherit from ObjectifiedDataElement";
static char __pyx_k_18[] = "PyType(%s, %s)";
static char __pyx_k_19[] = "Cannot register tree type";
static char __pyx_k_20[] = "inconsistent before/after dependencies";
static char __pyx_k_26[] = "{%s}";
static char __pyx_k_27[] = "{";
  static char __pyx_k_29[] = "    ";
  static char __pyx_k_30[] = "%s%s = %s [%s]\n";
  static char __pyx_k_31[] = "py:";
  static char __pyx_k_32[] = "xsi:";
  static char __pyx_k_33[] = "%s  * %s = %r\n";
  static char __pyx_k_34[] = "__unpickleElementTree";
  static char __pyx_k_35[] = ":";
  static char __pyx_k_47[] = "parser must inherit from lxml.etree.XMLParser";
  static char __pyx_k_48[] = "set_element_class_lookup";
  static char __pyx_k_50[] = "XSD types require the XSD namespace";
  static char __pyx_k_51[] = "xsd:";
  static char __pyx_k_52[] = "invalid number of arguments: needs one or two";
  static char __pyx_k_53[] = "index not allowed on root node";
  static char __pyx_k_54[] = "invalid path";
  static char __pyx_k_55[] = "index must be enclosed in []";
  static char __pyx_k_56[] = "root element does not match: need %s, got %s";
  static char __pyx_k_57[] = "cannot update root node";
  static char __pyx_k_58[] = "creating indexed path attributes is not supported";
  static char __pyx_k_59[] = "{}";
  static char __pyx_k_60[] = "[%d]";
  static char __pyx_k_61[] = "The list of XML Schema datatypes this Python type maps to.\n\n        Note that this must be set before registering the type!\n        ";
  static char __pyx_k_62[] = "A fake implementation for __dict__ to support dir() etc.\n\n        Note that this only considers the first child with a given name.\n        ";
  static char __pyx_k_63[] = "The ``lxml.objectify`` module implements a Python object API for\nXML.  It is based on `lxml.etree`.\n";
  static char __pyx_k_64[] = "ObjectifiedDataElement";
  static char __pyx_k_65[] = "ObjectifyElementClassLookup";
  static char __pyx_k_66[] = "enable_recursive_str";
  static char __pyx_k_67[] = "set_pytype_attribute_tag";
  static char __pyx_k_68[] = "__.*__$";
  static char __pyx_k_72[] = "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/lxml.objectify.pyx";
  static char __pyx_k_73[] = "lxml.objectify";
  static char __pyx_k_74[] = "http://www.w3.org/2001/XMLSchema";
  static char __pyx_k_75[] = "http://www.w3.org/2001/XMLSchema-instance";
  static char __pyx_k_76[] = "{%s}nil";
  static char __pyx_k_77[] = "{%s}type";
  static char __pyx_k_94[] = "pickleReduceElementTree";
  static char __pyx_k__0[] = "0";
  static char __pyx_k__1[] = "1";
  static char __pyx_k__E[] = "E";
  static char __pyx_k__U[] = "U";
  static char __pyx_k__b[] = "b";
  static char __pyx_k__f[] = "f";
  static char __pyx_k__s[] = "s";
static char __pyx_k_117[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";
static char __pyx_k__ID[] = "ID";
static char __pyx_k__kw[] = "kw";
static char __pyx_k__ns[] = "ns";
static char __pyx_k__on[] = "on";
static char __pyx_k__py[] = "py";
static char __pyx_k__re[] = "re";
static char __pyx_k__XML[] = "XML";
static char __pyx_k__end[] = "end";
static char __pyx_k__get[] = "get";
static char __pyx_k__hex[] = "hex";
static char __pyx_k__int[] = "int";
static char __pyx_k__map[] = "map";
static char __pyx_k__nil[] = "nil";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__oct[] = "oct";
static char __pyx_k__str[] = "str";
static char __pyx_k__tag[] = "tag";
static char __pyx_k__xml[] = "xml";
static char __pyx_k__xsd[] = "xsd";
static char __pyx_k__xsi[] = "xsi";
static char __pyx_k__Name[] = "Name";
static char __pyx_k__None[] = "None";
static char __pyx_k__TREE[] = "TREE";
static char __pyx_k___tag[] = "_tag";
static char __pyx_k___xsi[] = "_xsi";
static char __pyx_k__base[] = "base";
static char __pyx_k__bool[] = "bool";
static char __pyx_k__byte[] = "byte";
static char __pyx_k__data[] = "data";
static char __pyx_k__dump[] = "dump";
static char __pyx_k__long[] = "long";
static char __pyx_k__lxml[] = "lxml";
static char __pyx_k__name[] = "name";
static char __pyx_k__none[] = "none";
static char __pyx_k__path[] = "path";
static char __pyx_k__root[] = "root";
static char __pyx_k__tail[] = "tail";
static char __pyx_k__temp[] = "temp";
static char __pyx_k__text[] = "text";
static char __pyx_k__true[] = "true";
static char __pyx_k__type[] = "type";
static char __pyx_k__IDREF[] = "IDREF";
static char __pyx_k__after[] = "after";
static char __pyx_k__ascii[] = "ascii";
static char __pyx_k__check[] = "check";
static char __pyx_k__etree[] = "etree";
static char __pyx_k__false[] = "false";
static char __pyx_k__float[] = "float";
static char __pyx_k__items[] = "items";
static char __pyx_k__known[] = "known";
static char __pyx_k__match[] = "match";
static char __pyx_k__nsmap[] = "nsmap";
static char __pyx_k__parse[] = "parse";
static char __pyx_k__pyval[] = "pyval";
static char __pyx_k__short[] = "short";
static char __pyx_k__split[] = "split";
static char __pyx_k__strip[] = "strip";
static char __pyx_k__token[] = "token";
static char __pyx_k__types[] = "types";
static char __pyx_k__value[] = "value";
static char __pyx_k__ENTITY[] = "ENTITY";
static char __pyx_k__NCName[] = "NCName";
static char __pyx_k__PyType[] = "PyType";
static char __pyx_k___value[] = "_value";
static char __pyx_k__attrib[] = "attrib";
static char __pyx_k__before[] = "before";
static char __pyx_k__decode[] = "decode";
static char __pyx_k__double[] = "double";
static char __pyx_k__groups[] = "groups";
static char __pyx_k__object[] = "object";
static char __pyx_k__parser[] = "parser";
static char __pyx_k__pickle[] = "pickle";
static char __pyx_k__prefix[] = "prefix";
static char __pyx_k__pytype[] = "pytype";
static char __pyx_k__remove[] = "remove";
static char __pyx_k__string[] = "string";
static char __pyx_k__strval[] = "strval";
static char __pyx_k__update[] = "update";
static char __pyx_k__Element[] = "Element";
static char __pyx_k__NMTOKEN[] = "NMTOKEN";
static char __pyx_k____all__[] = "__all__";
static char __pyx_k____set__[] = "__set__";
static char __pyx_k___pytype[] = "_pytype";
static char __pyx_k__addnext[] = "addnext";
static char __pyx_k__boolean[] = "boolean";
static char __pyx_k__compile[] = "compile";
static char __pyx_k__copyreg[] = "copyreg";
static char __pyx_k__element[] = "element";
static char __pyx_k__integer[] = "integer";
static char __pyx_k__replace[] = "replace";
static char __pyx_k__xsi_nil[] = "xsi_nil";
static char __pyx_k__NoneType[] = "NoneType";
static char __pyx_k____call__[] = "__call__";
static char __pyx_k____copy__[] = "__copy__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__annotate[] = "annotate";
static char __pyx_k__base_url[] = "base_url";
static char __pyx_k__copy_reg[] = "copy_reg";
static char __pyx_k__language[] = "language";
static char __pyx_k__register[] = "register";
static char __pyx_k__tostring[] = "tostring";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k__XMLParser[] = "XMLParser";
static char __pyx_k__enumerate[] = "enumerate";
static char __pyx_k__getparent[] = "getparent";
static char __pyx_k__namespace[] = "namespace";
static char __pyx_k__stringify[] = "stringify";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__IntElement[] = "IntElement";
static char __pyx_k__ObjectPath[] = "ObjectPath";
static char __pyx_k__SubElement[] = "SubElement";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__deannotate[] = "deannotate";
static char __pyx_k__empty_type[] = "empty_type";
static char __pyx_k__fromstring[] = "fromstring";
static char __pyx_k__ignore_old[] = "ignore_old";
static char __pyx_k__ignore_xsi[] = "ignore_xsi";
static char __pyx_k__makeparser[] = "makeparser";
static char __pyx_k__new_parser[] = "new_parser";
static char __pyx_k__pyannotate[] = "pyannotate";
static char __pyx_k__pytypename[] = "pytypename";
static char __pyx_k__tree_class[] = "tree_class";
static char __pyx_k__type_check[] = "type_check";
static char __pyx_k__type_class[] = "type_class";
static char __pyx_k__BoolElement[] = "BoolElement";
static char __pyx_k__DataElement[] = "DataElement";
static char __pyx_k__ElementTree[] = "ElementTree";
static char __pyx_k__LongElement[] = "LongElement";
static char __pyx_k__MemoryError[] = "MemoryError";
static char __pyx_k__NoneElement[] = "NoneElement";
static char __pyx_k____checkBool[] = "__checkBool";
static char __pyx_k____getattr__[] = "__getattr__";
static char __pyx_k____getitem__[] = "__getitem__";
static char __pyx_k____parseBool[] = "__parseBool";
static char __pyx_k____version__[] = "__version__";
static char __pyx_k___attributes[] = "_attributes";
static char __pyx_k__dict_result[] = "dict_result";
static char __pyx_k__makeelement[] = "makeelement";
static char __pyx_k__unsignedInt[] = "unsignedInt";
static char __pyx_k__xsiannotate[] = "xsiannotate";
static char __pyx_k__ElementMaker[] = "ElementMaker";
static char __pyx_k__FloatElement[] = "FloatElement";
static char __pyx_k___ElementTree[] = "_ElementTree";
static char __pyx_k____lower_bool[] = "__lower_bool";
static char __pyx_k__annotate_xsi[] = "annotate_xsi";
static char __pyx_k__empty_pytype[] = "empty_pytype";
static char __pyx_k__iterchildren[] = "iterchildren";
static char __pyx_k__unsignedByte[] = "unsignedByte";
static char __pyx_k__unsignedLong[] = "unsignedLong";
static char __pyx_k__NumberElement[] = "NumberElement";
static char __pyx_k__StringElement[] = "StringElement";
static char __pyx_k__attribute_tag[] = "attribute_tag";
static char __pyx_k__ignore_pytype[] = "ignore_pytype";
static char __pyx_k__unsignedShort[] = "unsignedShort";
static char __pyx_k__AttributeError[] = "AttributeError";
static char __pyx_k__xmlSchemaTypes[] = "xmlSchemaTypes";
static char __pyx_k__annotate_pytype[] = "annotate_pytype";
static char __pyx_k__attribute_names[] = "attribute_names";
static char __pyx_k__element_or_tree[] = "element_or_tree";
static char __pyx_k__negativeInteger[] = "negativeInteger";
static char __pyx_k__positiveInteger[] = "positiveInteger";
static char __pyx_k__PYTYPE_ATTRIBUTE[] = "PYTYPE_ATTRIBUTE";
static char __pyx_k__empty_data_class[] = "empty_data_class";
static char __pyx_k__normalizedString[] = "normalizedString";
static char __pyx_k__strip_attributes[] = "strip_attributes";
static char __pyx_k__remove_blank_text[] = "remove_blank_text";
static char __pyx_k__ObjectifiedElement[] = "ObjectifiedElement";
static char __pyx_k__cleanup_namespaces[] = "cleanup_namespaces";
static char __pyx_k__getRegisteredTypes[] = "getRegisteredTypes";
static char __pyx_k__nonNegativeInteger[] = "nonNegativeInteger";
static char __pyx_k__nonPositiveInteger[] = "nonPositiveInteger";
static char __pyx_k__set_default_parser[] = "set_default_parser";
static PyObject *__pyx_kp_u_1;
static PyObject *__pyx_kp_u_10;
static PyObject *__pyx_kp_u_11;
static PyObject *__pyx_kp_u_117;
static PyObject *__pyx_kp_u_12;
static PyObject *__pyx_kp_u_13;
static PyObject *__pyx_kp_u_14;
static PyObject *__pyx_kp_u_15;
static PyObject *__pyx_kp_u_16;
static PyObject *__pyx_kp_u_17;
static PyObject *__pyx_kp_u_18;
static PyObject *__pyx_kp_u_19;
static PyObject *__pyx_kp_u_20;
static PyObject *__pyx_kp_u_26;
static PyObject *__pyx_kp_u_27;
static PyObject *__pyx_kp_u_29;
static PyObject *__pyx_n_s_3;
static PyObject *__pyx_kp_u_30;
static PyObject *__pyx_kp_u_31;
static PyObject *__pyx_kp_u_32;
static PyObject *__pyx_kp_u_33;
static PyObject *__pyx_n_s_34;
static PyObject *__pyx_kp_b_35;
static PyObject *__pyx_kp_u_35;
static PyObject *__pyx_kp_u_4;
static PyObject *__pyx_kp_u_47;
static PyObject *__pyx_n_s_48;
static PyObject *__pyx_kp_u_5;
static PyObject *__pyx_kp_u_50;
static PyObject *__pyx_kp_u_51;
static PyObject *__pyx_kp_u_52;
static PyObject *__pyx_kp_u_53;
static PyObject *__pyx_kp_u_54;
static PyObject *__pyx_kp_u_55;
static PyObject *__pyx_kp_u_56;
static PyObject *__pyx_kp_u_57;
static PyObject *__pyx_kp_u_58;
static PyObject *__pyx_kp_u_59;
static PyObject *__pyx_kp_u_6;
static PyObject *__pyx_kp_u_60;
static PyObject *__pyx_n_u_64;
static PyObject *__pyx_n_u_65;
static PyObject *__pyx_n_s_66;
static PyObject *__pyx_n_u_66;
static PyObject *__pyx_n_s_67;
static PyObject *__pyx_n_u_67;
static PyObject *__pyx_kp_u_68;
static PyObject *__pyx_kp_u_7;
static PyObject *__pyx_kp_s_72;
static PyObject *__pyx_n_s_73;
static PyObject *__pyx_kp_u_74;
static PyObject *__pyx_kp_u_75;
static PyObject *__pyx_kp_u_76;
static PyObject *__pyx_kp_u_77;
static PyObject *__pyx_kp_u_8;
static PyObject *__pyx_kp_u_9;
static PyObject *__pyx_n_s_94;
static PyObject *__pyx_kp_u__0;
static PyObject *__pyx_kp_u__1;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_u__BoolElement;
static PyObject *__pyx_n_s__DataElement;
static PyObject *__pyx_n_u__DataElement;
static PyObject *__pyx_n_s__E;
static PyObject *__pyx_n_u__E;
static PyObject *__pyx_n_u__ENTITY;
static PyObject *__pyx_n_s__Element;
static PyObject *__pyx_n_u__Element;
static PyObject *__pyx_n_u__ElementMaker;
static PyObject *__pyx_n_s__ElementTree;
static PyObject *__pyx_n_u__FloatElement;
static PyObject *__pyx_n_u__ID;
static PyObject *__pyx_n_u__IDREF;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_u__IntElement;
static PyObject *__pyx_n_u__LongElement;
static PyObject *__pyx_n_s__MemoryError;
static PyObject *__pyx_n_u__NCName;
static PyObject *__pyx_n_u__NMTOKEN;
static PyObject *__pyx_n_u__Name;
static PyObject *__pyx_n_u__None;
static PyObject *__pyx_n_u__NoneElement;
static PyObject *__pyx_n_u__NoneType;
static PyObject *__pyx_n_u__NumberElement;
static PyObject *__pyx_n_u__ObjectPath;
static PyObject *__pyx_n_u__ObjectifiedElement;
static PyObject *__pyx_n_s__PYTYPE_ATTRIBUTE;
static PyObject *__pyx_n_u__PYTYPE_ATTRIBUTE;
static PyObject *__pyx_n_u__PyType;
static PyObject *__pyx_n_u__StringElement;
static PyObject *__pyx_n_s__SubElement;
static PyObject *__pyx_n_u__SubElement;
static PyObject *__pyx_n_u__TREE;
static PyObject *__pyx_n_s__TypeError;
static PyObject *__pyx_n_s__U;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s__XML;
static PyObject *__pyx_n_u__XML;
static PyObject *__pyx_n_s__XMLParser;
static PyObject *__pyx_n_s___ElementTree;
static PyObject *__pyx_n_s____all__;
static PyObject *__pyx_n_s____call__;
static PyObject *__pyx_n_s____checkBool;
static PyObject *__pyx_n_s____copy__;
static PyObject *__pyx_n_s____getattr__;
static PyObject *__pyx_n_s____getitem__;
static PyObject *__pyx_n_s____lower_bool;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____parseBool;
static PyObject *__pyx_n_s____set__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s____version__;
static PyObject *__pyx_n_s___attributes;
static PyObject *__pyx_n_s___pytype;
static PyObject *__pyx_n_s___tag;
static PyObject *__pyx_n_s___value;
static PyObject *__pyx_n_s___xsi;
static PyObject *__pyx_n_s__addnext;
static PyObject *__pyx_n_s__after;
static PyObject *__pyx_n_s__annotate;
static PyObject *__pyx_n_u__annotate;
static PyObject *__pyx_n_s__annotate_pytype;
static PyObject *__pyx_n_s__annotate_xsi;
static PyObject *__pyx_n_s__ascii;
static PyObject *__pyx_n_s__attrib;
static PyObject *__pyx_n_s__attribute_names;
static PyObject *__pyx_n_s__attribute_tag;
static PyObject *__pyx_n_s__b;
static PyObject *__pyx_n_s__base;
static PyObject *__pyx_n_u__base;
static PyObject *__pyx_n_s__base_url;
static PyObject *__pyx_n_s__before;
static PyObject *__pyx_n_u__bool;
static PyObject *__pyx_n_u__boolean;
static PyObject *__pyx_n_u__byte;
static PyObject *__pyx_n_s__check;
static PyObject *__pyx_n_s__cleanup_namespaces;
static PyObject *__pyx_n_s__compile;
static PyObject *__pyx_n_s__copy_reg;
static PyObject *__pyx_n_s__copyreg;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__deannotate;
static PyObject *__pyx_n_u__deannotate;
static PyObject *__pyx_n_s__decode;
static PyObject *__pyx_n_s__dict_result;
static PyObject *__pyx_n_u__double;
static PyObject *__pyx_n_s__dump;
static PyObject *__pyx_n_u__dump;
static PyObject *__pyx_n_s__element;
static PyObject *__pyx_n_s__element_or_tree;
static PyObject *__pyx_n_s__empty_data_class;
static PyObject *__pyx_n_s__empty_pytype;
static PyObject *__pyx_n_s__empty_type;
static PyObject *__pyx_n_s__end;
static PyObject *__pyx_n_s__enumerate;
static PyObject *__pyx_n_s__etree;
static PyObject *__pyx_n_s__f;
static PyObject *__pyx_n_u__false;
static PyObject *__pyx_n_u__float;
static PyObject *__pyx_n_s__fromstring;
static PyObject *__pyx_n_u__fromstring;
static PyObject *__pyx_n_s__get;
static PyObject *__pyx_n_s__getRegisteredTypes;
static PyObject *__pyx_n_u__getRegisteredTypes;
static PyObject *__pyx_n_s__getparent;
static PyObject *__pyx_n_s__groups;
static PyObject *__pyx_n_s__hex;
static PyObject *__pyx_n_s__ignore_old;
static PyObject *__pyx_n_s__ignore_pytype;
static PyObject *__pyx_n_s__ignore_xsi;
static PyObject *__pyx_n_u__int;
static PyObject *__pyx_n_u__integer;
static PyObject *__pyx_n_s__items;
static PyObject *__pyx_n_s__iterchildren;
static PyObject *__pyx_n_s__known;
static PyObject *__pyx_n_s__kw;
static PyObject *__pyx_n_u__language;
static PyObject *__pyx_n_u__long;
static PyObject *__pyx_n_s__lxml;
static PyObject *__pyx_n_s__makeelement;
static PyObject *__pyx_n_s__makeparser;
static PyObject *__pyx_n_u__makeparser;
static PyObject *__pyx_n_s__map;
static PyObject *__pyx_n_s__match;
static PyObject *__pyx_n_s__name;
static PyObject *__pyx_n_s__namespace;
static PyObject *__pyx_n_u__negativeInteger;
static PyObject *__pyx_n_s__new_parser;
static PyObject *__pyx_n_u__nonNegativeInteger;
static PyObject *__pyx_n_u__nonPositiveInteger;
static PyObject *__pyx_n_u__none;
static PyObject *__pyx_n_u__normalizedString;
static PyObject *__pyx_n_s__ns;
static PyObject *__pyx_n_s__nsmap;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__object;
static PyObject *__pyx_n_s__oct;
static PyObject *__pyx_n_s__on;
static PyObject *__pyx_n_s__parse;
static PyObject *__pyx_n_u__parse;
static PyObject *__pyx_n_s__parser;
static PyObject *__pyx_n_s__path;
static PyObject *__pyx_n_s__pickle;
static PyObject *__pyx_n_u__positiveInteger;
static PyObject *__pyx_n_s__prefix;
static PyObject *__pyx_n_u__py;
static PyObject *__pyx_n_s__pyannotate;
static PyObject *__pyx_n_u__pyannotate;
static PyObject *__pyx_n_s__pytype;
static PyObject *__pyx_n_u__pytype;
static PyObject *__pyx_n_s__pytypename;
static PyObject *__pyx_n_u__pytypename;
static PyObject *__pyx_n_s__pyval;
static PyObject *__pyx_n_u__pyval;
static PyObject *__pyx_n_s__re;
static PyObject *__pyx_n_s__register;
static PyObject *__pyx_n_s__remove;
static PyObject *__pyx_n_s__remove_blank_text;
static PyObject *__pyx_n_s__replace;
static PyObject *__pyx_n_s__root;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__set_default_parser;
static PyObject *__pyx_n_u__set_default_parser;
static PyObject *__pyx_n_u__short;
static PyObject *__pyx_n_s__split;
static PyObject *__pyx_n_u__str;
static PyObject *__pyx_n_u__string;
static PyObject *__pyx_n_s__stringify;
static PyObject *__pyx_n_s__strip;
static PyObject *__pyx_n_s__strip_attributes;
static PyObject *__pyx_n_s__strval;
static PyObject *__pyx_n_s__tag;
static PyObject *__pyx_n_u__tag;
static PyObject *__pyx_n_u__tail;
static PyObject *__pyx_n_s__temp;
static PyObject *__pyx_n_u__text;
static PyObject *__pyx_n_u__token;
static PyObject *__pyx_n_s__tostring;
static PyObject *__pyx_n_s__tree_class;
static PyObject *__pyx_n_u__true;
static PyObject *__pyx_n_s__type_check;
static PyObject *__pyx_n_s__type_class;
static PyObject *__pyx_n_s__types;
static PyObject *__pyx_n_u__unsignedByte;
static PyObject *__pyx_n_u__unsignedInt;
static PyObject *__pyx_n_u__unsignedLong;
static PyObject *__pyx_n_u__unsignedShort;
static PyObject *__pyx_n_s__update;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_u__value;
static PyObject *__pyx_n_s__xml;
static PyObject *__pyx_n_s__xmlSchemaTypes;
static PyObject *__pyx_n_u__xsd;
static PyObject *__pyx_n_s__xsi;
static PyObject *__pyx_n_u__xsi;
static PyObject *__pyx_n_s__xsi_nil;
static PyObject *__pyx_n_s__xsiannotate;
static PyObject *__pyx_n_u__xsiannotate;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k_25;
static PyObject *__pyx_k_28;
static PyObject *__pyx_k_37;
static PyObject *__pyx_k_38;
static PyObject *__pyx_k_39;
static PyObject *__pyx_k_40;
static PyObject *__pyx_k_41;
static PyObject *__pyx_k_42;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_24;
static PyObject *__pyx_k_tuple_36;
static PyObject *__pyx_k_tuple_43;
static PyObject *__pyx_k_tuple_44;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_46;
static PyObject *__pyx_k_tuple_49;
static PyObject *__pyx_k_tuple_69;
static PyObject *__pyx_k_tuple_70;
static PyObject *__pyx_k_tuple_78;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_82;
static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_86;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_90;
static PyObject *__pyx_k_tuple_92;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_97;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_101;
static PyObject *__pyx_k_tuple_103;
static PyObject *__pyx_k_tuple_105;
static PyObject *__pyx_k_tuple_107;
static PyObject *__pyx_k_tuple_109;
static PyObject *__pyx_k_tuple_111;
static PyObject *__pyx_k_tuple_113;
static PyObject *__pyx_k_tuple_115;
static PyObject *__pyx_k_tuple_118;
static PyObject *__pyx_k_codeobj_71;
static PyObject *__pyx_k_codeobj_79;
static PyObject *__pyx_k_codeobj_81;
static PyObject *__pyx_k_codeobj_83;
static PyObject *__pyx_k_codeobj_85;
static PyObject *__pyx_k_codeobj_87;
static PyObject *__pyx_k_codeobj_89;
static PyObject *__pyx_k_codeobj_91;
static PyObject *__pyx_k_codeobj_93;
static PyObject *__pyx_k_codeobj_96;
static PyObject *__pyx_k_codeobj_98;
static PyObject *__pyx_k_codeobj_100;
static PyObject *__pyx_k_codeobj_102;
static PyObject *__pyx_k_codeobj_104;
static PyObject *__pyx_k_codeobj_106;
static PyObject *__pyx_k_codeobj_108;
static PyObject *__pyx_k_codeobj_110;
static PyObject *__pyx_k_codeobj_112;
static PyObject *__pyx_k_codeobj_114;
static PyObject *__pyx_k_codeobj_116;

/* "src/lxml/lxml.objectify.pyx":39
 * cdef object is_special_method = re.compile(u'__.*__$').match
 * 
 * cdef object _typename(object t):             # <<<<<<<<<<<<<<
 *     cdef char* s
 *     c_name = python._fqtypename(t)
 */

static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
  char *__pyx_v_s;
  char *__pyx_v_c_name;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_typename", 0);

  /* "src/lxml/lxml.objectify.pyx":41
 * cdef object _typename(object t):
 *     cdef char* s
 *     c_name = python._fqtypename(t)             # <<<<<<<<<<<<<<
 *     s = cstring_h.strrchr(c_name, c'.')
 *     if s is not NULL:
 */
  __pyx_v_c_name = _fqtypename(__pyx_v_t);

  /* "src/lxml/lxml.objectify.pyx":42
 *     cdef char* s
 *     c_name = python._fqtypename(t)
 *     s = cstring_h.strrchr(c_name, c'.')             # <<<<<<<<<<<<<<
 *     if s is not NULL:
 *         c_name = s + 1
 */
  __pyx_v_s = strrchr(__pyx_v_c_name, '.');

  /* "src/lxml/lxml.objectify.pyx":43
 *     c_name = python._fqtypename(t)
 *     s = cstring_h.strrchr(c_name, c'.')
 *     if s is not NULL:             # <<<<<<<<<<<<<<
 *         c_name = s + 1
 *     return pyunicode(<const_xmlChar*>c_name)
 */
  __pyx_t_1 = (__pyx_v_s != NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":44
 *     s = cstring_h.strrchr(c_name, c'.')
 *     if s is not NULL:
 *         c_name = s + 1             # <<<<<<<<<<<<<<
 *     return pyunicode(<const_xmlChar*>c_name)
 * 
 */
    __pyx_v_c_name = (__pyx_v_s + 1);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":45
 *     if s is not NULL:
 *         c_name = s + 1
 *     return pyunicode(<const_xmlChar*>c_name)             # <<<<<<<<<<<<<<
 * 
 * # namespace/name for "pytype" hint attribute
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = pyunicode(((const xmlChar *)__pyx_v_c_name)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify._typename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":61
 * TREE_PYTYPE_NAME = u"TREE"
 * 
 * cdef tuple _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
 *     return (s, python.PyUnicode_AsUTF8String(s))
 * 
 */

static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unicodeAndUtf8", 0);

  /* "src/lxml/lxml.objectify.pyx":62
 * 
 * cdef tuple _unicodeAndUtf8(s):
 *     return (s, python.PyUnicode_AsUTF8String(s))             # <<<<<<<<<<<<<<
 * 
 * def set_pytype_attribute_tag(attribute_tag=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify._unicodeAndUtf8", __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_4lxml_9objectify_1set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_set_pytype_attribute_tag[] = "set_pytype_attribute_tag(attribute_tag=None)\n    Change name and namespace of the XML attribute that holds Python type\n    information.\n\n    Do not use this unless you know what you are doing.\n\n    Reset by calling without argument.\n\n    Default: \"{http://codespeak.net/lxml/objectify/pytype}pytype\"\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_1set_pytype_attribute_tag = {__Pyx_NAMESTR("set_pytype_attribute_tag"), (PyCFunction)__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_pytype_attribute_tag)};
static PyObject *__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_tag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_pytype_attribute_tag (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__attribute_tag,0};
    PyObject* values[1] = {0};

    /* "src/lxml/lxml.objectify.pyx":64
 *     return (s, python.PyUnicode_AsUTF8String(s))
 * 
 * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
 *     u"""set_pytype_attribute_tag(attribute_tag=None)
 *     Change name and namespace of the XML attribute that holds Python type
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attribute_tag);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_pytype_attribute_tag") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_tag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_pytype_attribute_tag", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(__pyx_self, __pyx_v_attribute_tag);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "src/lxml/lxml.objectify.pyx":78
 *     global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
 *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
 *     if attribute_tag is None:             # <<<<<<<<<<<<<<
 *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
 *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
 */
  __pyx_t_1 = (__pyx_v_attribute_tag == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":80
 *     if attribute_tag is None:
 *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
 *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")             # <<<<<<<<<<<<<<
 *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
 *             _unicodeAndUtf8(u"pytype")
 */
    __pyx_t_2 = ((PyObject *)__pyx_kp_u_1);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyTuple_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_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_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L5_unpacking_done:;
    }

    /* "src/lxml/lxml.objectify.pyx":79
 *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
 *     if attribute_tag is None:
 *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \             # <<<<<<<<<<<<<<
 *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
 *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
 */
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "src/lxml/lxml.objectify.pyx":82
 *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
 *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
 *             _unicodeAndUtf8(u"pytype")             # <<<<<<<<<<<<<<
 *     else:
 *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
 */
    __pyx_t_3 = ((PyObject *)__pyx_n_u__pytype);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyTuple_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }

    /* "src/lxml/lxml.objectify.pyx":81
 *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
 *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
 *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
 *             _unicodeAndUtf8(u"pytype")
 *     else:
 */
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":85
 *     else:
 *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
 *             cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<<
 *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
 *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
 */
    __pyx_t_4 = ((PyObject *)getNsTag(__pyx_v_attribute_tag)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyTuple_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_unpacking_done;
      __pyx_L8_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L9_unpacking_done:;
    }

    /* "src/lxml/lxml.objectify.pyx":84
 *             _unicodeAndUtf8(u"pytype")
 *     else:
 *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
 *             cetree.getNsTag(attribute_tag)
 *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
 */
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "src/lxml/lxml.objectify.pyx":87
 *             cetree.getNsTag(attribute_tag)
 *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
 *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)             # <<<<<<<<<<<<<<
 *         PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
 *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
 */
    __pyx_t_4 = __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_3 = ((PyObject *)PyUnicode_FromEncodedObject(__pyx_t_4, __pyx_k_2, NULL)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "src/lxml/lxml.objectify.pyx":89
 *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
 *         PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
 *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)             # <<<<<<<<<<<<<<
 * 
 *     _PYTYPE_NAMESPACE      = _xcstr(PYTYPE_NAMESPACE_UTF8)
 */
    __pyx_t_3 = __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = ((PyObject *)PyUnicode_FromEncodedObject(__pyx_t_3, __pyx_k_2, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":91
 *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
 * 
 *     _PYTYPE_NAMESPACE      = _xcstr(PYTYPE_NAMESPACE_UTF8)             # <<<<<<<<<<<<<<
 *     _PYTYPE_ATTRIBUTE_NAME = _xcstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 */
  __pyx_t_4 = __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":92
 * 
 *     _PYTYPE_NAMESPACE      = _xcstr(PYTYPE_NAMESPACE_UTF8)
 *     _PYTYPE_ATTRIBUTE_NAME = _xcstr(PYTYPE_ATTRIBUTE_NAME_UTF8)             # <<<<<<<<<<<<<<
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 */
  __pyx_t_4 = __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":94
 *     _PYTYPE_ATTRIBUTE_NAME = _xcstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
 * 
 * set_pytype_attribute_tag()
 */
  __pyx_t_4 = namespacedNameFromNsName(__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__[] = "Iterate over self and all siblings with the same tag.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__;
#endif
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":134
 *     subclasses.
 *     """
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         u"""Iterate over self and all siblings with the same tag.
 *         """
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
  PyObject *__pyx_v_parent = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "src/lxml/lxml.objectify.pyx":137
 *         u"""Iterate over self and all siblings with the same tag.
 *         """
 *         parent = self.getparent()             # <<<<<<<<<<<<<<
 *         if parent is None:
 *             return iter([self])
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_parent = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":138
 *         """
 *         parent = self.getparent()
 *         if parent is None:             # <<<<<<<<<<<<<<
 *             return iter([self])
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 */
  __pyx_t_3 = (__pyx_v_parent == Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":139
 *         parent = self.getparent()
 *         if parent is None:
 *             return iter([self])             # <<<<<<<<<<<<<<
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":140
 *         if parent is None:
 *             return iter([self])
 *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__tag), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":142
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if __RECURSIVE_STR:
 *             return _dump(self, 0)
 */

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

  /* "src/lxml/lxml.objectify.pyx":143
 * 
 *     def __str__(self):
 *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
 *             return _dump(self, 0)
 *         else:
 */
  if (__pyx_v_4lxml_9objectify___RECURSIVE_STR) {

    /* "src/lxml/lxml.objectify.pyx":144
 *     def __str__(self):
 *         if __RECURSIVE_STR:
 *             return _dump(self, 0)             # <<<<<<<<<<<<<<
 *         else:
 *             return textOf(self._c_node) or u''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":146
 *             return _dump(self, 0)
 *         else:
 *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     # pickle support for objectified Element
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
      __pyx_t_3 = __pyx_kp_u_4;
    } else {
      __pyx_t_3 = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __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("lxml.objectify.ObjectifiedElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":149
 * 
 *     # pickle support for objectified Element
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return (fromstring, (etree.tostring(self),))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "src/lxml/lxml.objectify.pyx":150
 *     # pickle support for objectified Element
 *     def __reduce__(self):
 *         return (fromstring, (etree.tostring(self),))             # <<<<<<<<<<<<<<
 * 
 *     property text:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__fromstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.ObjectifiedElement.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":153
 * 
 *     property text:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return textOf(self._c_node)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":154
 *     property text:
 *         def __get__(self):
 *             return textOf(self._c_node)             # <<<<<<<<<<<<<<
 * 
 *     property __dict__:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":161
 *         Note that this only considers the first child with a given name.
 *         """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef _Element child
 *             cdef dict children
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
  struct LxmlElement *__pyx_v_child = 0;
  PyObject *__pyx_v_children = 0;
  const xmlChar *__pyx_v_c_ns;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/lxml/lxml.objectify.pyx":164
 *             cdef _Element child
 *             cdef dict children
 *             c_ns = tree._getNs(self._c_node)             # <<<<<<<<<<<<<<
 *             tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
 *             children = {}
 */
  __pyx_v_c_ns = _getNs(__pyx_v_self->__pyx_base.__pyx_base._c_node);

  /* "src/lxml/lxml.objectify.pyx":165
 *             cdef dict children
 *             c_ns = tree._getNs(self._c_node)
 *             tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None             # <<<<<<<<<<<<<<
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):
 */
  if ((__pyx_v_c_ns != NULL)) {
    __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_tag = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":166
 *             c_ns = tree._getNs(self._c_node)
 *             tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
 *             children = {}             # <<<<<<<<<<<<<<
 *             for child in etree.ElementChildIterator(self, tag=tag):
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_children = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":167
 *             tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<<
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__tag), __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++;
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++;
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((struct LxmlElement *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/lxml/lxml.objectify.pyx":168
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<<
 *                     continue
 *                 name = pyunicode(child._c_node.name)
 */
    __pyx_t_7 = (__pyx_v_c_ns == NULL);
    if (__pyx_t_7) {
      __pyx_t_8 = (_getNs(__pyx_v_child->_c_node) != NULL);
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_7;
    }
    if (__pyx_t_9) {

      /* "src/lxml/lxml.objectify.pyx":169
 *             for child in etree.ElementChildIterator(self, tag=tag):
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue             # <<<<<<<<<<<<<<
 *                 name = pyunicode(child._c_node.name)
 *                 if python.PyDict_GetItem(children, name) is NULL:
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":170
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 *                 name = pyunicode(child._c_node.name)             # <<<<<<<<<<<<<<
 *                 if python.PyDict_GetItem(children, name) is NULL:
 *                     children[name] = child
 */
    __pyx_t_4 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "src/lxml/lxml.objectify.pyx":171
 *                     continue
 *                 name = pyunicode(child._c_node.name)
 *                 if python.PyDict_GetItem(children, name) is NULL:             # <<<<<<<<<<<<<<
 *                     children[name] = child
 *             return children
 */
    __pyx_t_9 = (PyDict_GetItem(((PyObject *)__pyx_v_children), __pyx_v_name) == NULL);
    if (__pyx_t_9) {

      /* "src/lxml/lxml.objectify.pyx":172
 *                 name = pyunicode(child._c_node.name)
 *                 if python.PyDict_GetItem(children, name) is NULL:
 *                     children[name] = child             # <<<<<<<<<<<<<<
 *             return children
 * 
 */
      if (PyDict_SetItem(((PyObject *)__pyx_v_children), __pyx_v_name, ((PyObject *)__pyx_v_child)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":173
 *                 if python.PyDict_GetItem(children, name) is NULL:
 *                     children[name] = child
 *             return children             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_children));
  __pyx_r = ((PyObject *)__pyx_v_children);
  goto __pyx_L0;

  __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("lxml.objectify.ObjectifiedElement.__dict__.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_children);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static Py_ssize_t __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_6__len__[] = "Count self and siblings with the same tag.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__;
#endif
static Py_ssize_t __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":175
 *             return children
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         u"""Count self and siblings with the same tag.
 *         """
 */

static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "src/lxml/lxml.objectify.pyx":178
 *         u"""Count self and siblings with the same tag.
 *         """
 *         return _countSiblings(self._c_node)             # <<<<<<<<<<<<<<
 * 
 *     def countchildren(self):
 */
  __pyx_r = __pyx_f_4lxml_9objectify__countSiblings(__pyx_v_self->__pyx_base.__pyx_base._c_node);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren[] = "countchildren(self)\n\n        Return the number of children of this element, regardless of their\n        name.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("countchildren (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":180
 *         return _countSiblings(self._c_node)
 * 
 *     def countchildren(self):             # <<<<<<<<<<<<<<
 *         u"""countchildren(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
  Py_ssize_t __pyx_v_c;
  xmlNode *__pyx_v_c_node;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("countchildren", 0);

  /* "src/lxml/lxml.objectify.pyx":189
 *         cdef Py_ssize_t c
 *         cdef tree.xmlNode* c_node
 *         c = 0             # <<<<<<<<<<<<<<
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 */
  __pyx_v_c = 0;

  /* "src/lxml/lxml.objectify.pyx":190
 *         cdef tree.xmlNode* c_node
 *         c = 0
 *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 */
  __pyx_v_c_node = __pyx_v_self->__pyx_base.__pyx_base._c_node->children;

  /* "src/lxml/lxml.objectify.pyx":191
 *         c = 0
 *         c_node = self._c_node.children
 *         while c_node is not NULL:             # <<<<<<<<<<<<<<
 *             if tree._isElement(c_node):
 *                 c = c + 1
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_1) break;

    /* "src/lxml/lxml.objectify.pyx":192
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
 *                 c = c + 1
 *             c_node = c_node.next
 */
    __pyx_t_1 = _isElement(__pyx_v_c_node);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":193
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 *                 c = c + 1             # <<<<<<<<<<<<<<
 *             c_node = c_node.next
 *         return c
 */
      __pyx_v_c = (__pyx_v_c + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":194
 *             if tree._isElement(c_node):
 *                 c = c + 1
 *             c_node = c_node.next             # <<<<<<<<<<<<<<
 *         return c
 * 
 */
    __pyx_v_c_node = __pyx_v_c_node->next;
  }

  /* "src/lxml/lxml.objectify.pyx":195
 *                 c = c + 1
 *             c_node = c_node.next
 *         return c             # <<<<<<<<<<<<<<
 * 
 *     def getchildren(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_c); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.countchildren", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren[] = "getchildren(self)\n\n        Returns a sequence of all direct children.  The elements are\n        returned in document order.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getchildren (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":197
 *         return c
 * 
 *     def getchildren(self):             # <<<<<<<<<<<<<<
 *         u"""getchildren(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
  xmlNode *__pyx_v_c_node;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getchildren", 0);

  /* "src/lxml/lxml.objectify.pyx":204
 *         """
 *         cdef tree.xmlNode* c_node
 *         cdef list result = []             # <<<<<<<<<<<<<<
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":205
 *         cdef tree.xmlNode* c_node
 *         cdef list result = []
 *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 */
  __pyx_v_c_node = __pyx_v_self->__pyx_base.__pyx_base._c_node->children;

  /* "src/lxml/lxml.objectify.pyx":206
 *         cdef list result = []
 *         c_node = self._c_node.children
 *         while c_node is not NULL:             # <<<<<<<<<<<<<<
 *             if tree._isElement(c_node):
 *                 result.append(cetree.elementFactory(self._doc, c_node))
 */
  while (1) {
    __pyx_t_2 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_2) break;

    /* "src/lxml/lxml.objectify.pyx":207
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
 *                 result.append(cetree.elementFactory(self._doc, c_node))
 *             c_node = c_node.next
 */
    __pyx_t_2 = _isElement(__pyx_v_c_node);
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":208
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 *                 result.append(cetree.elementFactory(self._doc, c_node))             # <<<<<<<<<<<<<<
 *             c_node = c_node.next
 *         return result
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = PyList_Append(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":209
 *             if tree._isElement(c_node):
 *                 result.append(cetree.elementFactory(self._doc, c_node))
 *             c_node = c_node.next             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_v_c_node = __pyx_v_c_node->next;
  }

  /* "src/lxml/lxml.objectify.pyx":210
 *                 result.append(cetree.elementFactory(self._doc, c_node))
 *             c_node = c_node.next
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, tag):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __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("lxml.objectify.ObjectifiedElement.getchildren", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__[] = "Return the (first) child with the given tag name.  If no namespace\n        is provided, the child will be looked up in the same one as self.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
#endif
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":212
 *         return result
 * 
 *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
 *         u"""Return the (first) child with the given tag name.  If no namespace
 *         is provided, the child will be looked up in the same one as self.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "src/lxml/lxml.objectify.pyx":216
 *         is provided, the child will be looked up in the same one as self.
 *         """
 *         if is_special_method(tag):             # <<<<<<<<<<<<<<
 *             return object.__getattr__(self, tag)
 *         return _lookupChildOrRaise(self, tag)
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
  __Pyx_GIVEREF(__pyx_v_tag);
  __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_9objectify_is_special_method, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":217
 *         """
 *         if is_special_method(tag):
 *             return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
 *         return _lookupChildOrRaise(self, tag)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_tag);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tag);
    __Pyx_GIVEREF(__pyx_v_tag);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":218
 *         if is_special_method(tag):
 *             return object.__getattr__(self, tag)
 *         return _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, tag, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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_4);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_14__setattr__[] = "Set the value of the (first) child with the given tag name.  If no\n        namespace is provided, the child will be looked up in the same one as\n        self.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
#endif
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_14__setattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":220
 *         return _lookupChildOrRaise(self, tag)
 * 
 *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<<
 *         u"""Set the value of the (first) child with the given tag name.  If no
 *         namespace is provided, the child will be looked up in the same one as
 */

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_14__setattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_element = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);
  __Pyx_INCREF(__pyx_v_tag);

  /* "src/lxml/lxml.objectify.pyx":227
 *         cdef _Element element
 *         # properties are looked up /after/ __setattr__, so we must emulate them
 *         if tag == u'text' or tag == u'pyval':             # <<<<<<<<<<<<<<
 *             # read-only !
 *             raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
 */
  __pyx_t_1 = __Pyx_PyUnicode_Equals(__pyx_v_tag, ((PyObject *)__pyx_n_u__text), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyUnicode_Equals(__pyx_v_tag, ((PyObject *)__pyx_n_u__pyval), Py_EQ); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":230
 *             # read-only !
 *             raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
 *                             (tag, _typename(self))             # <<<<<<<<<<<<<<
 *         elif tag == u'tail':
 *             cetree.setTailText(self._c_node, value)
 */
    __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_tag);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tag);
    __Pyx_GIVEREF(__pyx_v_tag);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), 0, 0);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":231
 *             raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
 *                             (tag, _typename(self))
 *         elif tag == u'tail':             # <<<<<<<<<<<<<<
 *             cetree.setTailText(self._c_node, value)
 *             return
 */
  __pyx_t_3 = __Pyx_PyUnicode_Equals(__pyx_v_tag, ((PyObject *)__pyx_n_u__tail), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":232
 *                             (tag, _typename(self))
 *         elif tag == u'tail':
 *             cetree.setTailText(self._c_node, value)             # <<<<<<<<<<<<<<
 *             return
 *         elif tag == u'tag':
 */
    __pyx_t_6 = setTailText(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "src/lxml/lxml.objectify.pyx":233
 *         elif tag == u'tail':
 *             cetree.setTailText(self._c_node, value)
 *             return             # <<<<<<<<<<<<<<
 *         elif tag == u'tag':
 *             ElementBase.tag.__set__(self, value)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":234
 *             cetree.setTailText(self._c_node, value)
 *             return
 *         elif tag == u'tag':             # <<<<<<<<<<<<<<
 *             ElementBase.tag.__set__(self, value)
 *             return
 */
  __pyx_t_3 = __Pyx_PyUnicode_Equals(__pyx_v_tag, ((PyObject *)__pyx_n_u__tag), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":235
 *             return
 *         elif tag == u'tag':
 *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<<
 *             return
 *         elif tag == u'base':
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase)), __pyx_n_s__tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s____set__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "src/lxml/lxml.objectify.pyx":236
 *         elif tag == u'tag':
 *             ElementBase.tag.__set__(self, value)
 *             return             # <<<<<<<<<<<<<<
 *         elif tag == u'base':
 *             ElementBase.base.__set__(self, value)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":237
 *             ElementBase.tag.__set__(self, value)
 *             return
 *         elif tag == u'base':             # <<<<<<<<<<<<<<
 *             ElementBase.base.__set__(self, value)
 *             return
 */
  __pyx_t_3 = __Pyx_PyUnicode_Equals(__pyx_v_tag, ((PyObject *)__pyx_n_u__base), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":238
 *             return
 *         elif tag == u'base':
 *             ElementBase.base.__set__(self, value)             # <<<<<<<<<<<<<<
 *             return
 *         tag = _buildChildTag(self, tag)
 */
    __pyx_t_7 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase)), __pyx_n_s__base); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s____set__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/lxml/lxml.objectify.pyx":239
 *         elif tag == u'base':
 *             ElementBase.base.__set__(self, value)
 *             return             # <<<<<<<<<<<<<<
 *         tag = _buildChildTag(self, tag)
 *         element = _lookupChild(self, tag)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":240
 *             ElementBase.base.__set__(self, value)
 *             return
 *         tag = _buildChildTag(self, tag)             # <<<<<<<<<<<<<<
 *         element = _lookupChild(self, tag)
 *         if element is None:
 */
  __pyx_t_5 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "src/lxml/lxml.objectify.pyx":241
 *             return
 *         tag = _buildChildTag(self, tag)
 *         element = _lookupChild(self, tag)             # <<<<<<<<<<<<<<
 *         if element is None:
 *             _appendValue(self, tag, value)
 */
  __pyx_t_5 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/lxml/lxml.objectify.pyx":242
 *         tag = _buildChildTag(self, tag)
 *         element = _lookupChild(self, tag)
 *         if element is None:             # <<<<<<<<<<<<<<
 *             _appendValue(self, tag, value)
 *         else:
 */
  __pyx_t_3 = (((PyObject *)__pyx_v_element) == Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":243
 *         element = _lookupChild(self, tag)
 *         if element is None:
 *             _appendValue(self, tag, value)             # <<<<<<<<<<<<<<
 *         else:
 *             _replaceElement(element, value)
 */
    __pyx_t_5 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":245
 *             _appendValue(self, tag, value)
 *         else:
 *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
 * 
 *     def __delattr__(self, tag):
 */
    __pyx_t_5 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L4:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":247
 *             _replaceElement(element, value)
 * 
 *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)
 */

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_v_child = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delattr__", 0);

  /* "src/lxml/lxml.objectify.pyx":248
 * 
 *     def __delattr__(self, tag):
 *         child = _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
 *         self.remove(child)
 * 
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_child = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":249
 *     def __delattr__(self, tag):
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)             # <<<<<<<<<<<<<<
 * 
 *     def addattr(self, tag, value):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_child);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_child);
  __Pyx_GIVEREF(__pyx_v_child);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_child);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_18addattr[] = "addattr(self, tag, value)\n\n        Add a child value to the element.\n\n        As opposed to append(), it sets a data value, not an element.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tag = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("addattr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tag,&__pyx_n_s__value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __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_tag = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":251
 *         self.remove(child)
 * 
 *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
 *         u"""addattr(self, tag, value)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("addattr", 0);

  /* "src/lxml/lxml.objectify.pyx":258
 *         As opposed to append(), it sets a data value, not an element.
 *         """
 *         _appendValue(self, _buildChildTag(self, tag), value)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.ObjectifiedElement.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_20__getitem__[] = "Return a sibling, counting from the first child of the parent.  The\n        method behaves like both a dict and a sequence.\n\n        * If argument is an integer, returns the sibling at that position.\n\n        * If argument is a string, does the same as getattr().  This can be\n          used to provide namespaces for element lookup, or to look up\n          children with special names (``text`` etc.).\n\n        * If argument is a slice object, returns the matching slice.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
#endif
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":260
 *         _appendValue(self, _buildChildTag(self, tag), value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         u"""Return a sibling, counting from the first child of the parent.  The
 *         method behaves like both a dict and a sequence.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key) {
  xmlNode *__pyx_v_c_self_node;
  xmlNode *__pyx_v_c_parent;
  xmlNode *__pyx_v_c_node;
  Py_ssize_t __pyx_v_c_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "src/lxml/lxml.objectify.pyx":276
 *         cdef tree.xmlNode* c_node
 *         cdef Py_ssize_t c_index
 *         if python._isString(key):             # <<<<<<<<<<<<<<
 *             return _lookupChildOrRaise(self, key)
 *         elif isinstance(key, slice):
 */
  __pyx_t_1 = _isString(__pyx_v_key);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":277
 *         cdef Py_ssize_t c_index
 *         if python._isString(key):
 *             return _lookupChildOrRaise(self, key)             # <<<<<<<<<<<<<<
 *         elif isinstance(key, slice):
 *             return list(self)[key]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":278
 *         if python._isString(key):
 *             return _lookupChildOrRaise(self, key)
 *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return list(self)[key]
 *         # normal item access
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)(&PySlice_Type)));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_key, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":279
 *             return _lookupChildOrRaise(self, key)
 *         elif isinstance(key, slice):
 *             return list(self)[key]             # <<<<<<<<<<<<<<
 *         # normal item access
 *         c_index = key   # raises TypeError if necessary
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":281
 *             return list(self)[key]
 *         # normal item access
 *         c_index = key   # raises TypeError if necessary             # <<<<<<<<<<<<<<
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent
 */
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_c_index = __pyx_t_4;

  /* "src/lxml/lxml.objectify.pyx":282
 *         # normal item access
 *         c_index = key   # raises TypeError if necessary
 *         c_self_node = self._c_node             # <<<<<<<<<<<<<<
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 */
  __pyx_v_c_self_node = __pyx_v_self->__pyx_base.__pyx_base._c_node;

  /* "src/lxml/lxml.objectify.pyx":283
 *         c_index = key   # raises TypeError if necessary
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<<
 *         if c_parent is NULL:
 *             if c_index == 0:
 */
  __pyx_v_c_parent = __pyx_v_c_self_node->parent;

  /* "src/lxml/lxml.objectify.pyx":284
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:             # <<<<<<<<<<<<<<
 *             if c_index == 0:
 *                 return self
 */
  __pyx_t_1 = (__pyx_v_c_parent == NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":285
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 *             if c_index == 0:             # <<<<<<<<<<<<<<
 *                 return self
 *             else:
 */
    __pyx_t_1 = (__pyx_v_c_index == 0);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":286
 *         if c_parent is NULL:
 *             if c_index == 0:
 *                 return self             # <<<<<<<<<<<<<<
 *             else:
 *                 raise IndexError, unicode(key)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_self));
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":288
 *                 return self
 *             else:
 *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
 *         if c_index < 0:
 *             c_node = c_parent.last
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":289
 *             else:
 *                 raise IndexError, unicode(key)
 *         if c_index < 0:             # <<<<<<<<<<<<<<
 *             c_node = c_parent.last
 *         else:
 */
  __pyx_t_1 = (__pyx_v_c_index < 0);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":290
 *                 raise IndexError, unicode(key)
 *         if c_index < 0:
 *             c_node = c_parent.last             # <<<<<<<<<<<<<<
 *         else:
 *             c_node = c_parent.children
 */
    __pyx_v_c_node = __pyx_v_c_parent->last;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":292
 *             c_node = c_parent.last
 *         else:
 *             c_node = c_parent.children             # <<<<<<<<<<<<<<
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
 */
    __pyx_v_c_node = __pyx_v_c_parent->children;
  }
  __pyx_L6:;

  /* "src/lxml/lxml.objectify.pyx":294
 *             c_node = c_parent.children
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)             # <<<<<<<<<<<<<<
 *         if c_node is NULL:
 *             raise IndexError, unicode(key)
 */
  __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_c_self_node), __pyx_v_c_self_node->name, __pyx_v_c_index);

  /* "src/lxml/lxml.objectify.pyx":295
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
 *         if c_node is NULL:             # <<<<<<<<<<<<<<
 *             raise IndexError, unicode(key)
 *         return elementFactory(self._doc, c_node)
 */
  __pyx_t_1 = (__pyx_v_c_node == NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":296
 *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
 *         if c_node is NULL:
 *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
 *         return elementFactory(self._doc, c_node)
 * 
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "src/lxml/lxml.objectify.pyx":297
 *         if c_node is NULL:
 *             raise IndexError, unicode(key)
 *         return elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_22__setitem__[] = "Set the value of a sibling, counting from the first child of the\n        parent.  Implements key assignment, item assignment and slice\n        assignment.\n\n        * If argument is an integer, sets the sibling at that position.\n\n        * If argument is a string, does the same as setattr().  This is used\n          to provide namespaces for element lookup.\n\n        * If argument is a sequence (list, tuple, etc.), assign the contained\n          items to the siblings.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
#endif
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_22__setitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":299
 *         return elementFactory(self._doc, c_node)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         u"""Set the value of a sibling, counting from the first child of the
 *         parent.  Implements key assignment, item assignment and slice
 */

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_22__setitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_element = 0;
  xmlNode *__pyx_v_c_node;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_key);

  /* "src/lxml/lxml.objectify.pyx":314
 *         cdef _Element element
 *         cdef tree.xmlNode* c_node
 *         if python._isString(key):             # <<<<<<<<<<<<<<
 *             key = _buildChildTag(self, key)
 *             element = _lookupChild(self, key)
 */
  __pyx_t_1 = _isString(__pyx_v_key);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":315
 *         cdef tree.xmlNode* c_node
 *         if python._isString(key):
 *             key = _buildChildTag(self, key)             # <<<<<<<<<<<<<<
 *             element = _lookupChild(self, key)
 *             if element is None:
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":316
 *         if python._isString(key):
 *             key = _buildChildTag(self, key)
 *             element = _lookupChild(self, key)             # <<<<<<<<<<<<<<
 *             if element is None:
 *                 _appendValue(self, key, value)
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":317
 *             key = _buildChildTag(self, key)
 *             element = _lookupChild(self, key)
 *             if element is None:             # <<<<<<<<<<<<<<
 *                 _appendValue(self, key, value)
 *             else:
 */
    __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":318
 *             element = _lookupChild(self, key)
 *             if element is None:
 *                 _appendValue(self, key, value)             # <<<<<<<<<<<<<<
 *             else:
 *                 _replaceElement(element, value)
 */
      __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":320
 *                 _appendValue(self, key, value)
 *             else:
 *                 _replaceElement(element, value)             # <<<<<<<<<<<<<<
 *             return
 * 
 */
      __pyx_t_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L4:;

    /* "src/lxml/lxml.objectify.pyx":321
 *             else:
 *                 _replaceElement(element, value)
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if self._c_node.parent is NULL:
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":323
 *             return
 * 
 *         if self._c_node.parent is NULL:             # <<<<<<<<<<<<<<
 *             # the 'root[i] = ...' case
 *             raise TypeError, u"assignment to root element is invalid"
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base._c_node->parent == NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":325
 *         if self._c_node.parent is NULL:
 *             # the 'root[i] = ...' case
 *             raise TypeError, u"assignment to root element is invalid"             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(key, slice):
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_7), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":327
 *             raise TypeError, u"assignment to root element is invalid"
 * 
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             # slice assignment
 *             _setSlice(key, self, value)
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)(&PySlice_Type)));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_key, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":329
 *         if isinstance(key, slice):
 *             # slice assignment
 *             _setSlice(key, self, value)             # <<<<<<<<<<<<<<
 *         else:
 *             # normal index assignment
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__setSlice(__pyx_v_key, ((struct LxmlElement *)__pyx_v_self), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":332
 *         else:
 *             # normal index assignment
 *             if key < 0:             # <<<<<<<<<<<<<<
 *                 c_node = self._c_node.parent.last
 *             else:
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":333
 *             # normal index assignment
 *             if key < 0:
 *                 c_node = self._c_node.parent.last             # <<<<<<<<<<<<<<
 *             else:
 *                 c_node = self._c_node.parent.children
 */
      __pyx_v_c_node = __pyx_v_self->__pyx_base.__pyx_base._c_node->parent->last;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":335
 *                 c_node = self._c_node.parent.last
 *             else:
 *                 c_node = self._c_node.parent.children             # <<<<<<<<<<<<<<
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
 */
      __pyx_v_c_node = __pyx_v_self->__pyx_base.__pyx_base._c_node->parent->children;
    }
    __pyx_L7:;

    /* "src/lxml/lxml.objectify.pyx":337
 *                 c_node = self._c_node.parent.children
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)             # <<<<<<<<<<<<<<
 *             if c_node is NULL:
 *                 raise IndexError, unicode(key)
 */
    __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_self->__pyx_base.__pyx_base._c_node), __pyx_v_self->__pyx_base.__pyx_base._c_node->name, __pyx_t_3);

    /* "src/lxml/lxml.objectify.pyx":338
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
 *             if c_node is NULL:             # <<<<<<<<<<<<<<
 *                 raise IndexError, unicode(key)
 *             element = elementFactory(self._doc, c_node)
 */
    __pyx_t_1 = (__pyx_v_c_node == NULL);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":339
 *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
 *             if c_node is NULL:
 *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
 *             element = elementFactory(self._doc, c_node)
 *             _replaceElement(element, value)
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "src/lxml/lxml.objectify.pyx":340
 *             if c_node is NULL:
 *                 raise IndexError, unicode(key)
 *             element = elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
 *             _replaceElement(element, value)
 * 
 */
    __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_2 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":341
 *                 raise IndexError, unicode(key)
 *             element = elementFactory(self._doc, c_node)
 *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, key):
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":343
 *             _replaceElement(element, value)
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         parent = self.getparent()
 */

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_v_parent = NULL;
  PyObject *__pyx_v_del_items = NULL;
  PyObject *__pyx_v_remove = NULL;
  PyObject *__pyx_v_el = NULL;
  PyObject *__pyx_v_sibling = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "src/lxml/lxml.objectify.pyx":345
 *     def __delitem__(self, key):
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         parent = self.getparent()             # <<<<<<<<<<<<<<
 *         if parent is None:
 *             raise TypeError, u"deleting items not supported by root element"
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_parent = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":346
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         parent = self.getparent()
 *         if parent is None:             # <<<<<<<<<<<<<<
 *             raise TypeError, u"deleting items not supported by root element"
 *         if isinstance(key, slice):
 */
  __pyx_t_3 = (__pyx_v_parent == Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":347
 *         parent = self.getparent()
 *         if parent is None:
 *             raise TypeError, u"deleting items not supported by root element"             # <<<<<<<<<<<<<<
 *         if isinstance(key, slice):
 *             # slice deletion
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_8), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":348
 *         if parent is None:
 *             raise TypeError, u"deleting items not supported by root element"
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             # slice deletion
 *             del_items = list(self)[key]
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)(&PySlice_Type)));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_key, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":350
 *         if isinstance(key, slice):
 *             # slice deletion
 *             del_items = list(self)[key]             # <<<<<<<<<<<<<<
 *             remove = parent.remove
 *             for el in del_items:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_del_items = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":351
 *             # slice deletion
 *             del_items = list(self)[key]
 *             remove = parent.remove             # <<<<<<<<<<<<<<
 *             for el in del_items:
 *                 remove(el)
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_s__remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_remove = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":352
 *             del_items = list(self)[key]
 *             remove = parent.remove
 *             for el in del_items:             # <<<<<<<<<<<<<<
 *                 remove(el)
 *         else:
 */
    if (PyList_CheckExact(__pyx_v_del_items) || PyTuple_CheckExact(__pyx_v_del_items)) {
      __pyx_t_2 = __pyx_v_del_items; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        #endif
      } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        #endif
      } else {
        __pyx_t_1 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF(__pyx_v_el);
      __pyx_v_el = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "src/lxml/lxml.objectify.pyx":353
 *             remove = parent.remove
 *             for el in del_items:
 *                 remove(el)             # <<<<<<<<<<<<<<
 *         else:
 *             # normal index deletion
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_el);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_el);
      __Pyx_GIVEREF(__pyx_v_el);
      __pyx_t_6 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":356
 *         else:
 *             # normal index deletion
 *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<<
 *             parent.remove(sibling)
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_v_sibling = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":357
 *             # normal index deletion
 *             sibling = self.__getitem__(key)
 *             parent.remove(sibling)             # <<<<<<<<<<<<<<
 * 
 *     def descendantpaths(self, prefix=None):
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_sibling);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_sibling);
    __Pyx_GIVEREF(__pyx_v_sibling);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L4:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parent);
  __Pyx_XDECREF(__pyx_v_del_items);
  __Pyx_XDECREF(__pyx_v_remove);
  __Pyx_XDECREF(__pyx_v_el);
  __Pyx_XDECREF(__pyx_v_sibling);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_26descendantpaths[] = "descendantpaths(self, prefix=None)\n\n        Returns a list of object path expressions for all descendants.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("descendantpaths (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__prefix,0};
    PyObject* values[1] = {0};

    /* "src/lxml/lxml.objectify.pyx":359
 *             parent.remove(sibling)
 * 
 *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
 *         u"""descendantpaths(self, prefix=None)
 * 
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__prefix);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "descendantpaths") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("descendantpaths", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), __pyx_v_prefix);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_prefix) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("descendantpaths", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "src/lxml/lxml.objectify.pyx":364
 *         Returns a list of object path expressions for all descendants.
 *         """
 *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<<
 *             prefix = u'.'.join(prefix)
 *         return _buildDescendantPaths(self._c_node, prefix)
 */
  __pyx_t_1 = (__pyx_v_prefix != Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = (!_isString(__pyx_v_prefix));
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":365
 *         """
 *         if prefix is not None and not python._isString(prefix):
 *             prefix = u'.'.join(prefix)             # <<<<<<<<<<<<<<
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 */
    __pyx_t_4 = ((PyObject *)PyUnicode_Join(__pyx_kp_u_9, __pyx_v_prefix)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_prefix);
    __pyx_v_prefix = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":366
 *         if prefix is not None and not python._isString(prefix):
 *             prefix = u'.'.join(prefix)
 *         return _buildDescendantPaths(self._c_node, prefix)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__buildDescendantPaths(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_prefix)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":368
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):             # <<<<<<<<<<<<<<
 *     if c_node.name != c_name:
 *         return 0
 */

static CYTHON_INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) {
  const xmlChar *__pyx_v_c_node_href;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_tagMatches", 0);

  /* "src/lxml/lxml.objectify.pyx":369
 * 
 * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
 *     if c_node.name != c_name:             # <<<<<<<<<<<<<<
 *         return 0
 *     if c_href == NULL:
 */
  __pyx_t_1 = (__pyx_v_c_node->name != __pyx_v_c_name);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":370
 * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
 *     if c_node.name != c_name:
 *         return 0             # <<<<<<<<<<<<<<
 *     if c_href == NULL:
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":371
 *     if c_node.name != c_name:
 *         return 0
 *     if c_href == NULL:             # <<<<<<<<<<<<<<
 *         return 1
 *     c_node_href = tree._getNs(c_node)
 */
  __pyx_t_1 = (__pyx_v_c_href == NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":372
 *         return 0
 *     if c_href == NULL:
 *         return 1             # <<<<<<<<<<<<<<
 *     c_node_href = tree._getNs(c_node)
 *     if c_node_href == NULL:
 */
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":373
 *     if c_href == NULL:
 *         return 1
 *     c_node_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
 *     if c_node_href == NULL:
 *         return c_href[0] == c'\0'
 */
  __pyx_v_c_node_href = _getNs(__pyx_v_c_node);

  /* "src/lxml/lxml.objectify.pyx":374
 *         return 1
 *     c_node_href = tree._getNs(c_node)
 *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
 *         return c_href[0] == c'\0'
 *     return tree.xmlStrcmp(c_node_href, c_href) == 0
 */
  __pyx_t_1 = (__pyx_v_c_node_href == NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":375
 *     c_node_href = tree._getNs(c_node)
 *     if c_node_href == NULL:
 *         return c_href[0] == c'\0'             # <<<<<<<<<<<<<<
 *     return tree.xmlStrcmp(c_node_href, c_href) == 0
 * 
 */
    __pyx_r = ((__pyx_v_c_href[0]) == '\x00');
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":376
 *     if c_node_href == NULL:
 *         return c_href[0] == c'\0'
 *     return tree.xmlStrcmp(c_node_href, c_href) == 0             # <<<<<<<<<<<<<<
 * 
 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):
 */
  __pyx_r = (xmlStrcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":378
 *     return tree.xmlStrcmp(c_node_href, c_href) == 0
 * 
 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
 *     cdef tree.xmlNode* c_node
 *     cdef Py_ssize_t count
 */

static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
  xmlNode *__pyx_v_c_node;
  Py_ssize_t __pyx_v_count;
  const xmlChar *__pyx_v_c_tag;
  const xmlChar *__pyx_v_c_href;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_countSiblings", 0);

  /* "src/lxml/lxml.objectify.pyx":381
 *     cdef tree.xmlNode* c_node
 *     cdef Py_ssize_t count
 *     c_tag  = c_start_node.name             # <<<<<<<<<<<<<<
 *     c_href = tree._getNs(c_start_node)
 *     count = 1
 */
  __pyx_v_c_tag = __pyx_v_c_start_node->name;

  /* "src/lxml/lxml.objectify.pyx":382
 *     cdef Py_ssize_t count
 *     c_tag  = c_start_node.name
 *     c_href = tree._getNs(c_start_node)             # <<<<<<<<<<<<<<
 *     count = 1
 *     c_node = c_start_node.next
 */
  __pyx_v_c_href = _getNs(__pyx_v_c_start_node);

  /* "src/lxml/lxml.objectify.pyx":383
 *     c_tag  = c_start_node.name
 *     c_href = tree._getNs(c_start_node)
 *     count = 1             # <<<<<<<<<<<<<<
 *     c_node = c_start_node.next
 *     while c_node is not NULL:
 */
  __pyx_v_count = 1;

  /* "src/lxml/lxml.objectify.pyx":384
 *     c_href = tree._getNs(c_start_node)
 *     count = 1
 *     c_node = c_start_node.next             # <<<<<<<<<<<<<<
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 */
  __pyx_v_c_node = __pyx_v_c_start_node->next;

  /* "src/lxml/lxml.objectify.pyx":385
 *     count = 1
 *     c_node = c_start_node.next
 *     while c_node is not NULL:             # <<<<<<<<<<<<<<
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_1) break;

    /* "src/lxml/lxml.objectify.pyx":386
 *     c_node = c_start_node.next
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
 *                _tagMatches(c_node, c_href, c_tag):
 *             count += 1
 */
    __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":387
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
 *             count += 1
 *         c_node = c_node.next
 */
      __pyx_t_2 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":388
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):
 *             count += 1             # <<<<<<<<<<<<<<
 *         c_node = c_node.next
 *     c_node = c_start_node.prev
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":389
 *                _tagMatches(c_node, c_href, c_tag):
 *             count += 1
 *         c_node = c_node.next             # <<<<<<<<<<<<<<
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:
 */
    __pyx_v_c_node = __pyx_v_c_node->next;
  }

  /* "src/lxml/lxml.objectify.pyx":390
 *             count += 1
 *         c_node = c_node.next
 *     c_node = c_start_node.prev             # <<<<<<<<<<<<<<
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 */
  __pyx_v_c_node = __pyx_v_c_start_node->prev;

  /* "src/lxml/lxml.objectify.pyx":391
 *         c_node = c_node.next
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:             # <<<<<<<<<<<<<<
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_3) break;

    /* "src/lxml/lxml.objectify.pyx":392
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
 *                _tagMatches(c_node, c_href, c_tag):
 *             count += 1
 */
    __pyx_t_3 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":393
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
 *             count += 1
 *         c_node = c_node.prev
 */
      __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
      __pyx_t_2 = __pyx_t_1;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":394
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):
 *             count += 1             # <<<<<<<<<<<<<<
 *         c_node = c_node.prev
 *     return count
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "src/lxml/lxml.objectify.pyx":395
 *                _tagMatches(c_node, c_href, c_tag):
 *             count += 1
 *         c_node = c_node.prev             # <<<<<<<<<<<<<<
 *     return count
 * 
 */
    __pyx_v_c_node = __pyx_v_c_node->prev;
  }

  /* "src/lxml/lxml.objectify.pyx":396
 *             count += 1
 *         c_node = c_node.prev
 *     return count             # <<<<<<<<<<<<<<
 * 
 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,
 */
  __pyx_r = __pyx_v_count;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":398
 *     return count
 * 
 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
 *                                          const_xmlChar* href, const_xmlChar* name,
 *                                          Py_ssize_t index):
 */

static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_href, const xmlChar *__pyx_v_name, Py_ssize_t __pyx_v_index) {
  xmlNode *(*__pyx_v_next)(xmlNode *);
  xmlNode *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_findFollowingSibling", 0);

  /* "src/lxml/lxml.objectify.pyx":402
 *                                          Py_ssize_t index):
 *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
 *     if index >= 0:             # <<<<<<<<<<<<<<
 *         next = cetree.nextElement
 *     else:
 */
  __pyx_t_1 = (__pyx_v_index >= 0);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":403
 *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
 *     if index >= 0:
 *         next = cetree.nextElement             # <<<<<<<<<<<<<<
 *     else:
 *         index = -1 - index
 */
    __pyx_v_next = nextElement;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":405
 *         next = cetree.nextElement
 *     else:
 *         index = -1 - index             # <<<<<<<<<<<<<<
 *         next = cetree.previousElement
 *     while c_node is not NULL:
 */
    __pyx_v_index = (-1 - __pyx_v_index);

    /* "src/lxml/lxml.objectify.pyx":406
 *     else:
 *         index = -1 - index
 *         next = cetree.previousElement             # <<<<<<<<<<<<<<
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 */
    __pyx_v_next = previousElement;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":407
 *         index = -1 - index
 *         next = cetree.previousElement
 *     while c_node is not NULL:             # <<<<<<<<<<<<<<
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, href, name):
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_1) break;

    /* "src/lxml/lxml.objectify.pyx":408
 *         next = cetree.previousElement
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
 *                _tagMatches(c_node, href, name):
 *             index = index - 1
 */
    __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":409
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, href, name):             # <<<<<<<<<<<<<<
 *             index = index - 1
 *             if index < 0:
 */
      __pyx_t_2 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_href, __pyx_v_name);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":410
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, href, name):
 *             index = index - 1             # <<<<<<<<<<<<<<
 *             if index < 0:
 *                 return c_node
 */
      __pyx_v_index = (__pyx_v_index - 1);

      /* "src/lxml/lxml.objectify.pyx":411
 *                _tagMatches(c_node, href, name):
 *             index = index - 1
 *             if index < 0:             # <<<<<<<<<<<<<<
 *                 return c_node
 *         c_node = next(c_node)
 */
      __pyx_t_3 = (__pyx_v_index < 0);
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":412
 *             index = index - 1
 *             if index < 0:
 *                 return c_node             # <<<<<<<<<<<<<<
 *         c_node = next(c_node)
 *     return NULL
 */
        __pyx_r = __pyx_v_c_node;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      __pyx_L7:;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "src/lxml/lxml.objectify.pyx":413
 *             if index < 0:
 *                 return c_node
 *         c_node = next(c_node)             # <<<<<<<<<<<<<<
 *     return NULL
 * 
 */
    __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
  }

  /* "src/lxml/lxml.objectify.pyx":414
 *                 return c_node
 *         c_node = next(c_node)
 *     return NULL             # <<<<<<<<<<<<<<
 * 
 * cdef object _lookupChild(_Element parent, tag):
 */
  __pyx_r = NULL;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":416
 *     return NULL
 * 
 * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<<
 *     cdef tree.xmlNode* c_result
 *     cdef tree.xmlNode* c_node
 */

static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
  xmlNode *__pyx_v_c_result;
  xmlNode *__pyx_v_c_node;
  PyObject *__pyx_v_ns = NULL;
  const xmlChar *__pyx_v_c_tag;
  const xmlChar *__pyx_v_c_href;
  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;
  const xmlChar *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_lookupChild", 0);
  __Pyx_INCREF(__pyx_v_tag);

  /* "src/lxml/lxml.objectify.pyx":419
 *     cdef tree.xmlNode* c_result
 *     cdef tree.xmlNode* c_node
 *     c_node = parent._c_node             # <<<<<<<<<<<<<<
 *     ns, tag = cetree.getNsTagWithEmptyNs(tag)
 *     c_tag = tree.xmlDictExists(
 */
  __pyx_v_c_node = __pyx_v_parent->_c_node;

  /* "src/lxml/lxml.objectify.pyx":420
 *     cdef tree.xmlNode* c_node
 *     c_node = parent._c_node
 *     ns, tag = cetree.getNsTagWithEmptyNs(tag)             # <<<<<<<<<<<<<<
 *     c_tag = tree.xmlDictExists(
 *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
 */
  __pyx_t_1 = ((PyObject *)getNsTagWithEmptyNs(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyTuple_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else if (1) {
    __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_ns = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":422
 *     ns, tag = cetree.getNsTagWithEmptyNs(tag)
 *     c_tag = tree.xmlDictExists(
 *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))             # <<<<<<<<<<<<<<
 *     if c_tag is NULL:
 *         return None # not in the hash map => not in the tree
 */
  __pyx_v_c_tag = xmlDictExists(__pyx_v_c_node->doc->dict, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag), PyBytes_GET_SIZE(__pyx_v_tag));

  /* "src/lxml/lxml.objectify.pyx":423
 *     c_tag = tree.xmlDictExists(
 *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
 *     if c_tag is NULL:             # <<<<<<<<<<<<<<
 *         return None # not in the hash map => not in the tree
 *     c_href = tree._getNs(c_node) if ns is None else _xcstr(ns)
 */
  __pyx_t_6 = (__pyx_v_c_tag == NULL);
  if (__pyx_t_6) {

    /* "src/lxml/lxml.objectify.pyx":424
 *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
 *     if c_tag is NULL:
 *         return None # not in the hash map => not in the tree             # <<<<<<<<<<<<<<
 *     c_href = tree._getNs(c_node) if ns is None else _xcstr(ns)
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":425
 *     if c_tag is NULL:
 *         return None # not in the hash map => not in the tree
 *     c_href = tree._getNs(c_node) if ns is None else _xcstr(ns)             # <<<<<<<<<<<<<<
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:
 */
  __pyx_t_6 = (__pyx_v_ns == Py_None);
  if (__pyx_t_6) {
    __pyx_t_7 = _getNs(__pyx_v_c_node);
  } else {
    __pyx_t_7 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns);
  }
  __pyx_v_c_href = __pyx_t_7;

  /* "src/lxml/lxml.objectify.pyx":426
 *         return None # not in the hash map => not in the tree
 *     c_href = tree._getNs(c_node) if ns is None else _xcstr(ns)
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)             # <<<<<<<<<<<<<<
 *     if c_result is NULL:
 *         return None
 */
  __pyx_v_c_result = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node->children, __pyx_v_c_href, __pyx_v_c_tag, 0);

  /* "src/lxml/lxml.objectify.pyx":427
 *     c_href = tree._getNs(c_node) if ns is None else _xcstr(ns)
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return elementFactory(parent._doc, c_result)
 */
  __pyx_t_6 = (__pyx_v_c_result == NULL);
  if (__pyx_t_6) {

    /* "src/lxml/lxml.objectify.pyx":428
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return elementFactory(parent._doc, c_result)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "src/lxml/lxml.objectify.pyx":429
 *     if c_result is NULL:
 *         return None
 *     return elementFactory(parent._doc, c_result)             # <<<<<<<<<<<<<<
 * 
 * cdef object _lookupChildOrRaise(_Element parent, tag):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_parent->_doc);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_result)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __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("lxml.objectify._lookupChild", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":431
 *     return elementFactory(parent._doc, c_result)
 * 
 * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<<
 *     element = _lookupChild(parent, tag)
 *     if element is None:
 */

static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
  PyObject *__pyx_v_element = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_lookupChildOrRaise", 0);

  /* "src/lxml/lxml.objectify.pyx":432
 * 
 * cdef object _lookupChildOrRaise(_Element parent, tag):
 *     element = _lookupChild(parent, tag)             # <<<<<<<<<<<<<<
 *     if element is None:
 *         raise AttributeError, \
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChild(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_element = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":433
 * cdef object _lookupChildOrRaise(_Element parent, tag):
 *     element = _lookupChild(parent, tag)
 *     if element is None:             # <<<<<<<<<<<<<<
 *         raise AttributeError, \
 *             u"no such child: " + _buildChildTag(parent, tag)
 */
  __pyx_t_2 = (__pyx_v_element == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":435
 *     if element is None:
 *         raise AttributeError, \
 *             u"no such child: " + _buildChildTag(parent, tag)             # <<<<<<<<<<<<<<
 *     return element
 * 
 */
    __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_kp_u_10), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_3, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":436
 *         raise AttributeError, \
 *             u"no such child: " + _buildChildTag(parent, tag)
 *     return element             # <<<<<<<<<<<<<<
 * 
 * cdef object _buildChildTag(_Element parent, tag):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_element);
  __pyx_r = __pyx_v_element;
  goto __pyx_L0;

  __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("lxml.objectify._lookupChildOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":438
 *     return element
 * 
 * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _xcstr(tag)
 */

static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
  PyObject *__pyx_v_ns = NULL;
  const xmlChar *__pyx_v_c_tag;
  const xmlChar *__pyx_v_c_href;
  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 *);
  const xmlChar *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_buildChildTag", 0);
  __Pyx_INCREF(__pyx_v_tag);

  /* "src/lxml/lxml.objectify.pyx":439
 * 
 * cdef object _buildChildTag(_Element parent, tag):
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
 *     c_tag = _xcstr(tag)
 *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
 */
  __pyx_t_1 = ((PyObject *)getNsTag(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyTuple_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else if (1) {
    __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_ns = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":440
 * cdef object _buildChildTag(_Element parent, tag):
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _xcstr(tag)             # <<<<<<<<<<<<<<
 *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)
 */
  __pyx_v_c_tag = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag);

  /* "src/lxml/lxml.objectify.pyx":441
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _xcstr(tag)
 *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)             # <<<<<<<<<<<<<<
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)
 * 
 */
  __pyx_t_7 = (__pyx_v_ns == Py_None);
  if (__pyx_t_7) {
    __pyx_t_6 = _getNs(__pyx_v_parent->_c_node);
  } else {
    __pyx_t_6 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns);
  }
  __pyx_v_c_href = __pyx_t_6;

  /* "src/lxml/lxml.objectify.pyx":442
 *     c_tag = _xcstr(tag)
 *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)             # <<<<<<<<<<<<<<
 * 
 * cdef _replaceElement(_Element element, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify._buildChildTag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":444
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)
 * 
 * cdef _replaceElement(_Element element, value):             # <<<<<<<<<<<<<<
 *     cdef _Element new_element
 *     if isinstance(value, _Element):
 */

static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_new_element = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_replaceElement", 0);

  /* "src/lxml/lxml.objectify.pyx":446
 * cdef _replaceElement(_Element element, value):
 *     cdef _Element new_element
 *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic__Element));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":449
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
 *         new_element.tag = element.tag
 *     elif isinstance(value, (list, tuple)):
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_element->_doc);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = ((PyObject *)deepcopyNodeToDocument(((struct LxmlDocument *)__pyx_t_1), ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/lxml/lxml.objectify.pyx":450
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (list, tuple)):
 *         element[:] = value
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_s__tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_s__tag, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":451
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag
 *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
 *         element[:] = value
 *         return
 */
  __Pyx_INCREF(__pyx_v_value);
  __pyx_t_3 = __pyx_v_value;
  __pyx_t_2 = PyList_Check(__pyx_t_3); 
  if (!__pyx_t_2) {
    __pyx_t_4 = PyTuple_Check(__pyx_t_3); 
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "src/lxml/lxml.objectify.pyx":452
 *         new_element.tag = element.tag
 *     elif isinstance(value, (list, tuple)):
 *         element[:] = value             # <<<<<<<<<<<<<<
 *         return
 *     else:
 */
    if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_element), 0, PY_SSIZE_T_MAX, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "src/lxml/lxml.objectify.pyx":453
 *     elif isinstance(value, (list, tuple)):
 *         element[:] = value
 *         return             # <<<<<<<<<<<<<<
 *     else:
 *         new_element = element.makeelement(element.tag)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":455
 *         return
 *     else:
 *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<<
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_s__makeelement); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_s__tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":456
 *     else:
 *         new_element = element.makeelement(element.tag)
 *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
 *     element.getparent().replace(element, new_element)
 * 
 */
    __pyx_t_1 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":457
 *         new_element = element.makeelement(element.tag)
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<<
 * 
 * cdef _appendValue(_Element parent, tag, value):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_s__getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_element));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_element));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_element));
  __Pyx_INCREF(((PyObject *)__pyx_v_new_element));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_new_element));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_new_element));
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __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_6);
  __Pyx_AddTraceback("lxml.objectify._replaceElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":459
 *     element.getparent().replace(element, new_element)
 * 
 * cdef _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<<
 *     cdef _Element new_element
 *     if isinstance(value, _Element):
 */

static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_new_element = 0;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_appendValue", 0);

  /* "src/lxml/lxml.objectify.pyx":461
 * cdef _appendValue(_Element parent, tag, value):
 *     cdef _Element new_element
 *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic__Element));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":464
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 *             parent._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_parent->_doc);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = ((PyObject *)deepcopyNodeToDocument(((struct LxmlDocument *)__pyx_t_1), ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/lxml/lxml.objectify.pyx":465
 *         new_element = cetree.deepcopyNodeToDocument(
 *             parent._doc, (<_Element>value)._c_node)
 *         new_element.tag = tag             # <<<<<<<<<<<<<<
 *         cetree.appendChild(parent, new_element)
 *     elif isinstance(value, (list, tuple)):
 */
    if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_s__tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "src/lxml/lxml.objectify.pyx":466
 *             parent._doc, (<_Element>value)._c_node)
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (list, tuple)):
 *         for item in value:
 */
    appendChild(__pyx_v_parent, __pyx_v_new_element);
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":467
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)
 *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
 *         for item in value:
 *             _appendValue(parent, tag, item)
 */
  __Pyx_INCREF(__pyx_v_value);
  __pyx_t_3 = __pyx_v_value;
  __pyx_t_2 = PyList_Check(__pyx_t_3); 
  if (!__pyx_t_2) {
    __pyx_t_4 = PyTuple_Check(__pyx_t_3); 
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "src/lxml/lxml.objectify.pyx":468
 *         cetree.appendChild(parent, new_element)
 *     elif isinstance(value, (list, tuple)):
 *         for item in value:             # <<<<<<<<<<<<<<
 *             _appendValue(parent, tag, item)
 *     else:
 */
    if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) {
      __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        #endif
      } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        #endif
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "src/lxml/lxml.objectify.pyx":469
 *     elif isinstance(value, (list, tuple)):
 *         for item in value:
 *             _appendValue(parent, tag, item)             # <<<<<<<<<<<<<<
 *     else:
 *         new_element = cetree.makeElement(
 */
      __pyx_t_1 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent, __pyx_v_tag, __pyx_v_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":472
 *     else:
 *         new_element = cetree.makeElement(
 *             tag, parent._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
 *         _setElementValue(new_element, value)
 *         cetree.appendChild(parent, new_element)
 */
    __pyx_t_3 = ((PyObject *)__pyx_v_parent->_doc);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = Py_None;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_8 = Py_None;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_9 = Py_None;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_10 = Py_None;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_11 = Py_None;
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_12 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)__pyx_t_3), __pyx_t_1, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_12);
    __pyx_t_12 = 0;

    /* "src/lxml/lxml.objectify.pyx":473
 *         new_element = cetree.makeElement(
 *             tag, parent._doc, None, None, None, None, None)
 *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
 *         cetree.appendChild(parent, new_element)
 * 
 */
    __pyx_t_12 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "src/lxml/lxml.objectify.pyx":474
 *             tag, parent._doc, None, None, None, None, None)
 *         _setElementValue(new_element, value)
 *         cetree.appendChild(parent, new_element)             # <<<<<<<<<<<<<<
 * 
 * cdef _setElementValue(_Element element, value):
 */
    appendChild(__pyx_v_parent, __pyx_v_new_element);
  }
  __pyx_L3:;

  __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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("lxml.objectify._appendValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":476
 *         cetree.appendChild(parent, new_element)
 * 
 * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<<
 *     cdef python.PyObject* _pytype
 *     if value is None:
 */

static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
  PyObject *__pyx_v__pytype;
  PyObject *__pyx_v_pytype_name = NULL;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setElementValue", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "src/lxml/lxml.objectify.pyx":478
 * cdef _setElementValue(_Element element, value):
 *     cdef python.PyObject* _pytype
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":480
 *     if value is None:
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
 *     elif isinstance(value, _Element):
 *         _replaceElement(element, value)
 */
    __pyx_t_2 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = ((PyObject *)__pyx_n_u__true);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = setAttributeValue(__pyx_v_element, __pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":481
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
 *         _replaceElement(element, value)
 *         return
 */
  __pyx_t_3 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic__Element));
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":482
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 *     elif isinstance(value, _Element):
 *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
 *         return
 *     else:
 */
    __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/lxml/lxml.objectify.pyx":483
 *     elif isinstance(value, _Element):
 *         _replaceElement(element, value)
 *         return             # <<<<<<<<<<<<<<
 *     else:
 *         cetree.delAttributeFromNsName(
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":486
 *     else:
 *         cetree.delAttributeFromNsName(
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")             # <<<<<<<<<<<<<<
 *         if python._isString(value):
 *             pytype_name = u"str"
 */
    delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__nil)));

    /* "src/lxml/lxml.objectify.pyx":487
 *         cetree.delAttributeFromNsName(
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
 *         if python._isString(value):             # <<<<<<<<<<<<<<
 *             pytype_name = u"str"
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 */
    __pyx_t_1 = _isString(__pyx_v_value);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":488
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
 *         if python._isString(value):
 *             pytype_name = u"str"             # <<<<<<<<<<<<<<
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         else:
 */
      __Pyx_INCREF(((PyObject *)__pyx_n_u__str));
      __pyx_v_pytype_name = ((PyObject *)__pyx_n_u__str);

      /* "src/lxml/lxml.objectify.pyx":489
 *         if python._isString(value):
 *             pytype_name = u"str"
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
 *         else:
 *             pytype_name = _typename(value)
 */
      __pyx_t_3 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v__pytype = PyDict_GetItem(__pyx_t_3, __pyx_v_pytype_name);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":491
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         else:
 *             pytype_name = _typename(value)             # <<<<<<<<<<<<<<
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *             if _pytype is not NULL:
 */
      __pyx_t_3 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_pytype_name = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "src/lxml/lxml.objectify.pyx":492
 *         else:
 *             pytype_name = _typename(value)
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
 *             if _pytype is not NULL:
 *                 value = (<PyType>_pytype).stringify(value)
 */
      __pyx_t_3 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v__pytype = PyDict_GetItem(__pyx_t_3, __pyx_v_pytype_name);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/lxml/lxml.objectify.pyx":493
 *             pytype_name = _typename(value)
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *             if _pytype is not NULL:             # <<<<<<<<<<<<<<
 *                 value = (<PyType>_pytype).stringify(value)
 *             else:
 */
      __pyx_t_1 = (__pyx_v__pytype != NULL);
      if (__pyx_t_1) {

        /* "src/lxml/lxml.objectify.pyx":494
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *             if _pytype is not NULL:
 *                 value = (<PyType>_pytype).stringify(value)             # <<<<<<<<<<<<<<
 *             else:
 *                 value = unicode(value)
 */
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_2 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v__pytype)->stringify, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L5;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":496
 *                 value = (<PyType>_pytype).stringify(value)
 *             else:
 *                 value = unicode(value)             # <<<<<<<<<<<<<<
 *         if _pytype is not NULL:
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 */
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L5:;
    }
    __pyx_L4:;

    /* "src/lxml/lxml.objectify.pyx":497
 *             else:
 *                 value = unicode(value)
 *         if _pytype is not NULL:             # <<<<<<<<<<<<<<
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 *         else:
 */
    __pyx_t_1 = (__pyx_v__pytype != NULL);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":498
 *                 value = unicode(value)
 *         if _pytype is not NULL:
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
 *         else:
 *             cetree.delAttributeFromNsName(
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_v_pytype_name); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":501
 *         else:
 *             cetree.delAttributeFromNsName(
 *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
 *     cetree.setNodeText(element._c_node, value)
 * 
 */
      delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
    }
    __pyx_L6:;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":502
 *             cetree.delAttributeFromNsName(
 *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *     cetree.setNodeText(element._c_node, value)             # <<<<<<<<<<<<<<
 * 
 * cdef _setSlice(sliceobject, _Element target, items):
 */
  __pyx_t_4 = setNodeText(__pyx_v_element->_c_node, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify._setElementValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pytype_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":504
 *     cetree.setNodeText(element._c_node, value)
 * 
 * cdef _setSlice(sliceobject, _Element target, items):             # <<<<<<<<<<<<<<
 *     cdef _Element parent
 *     cdef tree.xmlNode* c_node
 */

static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_sliceobject, struct LxmlElement *__pyx_v_target, PyObject *__pyx_v_items) {
  struct LxmlElement *__pyx_v_parent = 0;
  xmlNode *__pyx_v_c_node;
  Py_ssize_t __pyx_v_c_step;
  Py_ssize_t __pyx_v_pos;
  PyObject *__pyx_v_new_items = 0;
  PyObject *__pyx_v_del_items = NULL;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_v_item = NULL;
  struct LxmlElement *__pyx_v_new_element = NULL;
  PyObject *__pyx_v_replace = NULL;
  PyObject *__pyx_v_remove = NULL;
  PyObject *__pyx_v_add = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setSlice", 0);

  /* "src/lxml/lxml.objectify.pyx":510
 *     cdef list new_items
 *     # collect existing slice
 *     if (<slice>sliceobject).step is None:             # <<<<<<<<<<<<<<
 *         c_step = 1
 *     else:
 */
  __pyx_t_1 = (((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->step == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":511
 *     # collect existing slice
 *     if (<slice>sliceobject).step is None:
 *         c_step = 1             # <<<<<<<<<<<<<<
 *     else:
 *         c_step = (<slice>sliceobject).step
 */
    __pyx_v_c_step = 1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":513
 *         c_step = 1
 *     else:
 *         c_step = (<slice>sliceobject).step             # <<<<<<<<<<<<<<
 *     if c_step == 0:
 *         raise ValueError, u"Invalid slice"
 */
    __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->step); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_c_step = __pyx_t_2;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":514
 *     else:
 *         c_step = (<slice>sliceobject).step
 *     if c_step == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError, u"Invalid slice"
 *     del_items = target[sliceobject]
 */
  __pyx_t_1 = (__pyx_v_c_step == 0);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":515
 *         c_step = (<slice>sliceobject).step
 *     if c_step == 0:
 *         raise ValueError, u"Invalid slice"             # <<<<<<<<<<<<<<
 *     del_items = target[sliceobject]
 * 
 */
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_11), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":516
 *     if c_step == 0:
 *         raise ValueError, u"Invalid slice"
 *     del_items = target[sliceobject]             # <<<<<<<<<<<<<<
 * 
 *     # collect new values
 */
  __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_target), __pyx_v_sliceobject); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_del_items = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":519
 * 
 *     # collect new values
 *     new_items = []             # <<<<<<<<<<<<<<
 *     tag = target.tag
 *     for item in items:
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_new_items = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":520
 *     # collect new values
 *     new_items = []
 *     tag = target.tag             # <<<<<<<<<<<<<<
 *     for item in items:
 *         if isinstance(item, _Element):
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_n_s__tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tag = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":521
 *     new_items = []
 *     tag = target.tag
 *     for item in items:             # <<<<<<<<<<<<<<
 *         if isinstance(item, _Element):
 *             # deep copy the new element
 */
  if (PyList_CheckExact(__pyx_v_items) || PyTuple_CheckExact(__pyx_v_items)) {
    __pyx_t_3 = __pyx_v_items; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "src/lxml/lxml.objectify.pyx":522
 *     tag = target.tag
 *     for item in items:
 *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
 *             # deep copy the new element
 *             new_element = cetree.deepcopyNodeToDocument(
 */
    __pyx_t_5 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic__Element));
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_item, __pyx_t_5); 
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":525
 *             # deep copy the new element
 *             new_element = cetree.deepcopyNodeToDocument(
 *                 target._doc, (<_Element>item)._c_node)             # <<<<<<<<<<<<<<
 *             new_element.tag = tag
 *         else:
 */
      __pyx_t_5 = ((PyObject *)__pyx_v_target->_doc);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = ((PyObject *)deepcopyNodeToDocument(((struct LxmlDocument *)__pyx_t_5), ((struct LxmlElement *)__pyx_v_item)->_c_node)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_new_element));
      __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":526
 *             new_element = cetree.deepcopyNodeToDocument(
 *                 target._doc, (<_Element>item)._c_node)
 *             new_element.tag = tag             # <<<<<<<<<<<<<<
 *         else:
 *             new_element = cetree.makeElement(
 */
      if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_s__tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":529
 *         else:
 *             new_element = cetree.makeElement(
 *                 tag, target._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
 *             _setElementValue(new_element, item)
 *         new_items.append(new_element)
 */
      __pyx_t_6 = ((PyObject *)__pyx_v_target->_doc);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = Py_None;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = Py_None;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = Py_None;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = Py_None;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_10 = Py_None;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_11 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)__pyx_t_6), __pyx_t_5, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_new_element));
      __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_11);
      __pyx_t_11 = 0;

      /* "src/lxml/lxml.objectify.pyx":530
 *             new_element = cetree.makeElement(
 *                 tag, target._doc, None, None, None, None, None)
 *             _setElementValue(new_element, item)             # <<<<<<<<<<<<<<
 *         new_items.append(new_element)
 * 
 */
      __pyx_t_11 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_item); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_L7:;

    /* "src/lxml/lxml.objectify.pyx":531
 *                 tag, target._doc, None, None, None, None, None)
 *             _setElementValue(new_element, item)
 *         new_items.append(new_element)             # <<<<<<<<<<<<<<
 * 
 *     # sanity check - raise what a list would raise
 */
    __pyx_t_12 = PyList_Append(__pyx_v_new_items, ((PyObject *)__pyx_v_new_element)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":534
 * 
 *     # sanity check - raise what a list would raise
 *     if c_step != 1 and \             # <<<<<<<<<<<<<<
 *             python.PyList_GET_SIZE(del_items) != python.PyList_GET_SIZE(new_items):
 *         raise ValueError, \
 */
  __pyx_t_1 = (__pyx_v_c_step != 1);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":535
 *     # sanity check - raise what a list would raise
 *     if c_step != 1 and \
 *             python.PyList_GET_SIZE(del_items) != python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
 *         raise ValueError, \
 *             u"attempt to assign sequence of size %d to extended slice of size %d" % (
 */
    __pyx_t_13 = (PyList_GET_SIZE(__pyx_v_del_items) != PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_1;
  }
  if (__pyx_t_14) {

    /* "src/lxml/lxml.objectify.pyx":538
 *         raise ValueError, \
 *             u"attempt to assign sequence of size %d to extended slice of size %d" % (
 *             python.PyList_GET_SIZE(new_items),             # <<<<<<<<<<<<<<
 *             python.PyList_GET_SIZE(del_items))
 * 
 */
    __pyx_t_3 = PyInt_FromSsize_t(PyList_GET_SIZE(((PyObject *)__pyx_v_new_items))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "src/lxml/lxml.objectify.pyx":539
 *             u"attempt to assign sequence of size %d to extended slice of size %d" % (
 *             python.PyList_GET_SIZE(new_items),
 *             python.PyList_GET_SIZE(del_items))             # <<<<<<<<<<<<<<
 * 
 *     # replace existing items
 */
    __pyx_t_11 = PyInt_FromSsize_t(PyList_GET_SIZE(__pyx_v_del_items)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    __pyx_t_3 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), 0, 0);
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "src/lxml/lxml.objectify.pyx":542
 * 
 *     # replace existing items
 *     pos = 0             # <<<<<<<<<<<<<<
 *     parent = target.getparent()
 *     replace = parent.replace
 */
  __pyx_v_pos = 0;

  /* "src/lxml/lxml.objectify.pyx":543
 *     # replace existing items
 *     pos = 0
 *     parent = target.getparent()             # <<<<<<<<<<<<<<
 *     replace = parent.replace
 *     while pos < python.PyList_GET_SIZE(new_items) and \
 */
  __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_n_s__getparent); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_parent = ((struct LxmlElement *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "src/lxml/lxml.objectify.pyx":544
 *     pos = 0
 *     parent = target.getparent()
 *     replace = parent.replace             # <<<<<<<<<<<<<<
 *     while pos < python.PyList_GET_SIZE(new_items) and \
 *             pos < python.PyList_GET_SIZE(del_items):
 */
  __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_s__replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_v_replace = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "src/lxml/lxml.objectify.pyx":545
 *     parent = target.getparent()
 *     replace = parent.replace
 *     while pos < python.PyList_GET_SIZE(new_items) and \             # <<<<<<<<<<<<<<
 *             pos < python.PyList_GET_SIZE(del_items):
 *         replace(del_items[pos], new_items[pos])
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
    if (__pyx_t_14) {

      /* "src/lxml/lxml.objectify.pyx":546
 *     replace = parent.replace
 *     while pos < python.PyList_GET_SIZE(new_items) and \
 *             pos < python.PyList_GET_SIZE(del_items):             # <<<<<<<<<<<<<<
 *         replace(del_items[pos], new_items[pos])
 *         pos += 1
 */
      __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
      __pyx_t_13 = __pyx_t_1;
    } else {
      __pyx_t_13 = __pyx_t_14;
    }
    if (!__pyx_t_13) break;

    /* "src/lxml/lxml.objectify.pyx":547
 *     while pos < python.PyList_GET_SIZE(new_items) and \
 *             pos < python.PyList_GET_SIZE(del_items):
 *         replace(del_items[pos], new_items[pos])             # <<<<<<<<<<<<<<
 *         pos += 1
 *     # remove leftover items
 */
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(__pyx_v_replace, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "src/lxml/lxml.objectify.pyx":548
 *             pos < python.PyList_GET_SIZE(del_items):
 *         replace(del_items[pos], new_items[pos])
 *         pos += 1             # <<<<<<<<<<<<<<
 *     # remove leftover items
 *     if pos < python.PyList_GET_SIZE(del_items):
 */
    __pyx_v_pos = (__pyx_v_pos + 1);
  }

  /* "src/lxml/lxml.objectify.pyx":550
 *         pos += 1
 *     # remove leftover items
 *     if pos < python.PyList_GET_SIZE(del_items):             # <<<<<<<<<<<<<<
 *         remove = parent.remove
 *         while pos < python.PyList_GET_SIZE(del_items):
 */
  __pyx_t_13 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
  if (__pyx_t_13) {

    /* "src/lxml/lxml.objectify.pyx":551
 *     # remove leftover items
 *     if pos < python.PyList_GET_SIZE(del_items):
 *         remove = parent.remove             # <<<<<<<<<<<<<<
 *         while pos < python.PyList_GET_SIZE(del_items):
 *             remove(del_items[pos])
 */
    __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_s__remove); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_v_remove = __pyx_t_11;
    __pyx_t_11 = 0;

    /* "src/lxml/lxml.objectify.pyx":552
 *     if pos < python.PyList_GET_SIZE(del_items):
 *         remove = parent.remove
 *         while pos < python.PyList_GET_SIZE(del_items):             # <<<<<<<<<<<<<<
 *             remove(del_items[pos])
 *             pos += 1
 */
    while (1) {
      __pyx_t_13 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
      if (!__pyx_t_13) break;

      /* "src/lxml/lxml.objectify.pyx":553
 *         remove = parent.remove
 *         while pos < python.PyList_GET_SIZE(del_items):
 *             remove(del_items[pos])             # <<<<<<<<<<<<<<
 *             pos += 1
 *     # append remaining new items
 */
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "src/lxml/lxml.objectify.pyx":554
 *         while pos < python.PyList_GET_SIZE(del_items):
 *             remove(del_items[pos])
 *             pos += 1             # <<<<<<<<<<<<<<
 *     # append remaining new items
 *     if pos < python.PyList_GET_SIZE(new_items):
 */
      __pyx_v_pos = (__pyx_v_pos + 1);
    }
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "src/lxml/lxml.objectify.pyx":556
 *             pos += 1
 *     # append remaining new items
 *     if pos < python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
 *         # the sanity check above guarantees (step == 1)
 *         if pos > 0:
 */
  __pyx_t_13 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
  if (__pyx_t_13) {

    /* "src/lxml/lxml.objectify.pyx":558
 *     if pos < python.PyList_GET_SIZE(new_items):
 *         # the sanity check above guarantees (step == 1)
 *         if pos > 0:             # <<<<<<<<<<<<<<
 *             item = new_items[pos-1]
 *         else:
 */
    __pyx_t_13 = (__pyx_v_pos > 0);
    if (__pyx_t_13) {

      /* "src/lxml/lxml.objectify.pyx":559
 *         # the sanity check above guarantees (step == 1)
 *         if pos > 0:
 *             item = new_items[pos-1]             # <<<<<<<<<<<<<<
 *         else:
 *             if (<slice>sliceobject).start > 0:
 */
      __pyx_t_2 = (__pyx_v_pos - 1);
      __pyx_t_11 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L15;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":561
 *             item = new_items[pos-1]
 *         else:
 *             if (<slice>sliceobject).start > 0:             # <<<<<<<<<<<<<<
 *                 c_node = parent._c_node.children
 *             else:
 */
      __pyx_t_11 = PyObject_RichCompare(((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->start, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_13) {

        /* "src/lxml/lxml.objectify.pyx":562
 *         else:
 *             if (<slice>sliceobject).start > 0:
 *                 c_node = parent._c_node.children             # <<<<<<<<<<<<<<
 *             else:
 *                 c_node = parent._c_node.last
 */
        __pyx_v_c_node = __pyx_v_parent->_c_node->children;
        goto __pyx_L16;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":564
 *                 c_node = parent._c_node.children
 *             else:
 *                 c_node = parent._c_node.last             # <<<<<<<<<<<<<<
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(target._c_node), target._c_node.name,
 */
        __pyx_v_c_node = __pyx_v_parent->_c_node->last;
      }
      __pyx_L16:;

      /* "src/lxml/lxml.objectify.pyx":567
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(target._c_node), target._c_node.name,
 *                 (<slice>sliceobject).start - 1)             # <<<<<<<<<<<<<<
 *             if c_node is NULL:
 *                 while pos < python.PyList_GET_SIZE(new_items):
 */
      __pyx_t_11 = PyNumber_Subtract(((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->start, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_target->_c_node), __pyx_v_target->_c_node->name, __pyx_t_2);

      /* "src/lxml/lxml.objectify.pyx":568
 *                 c_node, tree._getNs(target._c_node), target._c_node.name,
 *                 (<slice>sliceobject).start - 1)
 *             if c_node is NULL:             # <<<<<<<<<<<<<<
 *                 while pos < python.PyList_GET_SIZE(new_items):
 *                     cetree.appendChild(parent, new_items[pos])
 */
      __pyx_t_13 = (__pyx_v_c_node == NULL);
      if (__pyx_t_13) {

        /* "src/lxml/lxml.objectify.pyx":569
 *                 (<slice>sliceobject).start - 1)
 *             if c_node is NULL:
 *                 while pos < python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
 *                     cetree.appendChild(parent, new_items[pos])
 *                     pos += 1
 */
        while (1) {
          __pyx_t_13 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
          if (!__pyx_t_13) break;

          /* "src/lxml/lxml.objectify.pyx":570
 *             if c_node is NULL:
 *                 while pos < python.PyList_GET_SIZE(new_items):
 *                     cetree.appendChild(parent, new_items[pos])             # <<<<<<<<<<<<<<
 *                     pos += 1
 *                 return
 */
          __pyx_t_11 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          appendChild(__pyx_v_parent, ((struct LxmlElement *)__pyx_t_11));
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "src/lxml/lxml.objectify.pyx":571
 *                 while pos < python.PyList_GET_SIZE(new_items):
 *                     cetree.appendChild(parent, new_items[pos])
 *                     pos += 1             # <<<<<<<<<<<<<<
 *                 return
 *             item = cetree.elementFactory(parent._doc, c_node)
 */
          __pyx_v_pos = (__pyx_v_pos + 1);
        }

        /* "src/lxml/lxml.objectify.pyx":572
 *                     cetree.appendChild(parent, new_items[pos])
 *                     pos += 1
 *                 return             # <<<<<<<<<<<<<<
 *             item = cetree.elementFactory(parent._doc, c_node)
 *         while pos < python.PyList_GET_SIZE(new_items):
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
        goto __pyx_L17;
      }
      __pyx_L17:;

      /* "src/lxml/lxml.objectify.pyx":573
 *                     pos += 1
 *                 return
 *             item = cetree.elementFactory(parent._doc, c_node)             # <<<<<<<<<<<<<<
 *         while pos < python.PyList_GET_SIZE(new_items):
 *             add = item.addnext
 */
      __pyx_t_11 = ((PyObject *)__pyx_v_parent->_doc);
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_3 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_11), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L15:;

    /* "src/lxml/lxml.objectify.pyx":574
 *                 return
 *             item = cetree.elementFactory(parent._doc, c_node)
 *         while pos < python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
 *             add = item.addnext
 *             item = new_items[pos]
 */
    while (1) {
      __pyx_t_13 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
      if (!__pyx_t_13) break;

      /* "src/lxml/lxml.objectify.pyx":575
 *             item = cetree.elementFactory(parent._doc, c_node)
 *         while pos < python.PyList_GET_SIZE(new_items):
 *             add = item.addnext             # <<<<<<<<<<<<<<
 *             item = new_items[pos]
 *             add(item)
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_item, __pyx_n_s__addnext); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_add);
      __pyx_v_add = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "src/lxml/lxml.objectify.pyx":576
 *         while pos < python.PyList_GET_SIZE(new_items):
 *             add = item.addnext
 *             item = new_items[pos]             # <<<<<<<<<<<<<<
 *             add(item)
 *             pos += 1
 */
      __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "src/lxml/lxml.objectify.pyx":577
 *             add = item.addnext
 *             item = new_items[pos]
 *             add(item)             # <<<<<<<<<<<<<<
 *             pos += 1
 * 
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      __pyx_t_11 = PyObject_Call(__pyx_v_add, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "src/lxml/lxml.objectify.pyx":578
 *             item = new_items[pos]
 *             add(item)
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
      __pyx_v_pos = (__pyx_v_pos + 1);
    }
    goto __pyx_L14;
  }
  __pyx_L14:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("lxml.objectify._setSlice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_parent);
  __Pyx_XDECREF(__pyx_v_new_items);
  __Pyx_XDECREF(__pyx_v_del_items);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
  __Pyx_XDECREF(__pyx_v_replace);
  __Pyx_XDECREF(__pyx_v_remove);
  __Pyx_XDECREF(__pyx_v_add);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":588
 *     """
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return textOf(self._c_node)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":589
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":591
 *             return textOf(self._c_node)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return textOf(self._c_node) or u''
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":592
 * 
 *     def __str__(self):
 *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
    __pyx_t_3 = __pyx_kp_u_4;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.ObjectifiedDataElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":594
 *         return textOf(self._c_node) or u''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return textOf(self._c_node) or u''
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":595
 * 
 *     def __repr__(self):
 *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     def _setText(self, s):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
    __pyx_t_3 = __pyx_kp_u_4;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.ObjectifiedDataElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
static char __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement_4_setText[] = "For use in subclasses only. Don't use unless you know what you are\n        doing.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setText (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self), ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":597
 *         return textOf(self._c_node) or u''
 * 
 *     def _setText(self, s):             # <<<<<<<<<<<<<<
 *         u"""For use in subclasses only. Don't use unless you know what you are
 *         doing.
 */

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setText", 0);

  /* "src/lxml/lxml.objectify.pyx":601
 *         doing.
 *         """
 *         cetree.setNodeText(self._c_node, s)             # <<<<<<<<<<<<<<
 * 
 * cdef class NumberElement(ObjectifiedDataElement):
 */
  __pyx_t_1 = setNodeText(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node, __pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement._setText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
static char __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser[] = "Set the function that parses the Python value from a string.\n\n        Do not use this unless you know what you are doing.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setValueParser (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self), ((PyObject *)__pyx_v_function));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":605
 * cdef class NumberElement(ObjectifiedDataElement):
 *     cdef object _parse_value
 *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
 *         u"""Set the function that parses the Python value from a string.
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_function) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setValueParser", 0);

  /* "src/lxml/lxml.objectify.pyx":610
 *         Do not use this unless you know what you are doing.
 *         """
 *         self._parse_value = function             # <<<<<<<<<<<<<<
 * 
 *     property pyval:
 */
  __Pyx_INCREF(__pyx_v_function);
  __Pyx_GIVEREF(__pyx_v_function);
  __Pyx_GOTREF(__pyx_v_self->_parse_value);
  __Pyx_DECREF(__pyx_v_self->_parse_value);
  __pyx_v_self->_parse_value = __pyx_v_function;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":613
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _parseNumber(self)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":614
 *     property pyval:
 *         def __get__(self):
 *             return _parseNumber(self)             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_3__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_3__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_2__int__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":616
 *             return _parseNumber(self)
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(_parseNumber(self))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":617
 * 
 *     def __int__(self):
 *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __long__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.NumberElement.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5__long__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5__long__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_4__long__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* "src/lxml/lxml.objectify.pyx":619
 *         return int(_parseNumber(self))
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return long(_parseNumber(self))
 * 
 */

#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_4__long__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__long__", 0);

  /* "src/lxml/lxml.objectify.pyx":620
 * 
 *     def __long__(self):
 *         return long(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyLong_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.NumberElement.__long__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_7__float__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_7__float__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_6__float__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":622
 *         return long(_parseNumber(self))
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return float(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_6__float__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__float__", 0);

  /* "src/lxml/lxml.objectify.pyx":623
 * 
 *     def __float__(self):
 *         return float(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":625
 *         return float(_parseNumber(self))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(_parseNumber(self))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":626
 * 
 *     def __complex__(self):
 *         return complex(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyComplex_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.NumberElement.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_11__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_11__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_10__str__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":628
 *         return complex(_parseNumber(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return unicode(_parseNumber(self))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":629
 * 
 *     def __str__(self):
 *         return unicode(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.NumberElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_13__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_13__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":631
 *         return unicode(_parseNumber(self))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(_parseNumber(self))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":632
 * 
 *     def __repr__(self):
 *         return repr(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __oct__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.NumberElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_15__oct__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_15__oct__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__oct__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* "src/lxml/lxml.objectify.pyx":634
 *         return repr(_parseNumber(self))
 * 
 *     def __oct__(self):             # <<<<<<<<<<<<<<
 *         return oct(_parseNumber(self))
 * 
 */

#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__oct__", 0);

  /* "src/lxml/lxml.objectify.pyx":635
 * 
 *     def __oct__(self):
 *         return oct(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __hex__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_builtin_oct, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.NumberElement.__oct__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* Python wrapper */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_17__hex__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_17__hex__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hex__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* "src/lxml/lxml.objectify.pyx":637
 *         return oct(_parseNumber(self))
 * 
 *     def __hex__(self):             # <<<<<<<<<<<<<<
 *         return hex(_parseNumber(self))
 * 
 */

#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hex__", 0);

  /* "src/lxml/lxml.objectify.pyx":638
 * 
 *     def __hex__(self):
 *         return hex(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_builtin_hex, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.NumberElement.__hex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_18__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":640
 *         return hex(_parseNumber(self))
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         return _richcmpPyvals(self, other, op)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_18__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "src/lxml/lxml.objectify.pyx":641
 * 
 *     def __richcmp__(self, other, int op):
 *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static Py_hash_t __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":643
 *         return _richcmpPyvals(self, other, op)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(_parseNumber(self))
 * 
 */

static Py_hash_t __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "src/lxml/lxml.objectify.pyx":644
 * 
 *     def __hash__(self):
 *         return hash(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_23__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_23__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_22__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":646
 *         return hash(_parseNumber(self))
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) + _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_22__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "src/lxml/lxml.objectify.pyx":647
 * 
 *     def __add__(self, other):
 *         return _numericValueOf(self) + _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_25__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_25__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":649
 *         return _numericValueOf(self) + _numericValueOf(other)
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) - _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "src/lxml/lxml.objectify.pyx":650
 * 
 *     def __sub__(self, other):
 *         return _numericValueOf(self) - _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_27__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_27__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":652
 *         return _numericValueOf(self) - _numericValueOf(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) * _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "src/lxml/lxml.objectify.pyx":653
 * 
 *     def __mul__(self, other):
 *         return _numericValueOf(self) * _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __div__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_29__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_29__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_28__div__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* "src/lxml/lxml.objectify.pyx":655
 *         return _numericValueOf(self) * _numericValueOf(other)
 * 
 *     def __div__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 */

#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_28__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__div__", 0);

  /* "src/lxml/lxml.objectify.pyx":656
 * 
 *     def __div__(self, other):
 *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":658
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);

  /* "src/lxml/lxml.objectify.pyx":659
 * 
 *     def __truediv__(self, other):
 *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __mod__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_33__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_33__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":661
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 *     def __mod__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) % _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mod__", 0);

  /* "src/lxml/lxml.objectify.pyx":662
 * 
 *     def __mod__(self, other):
 *         return _numericValueOf(self) % _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __pow__(self, other, modulo):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":664
 *         return _numericValueOf(self) % _numericValueOf(other)
 * 
 *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<<
 *         if modulo is None:
 *             return _numericValueOf(self) ** _numericValueOf(other)
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pow__", 0);

  /* "src/lxml/lxml.objectify.pyx":665
 * 
 *     def __pow__(self, other, modulo):
 *         if modulo is None:             # <<<<<<<<<<<<<<
 *             return _numericValueOf(self) ** _numericValueOf(other)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_modulo == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":666
 *     def __pow__(self, other, modulo):
 *         if modulo is None:
 *             return _numericValueOf(self) ** _numericValueOf(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Power(__pyx_t_2, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":668
 *             return _numericValueOf(self) ** _numericValueOf(other)
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<<
 * 
 *     def __neg__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Power(__pyx_t_4, __pyx_t_3, __pyx_v_modulo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __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_AddTraceback("lxml.objectify.NumberElement.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_37__neg__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_37__neg__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":670
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<<
 *         return - _numericValueOf(self)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":671
 * 
 *     def __neg__(self):
 *         return - _numericValueOf(self)             # <<<<<<<<<<<<<<
 * 
 *     def __pos__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.NumberElement.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_39__pos__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_39__pos__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":673
 *         return - _numericValueOf(self)
 * 
 *     def __pos__(self):             # <<<<<<<<<<<<<<
 *         return + _numericValueOf(self)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":674
 * 
 *     def __pos__(self):
 *         return + _numericValueOf(self)             # <<<<<<<<<<<<<<
 * 
 *     def __abs__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Positive(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.NumberElement.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_41__abs__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_41__abs__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":676
 *         return + _numericValueOf(self)
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<<
 *         return abs( _numericValueOf(self) )
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":677
 * 
 *     def __abs__(self):
 *         return abs( _numericValueOf(self) )             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.NumberElement.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":679
 *         return abs( _numericValueOf(self) )
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) != 0
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":680
 * 
 *     def __nonzero__(self):
 *         return _numericValueOf(self) != 0             # <<<<<<<<<<<<<<
 * 
 *     def __invert__(self):
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_45__invert__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_45__invert__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":682
 *         return _numericValueOf(self) != 0
 * 
 *     def __invert__(self):             # <<<<<<<<<<<<<<
 *         return ~ _numericValueOf(self)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":683
 * 
 *     def __invert__(self):
 *         return ~ _numericValueOf(self)             # <<<<<<<<<<<<<<
 * 
 *     def __lshift__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.NumberElement.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__lshift__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":685
 *         return ~ _numericValueOf(self)
 * 
 *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) << _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__lshift__", 0);

  /* "src/lxml/lxml.objectify.pyx":686
 * 
 *     def __lshift__(self, other):
 *         return _numericValueOf(self) << _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __rshift__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Lshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__lshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rshift__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":688
 *         return _numericValueOf(self) << _numericValueOf(other)
 * 
 *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) >> _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rshift__", 0);

  /* "src/lxml/lxml.objectify.pyx":689
 * 
 *     def __rshift__(self, other):
 *         return _numericValueOf(self) >> _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __and__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Rshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__rshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_51__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_51__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_50__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":691
 *         return _numericValueOf(self) >> _numericValueOf(other)
 * 
 *     def __and__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) & _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_50__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__and__", 0);

  /* "src/lxml/lxml.objectify.pyx":692
 * 
 *     def __and__(self, other):
 *         return _numericValueOf(self) & _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __or__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_53__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_53__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_52__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":694
 *         return _numericValueOf(self) & _numericValueOf(other)
 * 
 *     def __or__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) | _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_52__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__or__", 0);

  /* "src/lxml/lxml.objectify.pyx":695
 * 
 *     def __or__(self, other):
 *         return _numericValueOf(self) | _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 *     def __xor__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Or(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_55__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_55__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":697
 *         return _numericValueOf(self) | _numericValueOf(other)
 * 
 *     def __xor__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__xor__", 0);

  /* "src/lxml/lxml.objectify.pyx":698
 * 
 *     def __xor__(self, other):
 *         return _numericValueOf(self) ^ _numericValueOf(other)             # <<<<<<<<<<<<<<
 * 
 * cdef class IntElement(NumberElement):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Xor(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_10IntElement__init(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":701
 * 
 * cdef class IntElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = int
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "src/lxml/lxml.objectify.pyx":702
 * cdef class IntElement(NumberElement):
 *     def _init(self):
 *         self._parse_value = int             # <<<<<<<<<<<<<<
 * 
 * cdef class LongElement(NumberElement):
 */
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
  __pyx_v_self->__pyx_base._parse_value = ((PyObject *)((PyObject*)(&PyInt_Type)));

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11LongElement__init(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":705
 * 
 * cdef class LongElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = long
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "src/lxml/lxml.objectify.pyx":706
 * cdef class LongElement(NumberElement):
 *     def _init(self):
 *         self._parse_value = long             # <<<<<<<<<<<<<<
 * 
 * cdef class FloatElement(NumberElement):
 */
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyLong_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyLong_Type))));
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
  __pyx_v_self->__pyx_base._parse_value = ((PyObject *)((PyObject*)(&PyLong_Type)));

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_12FloatElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_12FloatElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_12FloatElement__init(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":709
 * 
 * cdef class FloatElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = float
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj_4lxml_9objectify_FloatElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "src/lxml/lxml.objectify.pyx":710
 * cdef class FloatElement(NumberElement):
 *     def _init(self):
 *         self._parse_value = float             # <<<<<<<<<<<<<<
 * 
 * cdef class StringElement(ObjectifiedDataElement):
 */
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
  __pyx_v_self->__pyx_base._parse_value = ((PyObject *)((PyObject*)(&PyFloat_Type)));

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":720
 *     """
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return textOf(self._c_node) or u''
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":721
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
    __pyx_t_3 = __pyx_kp_u_4;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.StringElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement___repr__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":723
 *             return textOf(self._c_node) or u''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(textOf(self._c_node) or u'')
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":724
 * 
 *     def __repr__(self):
 *         return repr(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
 * 
 *     def strlen(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
    __pyx_t_3 = __pyx_kp_u_4;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_1 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.StringElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_3strlen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_3strlen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strlen (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_2strlen(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":726
 *         return repr(textOf(self._c_node) or u'')
 * 
 *     def strlen(self):             # <<<<<<<<<<<<<<
 *         text = textOf(self._c_node)
 *         if text is None:
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_2strlen(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
  PyObject *__pyx_v_text = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strlen", 0);

  /* "src/lxml/lxml.objectify.pyx":727
 * 
 *     def strlen(self):
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
 *         if text is None:
 *             return 0
 */
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":728
 *     def strlen(self):
 *         text = textOf(self._c_node)
 *         if text is None:             # <<<<<<<<<<<<<<
 *             return 0
 *         else:
 */
  __pyx_t_2 = (__pyx_v_text == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":729
 *         text = textOf(self._c_node)
 *         if text is None:
 *             return 0             # <<<<<<<<<<<<<<
 *         else:
 *             return len(text)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":731
 *             return 0
 *         else:
 *             return len(text)             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.StringElement.strlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":733
 *             return len(text)
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         text = textOf(self._c_node)
 *         if text is None:
 */

static int __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
  PyObject *__pyx_v_text = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__nonzero__", 0);

  /* "src/lxml/lxml.objectify.pyx":734
 * 
 *     def __nonzero__(self):
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
 *         if text is None:
 *             return False
 */
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":735
 *     def __nonzero__(self):
 *         text = textOf(self._c_node)
 *         if text is None:             # <<<<<<<<<<<<<<
 *             return False
 *         return len(text) > 0
 */
  __pyx_t_2 = (__pyx_v_text == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":736
 *         text = textOf(self._c_node)
 *         if text is None:
 *             return False             # <<<<<<<<<<<<<<
 *         return len(text) > 0
 * 
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":737
 *         if text is None:
 *             return False
 *         return len(text) > 0             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = (__pyx_t_3 > 0);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.StringElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_6__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":739
 *         return len(text) > 0
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         return _richcmpPyvals(self, other, op)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_6__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "src/lxml/lxml.objectify.pyx":740
 * 
 *     def __richcmp__(self, other, int op):
 *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.StringElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static Py_hash_t __pyx_pw_4lxml_9objectify_13StringElement_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_4lxml_9objectify_13StringElement_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":742
 *         return _richcmpPyvals(self, other, op)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(textOf(self._c_node) or u'')
 * 
 */

static Py_hash_t __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "src/lxml/lxml.objectify.pyx":743
 * 
 *     def __hash__(self):
 *         return hash(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
    __pyx_t_3 = __pyx_kp_u_4;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_4 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.StringElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_10__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":745
 *         return hash(textOf(self._c_node) or u'')
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_text = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "src/lxml/lxml.objectify.pyx":746
 * 
 *     def __add__(self, other):
 *         text  = _strValueOf(self)             # <<<<<<<<<<<<<<
 *         other = _strValueOf(other)
 *         if text is None:
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":747
 *     def __add__(self, other):
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)             # <<<<<<<<<<<<<<
 *         if text is None:
 *             return other
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_other);
  __pyx_v_other = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":748
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)
 *         if text is None:             # <<<<<<<<<<<<<<
 *             return other
 *         if other is None:
 */
  __pyx_t_2 = (__pyx_v_text == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":749
 *         other = _strValueOf(other)
 *         if text is None:
 *             return other             # <<<<<<<<<<<<<<
 *         if other is None:
 *             return text
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_other);
    __pyx_r = __pyx_v_other;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":750
 *         if text is None:
 *             return other
 *         if other is None:             # <<<<<<<<<<<<<<
 *             return text
 *         return text + other
 */
  __pyx_t_2 = (__pyx_v_other == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":751
 *             return other
 *         if other is None:
 *             return text             # <<<<<<<<<<<<<<
 *         return text + other
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_text);
    __pyx_r = __pyx_v_text;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":752
 *         if other is None:
 *             return text
 *         return text + other             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_text, __pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.StringElement.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_13__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_13__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_12__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":754
 *         return text + other
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_12__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "src/lxml/lxml.objectify.pyx":755
 * 
 *     def __mul__(self, other):
 *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":756
 *     def __mul__(self, other):
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)             # <<<<<<<<<<<<<<
 *         elif isinstance(other, StringElement):
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":757
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<<
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 *         else:
 */
  __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":758
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError, u"invalid types for * operator"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_other)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __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;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":760
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 *         else:
 *             raise TypeError, u"invalid types for * operator"             # <<<<<<<<<<<<<<
 * 
 *     def __mod__(self, other):
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_13), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __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_AddTraceback("lxml.objectify.StringElement.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_15__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_15__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_14__mod__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":762
 *             raise TypeError, u"invalid types for * operator"
 * 
 *     def __mod__(self, other):             # <<<<<<<<<<<<<<
 *         return _strValueOf(self) % other
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_14__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mod__", 0);

  /* "src/lxml/lxml.objectify.pyx":763
 * 
 *     def __mod__(self, other):
 *         return _strValueOf(self) % other             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.StringElement.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_17__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_17__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_16__int__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":765
 *         return _strValueOf(self) % other
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(textOf(self._c_node))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":766
 * 
 *     def __int__(self):
 *         return int(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __long__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.StringElement.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_19__long__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_19__long__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_18__long__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* "src/lxml/lxml.objectify.pyx":768
 *         return int(textOf(self._c_node))
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return long(textOf(self._c_node))
 * 
 */

#if PY_MAJOR_VERSION < 3
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_18__long__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__long__", 0);

  /* "src/lxml/lxml.objectify.pyx":769
 * 
 *     def __long__(self):
 *         return long(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyLong_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.StringElement.__long__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_21__float__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_21__float__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_20__float__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":771
 *         return long(textOf(self._c_node))
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return float(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_20__float__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__float__", 0);

  /* "src/lxml/lxml.objectify.pyx":772
 * 
 *     def __float__(self):
 *         return float(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_2 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.StringElement.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_23__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_23__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_22__complex__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":774
 *         return float(textOf(self._c_node))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(textOf(self._c_node))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":775
 * 
 *     def __complex__(self):
 *         return complex(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyComplex_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.StringElement.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_1__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement___str__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":778
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return u"None"
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "src/lxml/lxml.objectify.pyx":779
 * cdef class NoneElement(ObjectifiedDataElement):
 *     def __str__(self):
 *         return u"None"             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__None));
  __pyx_r = ((PyObject *)__pyx_n_u__None);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":781
 *         return u"None"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return u"None"
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":782
 * 
 *     def __repr__(self):
 *         return u"None"             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__None));
  __pyx_r = ((PyObject *)__pyx_n_u__None);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":784
 *         return u"None"
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

static int __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__", 0);

  /* "src/lxml/lxml.objectify.pyx":785
 * 
 *     def __nonzero__(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_6__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":787
 *         return False
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         if other is None or self is None:
 *             return python.PyObject_RichCompare(None, None, op)
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_6__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "src/lxml/lxml.objectify.pyx":788
 * 
 *     def __richcmp__(self, other, int op):
 *         if other is None or self is None:             # <<<<<<<<<<<<<<
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):
 */
  __pyx_t_1 = (__pyx_v_other == Py_None);
  if (!__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_self == Py_None);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":789
 *     def __richcmp__(self, other, int op):
 *         if other is None or self is None:
 *             return python.PyObject_RichCompare(None, None, op)             # <<<<<<<<<<<<<<
 *         if isinstance(self, NoneElement):
 *             return python.PyObject_RichCompare(None, other, op)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = Py_None;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = Py_None;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, __pyx_v_op); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":790
 *         if other is None or self is None:
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<<
 *             return python.PyObject_RichCompare(None, other, op)
 *         else:
 */
  __pyx_t_6 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_6); 
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":791
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):
 *             return python.PyObject_RichCompare(None, other, op)             # <<<<<<<<<<<<<<
 *         else:
 *             return python.PyObject_RichCompare(self, None, op)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = Py_None;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":793
 *             return python.PyObject_RichCompare(None, other, op)
 *         else:
 *             return python.PyObject_RichCompare(self, None, op)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = Py_None;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_self, __pyx_t_5, __pyx_v_op); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static Py_hash_t __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":795
 *             return python.PyObject_RichCompare(self, None, op)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(None)
 * 
 */

static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "src/lxml/lxml.objectify.pyx":796
 * 
 *     def __hash__(self):
 *         return hash(None)             # <<<<<<<<<<<<<<
 * 
 *     property pyval:
 */
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NoneElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":799
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":800
 *     property pyval:
 *         def __get__(self):
 *             return None             # <<<<<<<<<<<<<<
 * 
 * cdef class BoolElement(IntElement):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement__init(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":808
 *     Python's bool type.
 *     """
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = __parseBool
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":809
 *     """
 *     def _init(self):
 *         self._parse_value = __parseBool             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s____parseBool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value);
  __pyx_v_self->__pyx_base.__pyx_base._parse_value = __pyx_t_1;
  __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.BoolElement._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":811
 *         self._parse_value = __parseBool
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return __parseBool(textOf(self._c_node))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":812
 * 
 *     def __nonzero__(self):
 *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.BoolElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":814
 *         return __parseBool(textOf(self._c_node))
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         return _richcmpPyvals(self, other, op)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "src/lxml/lxml.objectify.pyx":815
 * 
 *     def __richcmp__(self, other, int op):
 *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.BoolElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static Py_hash_t __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":817
 *         return _richcmpPyvals(self, other, op)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(__parseBool(textOf(self._c_node)))
 * 
 */

static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_hash_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "src/lxml/lxml.objectify.pyx":818
 * 
 *     def __hash__(self):
 *         return hash(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_Hash(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.BoolElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_9__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_9__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_8__str__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":820
 *         return hash(__parseBool(textOf(self._c_node)))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return unicode(__parseBool(textOf(self._c_node)))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":821
 * 
 *     def __str__(self):
 *         return unicode(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.BoolElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_11__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_11__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":823
 *         return unicode(__parseBool(textOf(self._c_node)))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(__parseBool(textOf(self._c_node)))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":824
 * 
 *     def __repr__(self):
 *         return repr(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
 * 
 *     property pyval:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.BoolElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":827
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return __parseBool(textOf(self._c_node))
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":828
 *     property pyval:
 *         def __get__(self):
 *             return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 * def __checkBool(s):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __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;

  __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("lxml.objectify.BoolElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_3__checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyMethodDef __pyx_mdef_4lxml_9objectify_3__checkBool = {__Pyx_NAMESTR("__checkBool"), (PyCFunction)__pyx_pw_4lxml_9objectify_3__checkBool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_4lxml_9objectify_3__checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__checkBool (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_2__checkBool(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":830
 *             return __parseBool(textOf(self._c_node))
 * 
 * def __checkBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value = -1
 *     if s is not None:
 */

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

  /* "src/lxml/lxml.objectify.pyx":831
 * 
 * def __checkBool(s):
 *     cdef int value = -1             # <<<<<<<<<<<<<<
 *     if s is not None:
 *         value = __parseBoolAsInt(s)
 */
  __pyx_v_value = -1;

  /* "src/lxml/lxml.objectify.pyx":832
 * def __checkBool(s):
 *     cdef int value = -1
 *     if s is not None:             # <<<<<<<<<<<<<<
 *         value = __parseBoolAsInt(s)
 *     if value == -1:
 */
  __pyx_t_1 = (__pyx_v_s != Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":833
 *     cdef int value = -1
 *     if s is not None:
 *         value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
 *     if value == -1:
 *         raise ValueError
 */
    __pyx_v_value = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":834
 *     if s is not None:
 *         value = __parseBoolAsInt(s)
 *     if value == -1:             # <<<<<<<<<<<<<<
 *         raise ValueError
 * 
 */
  __pyx_t_1 = (__pyx_v_value == -1);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":835
 *         value = __parseBoolAsInt(s)
 *     if value == -1:
 *         raise ValueError             # <<<<<<<<<<<<<<
 * 
 * cpdef __parseBool(s):
 */
    __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("lxml.objectify.__checkBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":837
 *         raise ValueError
 * 
 * cpdef __parseBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value
 *     if s is None:
 */

static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_value;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__parseBool", 0);

  /* "src/lxml/lxml.objectify.pyx":839
 * cpdef __parseBool(s):
 *     cdef int value
 *     if s is None:             # <<<<<<<<<<<<<<
 *         return False
 *     value = __parseBoolAsInt(s)
 */
  __pyx_t_1 = (__pyx_v_s == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":840
 *     cdef int value
 *     if s is None:
 *         return False             # <<<<<<<<<<<<<<
 *     value = __parseBoolAsInt(s)
 *     if value == -1:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":841
 *     if s is None:
 *         return False
 *     value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
 *     if value == -1:
 *         raise ValueError, u"Invalid boolean value: '%s'" % s
 */
  __pyx_v_value = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s);

  /* "src/lxml/lxml.objectify.pyx":842
 *         return False
 *     value = __parseBoolAsInt(s)
 *     if value == -1:             # <<<<<<<<<<<<<<
 *         raise ValueError, u"Invalid boolean value: '%s'" % s
 *     return <bint>value
 */
  __pyx_t_1 = (__pyx_v_value == -1);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":843
 *     value = __parseBoolAsInt(s)
 *     if value == -1:
 *         raise ValueError, u"Invalid boolean value: '%s'" % s             # <<<<<<<<<<<<<<
 *     return <bint>value
 * 
 */
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_14), __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), 0, 0);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":844
 *     if value == -1:
 *         raise ValueError, u"Invalid boolean value: '%s'" % s
 *     return <bint>value             # <<<<<<<<<<<<<<
 * 
 * cdef inline int __parseBoolAsInt(text):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_v_value)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.__parseBool", __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_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__parseBool (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_4__parseBool(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":837
 *         raise ValueError
 * 
 * cpdef __parseBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value
 *     if s is None:
 */

static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__parseBool", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify___parseBool(__pyx_v_s, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.__parseBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":846
 *     return <bint>value
 * 
 * cdef inline int __parseBoolAsInt(text):             # <<<<<<<<<<<<<<
 *     if text == u'false':
 *         return 0
 */

static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__pyx_v_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__parseBoolAsInt", 0);

  /* "src/lxml/lxml.objectify.pyx":847
 * 
 * cdef inline int __parseBoolAsInt(text):
 *     if text == u'false':             # <<<<<<<<<<<<<<
 *         return 0
 *     elif text == u'true':
 */
  __pyx_t_1 = __Pyx_PyUnicode_Equals(__pyx_v_text, ((PyObject *)__pyx_n_u__false), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":848
 * cdef inline int __parseBoolAsInt(text):
 *     if text == u'false':
 *         return 0             # <<<<<<<<<<<<<<
 *     elif text == u'true':
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":849
 *     if text == u'false':
 *         return 0
 *     elif text == u'true':             # <<<<<<<<<<<<<<
 *         return 1
 *     elif text == u'0':
 */
  __pyx_t_1 = __Pyx_PyUnicode_Equals(__pyx_v_text, ((PyObject *)__pyx_n_u__true), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":850
 *         return 0
 *     elif text == u'true':
 *         return 1             # <<<<<<<<<<<<<<
 *     elif text == u'0':
 *         return 0
 */
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":851
 *     elif text == u'true':
 *         return 1
 *     elif text == u'0':             # <<<<<<<<<<<<<<
 *         return 0
 *     elif text == u'1':
 */
  __pyx_t_1 = __Pyx_PyUnicode_Equals(__pyx_v_text, ((PyObject *)__pyx_kp_u__0), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":852
 *         return 1
 *     elif text == u'0':
 *         return 0             # <<<<<<<<<<<<<<
 *     elif text == u'1':
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":853
 *     elif text == u'0':
 *         return 0
 *     elif text == u'1':             # <<<<<<<<<<<<<<
 *         return 1
 *     return -1
 */
  __pyx_t_1 = __Pyx_PyUnicode_Equals(__pyx_v_text, ((PyObject *)__pyx_kp_u__1), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":854
 *         return 0
 *     elif text == u'1':
 *         return 1             # <<<<<<<<<<<<<<
 *     return -1
 * 
 */
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":855
 *     elif text == u'1':
 *         return 1
 *     return -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _parseNumber(NumberElement element):
 */
  __pyx_r = -1;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("lxml.objectify.__parseBoolAsInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":857
 *     return -1
 * 
 * cdef inline object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
 *     return element._parse_value(textOf(element._c_node))
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parseNumber", 0);

  /* "src/lxml/lxml.objectify.pyx":858
 * 
 * cdef inline object _parseNumber(NumberElement element):
 *     return element._parse_value(textOf(element._c_node))             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _strValueOf(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(__pyx_v_element->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_v_element->_parse_value, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify._parseNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":860
 *     return element._parse_value(textOf(element._c_node))
 * 
 * cdef inline object _strValueOf(obj):             # <<<<<<<<<<<<<<
 *     if python._isString(obj):
 *         return obj
 */

static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_strValueOf", 0);

  /* "src/lxml/lxml.objectify.pyx":861
 * 
 * cdef inline object _strValueOf(obj):
 *     if python._isString(obj):             # <<<<<<<<<<<<<<
 *         return obj
 *     if isinstance(obj, _Element):
 */
  __pyx_t_1 = _isString(__pyx_v_obj);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":862
 * cdef inline object _strValueOf(obj):
 *     if python._isString(obj):
 *         return obj             # <<<<<<<<<<<<<<
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or u''
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_obj);
    __pyx_r = __pyx_v_obj;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":863
 *     if python._isString(obj):
 *         return obj
 *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
 *         return textOf((<_Element>obj)._c_node) or u''
 *     if obj is None:
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic__Element));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":864
 *         return obj
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or u''             # <<<<<<<<<<<<<<
 *     if obj is None:
 *         return u''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
      __pyx_t_3 = __pyx_kp_u_4;
    } else {
      __pyx_t_3 = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":865
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or u''
 *     if obj is None:             # <<<<<<<<<<<<<<
 *         return u''
 *     return unicode(obj)
 */
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":866
 *         return textOf((<_Element>obj)._c_node) or u''
 *     if obj is None:
 *         return u''             # <<<<<<<<<<<<<<
 *     return unicode(obj)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
    __pyx_r = ((PyObject *)__pyx_kp_u_4);
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":867
 *     if obj is None:
 *         return u''
 *     return unicode(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _numericValueOf(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_obj);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify._strValueOf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":869
 *     return unicode(obj)
 * 
 * cdef inline object _numericValueOf(obj):             # <<<<<<<<<<<<<<
 *     if isinstance(obj, NumberElement):
 *         return _parseNumber(<NumberElement>obj)
 */

static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_numericValueOf", 0);

  /* "src/lxml/lxml.objectify.pyx":870
 * 
 * cdef inline object _numericValueOf(obj):
 *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
 *         return _parseNumber(<NumberElement>obj)
 *     elif hasattr(obj, u'pyval'):
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NumberElement));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":871
 * cdef inline object _numericValueOf(obj):
 *     if isinstance(obj, NumberElement):
 *         return _parseNumber(<NumberElement>obj)             # <<<<<<<<<<<<<<
 *     elif hasattr(obj, u'pyval'):
 *         # not always numeric, but Python will raise the right exception
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":872
 *     if isinstance(obj, NumberElement):
 *         return _parseNumber(<NumberElement>obj)
 *     elif hasattr(obj, u'pyval'):             # <<<<<<<<<<<<<<
 *         # not always numeric, but Python will raise the right exception
 *         return obj.pyval
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_u__pyval);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_HasAttr(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":874
 *     elif hasattr(obj, u'pyval'):
 *         # not always numeric, but Python will raise the right exception
 *         return obj.pyval             # <<<<<<<<<<<<<<
 *     return obj
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__pyval); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":875
 *         # not always numeric, but Python will raise the right exception
 *         return obj.pyval
 *     return obj             # <<<<<<<<<<<<<<
 * 
 * cdef inline _richcmpPyvals(left, right, int op):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify._numericValueOf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":877
 *     return obj
 * 
 * cdef inline _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
 *     left  = getattr(left,  u'pyval', left)
 *     right = getattr(right, u'pyval', right)
 */

static CYTHON_INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, PyObject *__pyx_v_right, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_richcmpPyvals", 0);
  __Pyx_INCREF(__pyx_v_left);
  __Pyx_INCREF(__pyx_v_right);

  /* "src/lxml/lxml.objectify.pyx":878
 * 
 * cdef inline _richcmpPyvals(left, right, int op):
 *     left  = getattr(left,  u'pyval', left)             # <<<<<<<<<<<<<<
 *     right = getattr(right, u'pyval', right)
 *     return python.PyObject_RichCompare(left, right, op)
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_u__pyval);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_left, __pyx_t_1, __pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_left);
  __pyx_v_left = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":879
 * cdef inline _richcmpPyvals(left, right, int op):
 *     left  = getattr(left,  u'pyval', left)
 *     right = getattr(right, u'pyval', right)             # <<<<<<<<<<<<<<
 *     return python.PyObject_RichCompare(left, right, op)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_n_u__pyval);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, __pyx_t_2, __pyx_v_right); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_right);
  __pyx_v_right = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":880
 *     left  = getattr(left,  u'pyval', left)
 *     right = getattr(right, u'pyval', right)
 *     return python.PyObject_RichCompare(left, right, op)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify._richcmpPyvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_left);
  __Pyx_XDECREF(__pyx_v_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_type_check = 0;
  PyObject *__pyx_v_type_class = 0;
  PyObject *__pyx_v_stringify = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__type_check,&__pyx_n_s__type_class,&__pyx_n_s__stringify,0};
    PyObject* values[4] = {0,0,0,0};

    /* "src/lxml/lxml.objectify.pyx":908
 *     cdef object _type
 *     cdef list _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
 *         if isinstance(name, bytes):
 *             name = python.PyUnicode_FromEncodedObject(name, 'ascii', NULL)
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__type_check)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__type_class)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stringify);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_type_check = values[1];
    __pyx_v_type_class = values[2];
    __pyx_v_stringify = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType___init__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), __pyx_v_name, __pyx_v_type_check, __pyx_v_type_class, __pyx_v_stringify);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_type_check, PyObject *__pyx_v_type_class, PyObject *__pyx_v_stringify) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_INCREF(__pyx_v_stringify);

  /* "src/lxml/lxml.objectify.pyx":909
 *     cdef list _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):
 *         if isinstance(name, bytes):             # <<<<<<<<<<<<<<
 *             name = python.PyUnicode_FromEncodedObject(name, 'ascii', NULL)
 *         elif not isinstance(name, unicode):
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)(&PyBytes_Type)));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_name, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":910
 *     def __init__(self, name, type_check, type_class, stringify=None):
 *         if isinstance(name, bytes):
 *             name = python.PyUnicode_FromEncodedObject(name, 'ascii', NULL)             # <<<<<<<<<<<<<<
 *         elif not isinstance(name, unicode):
 *             raise TypeError, u"Type name must be a string"
 */
    __pyx_t_1 = ((PyObject *)PyUnicode_FromEncodedObject(__pyx_v_name, __pyx_k__ascii, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":911
 *         if isinstance(name, bytes):
 *             name = python.PyUnicode_FromEncodedObject(name, 'ascii', NULL)
 *         elif not isinstance(name, unicode):             # <<<<<<<<<<<<<<
 *             raise TypeError, u"Type name must be a string"
 *         if type_check is not None and not callable(type_check):
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_name, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":912
 *             name = python.PyUnicode_FromEncodedObject(name, 'ascii', NULL)
 *         elif not isinstance(name, unicode):
 *             raise TypeError, u"Type name must be a string"             # <<<<<<<<<<<<<<
 *         if type_check is not None and not callable(type_check):
 *             raise TypeError, u"Type check function must be callable (or None)"
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_15), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":913
 *         elif not isinstance(name, unicode):
 *             raise TypeError, u"Type name must be a string"
 *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<<
 *             raise TypeError, u"Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \
 */
  __pyx_t_3 = (__pyx_v_type_check != Py_None);
  if (__pyx_t_3) {
    __pyx_t_2 = (!PyCallable_Check(__pyx_v_type_check));
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {

    /* "src/lxml/lxml.objectify.pyx":914
 *             raise TypeError, u"Type name must be a string"
 *         if type_check is not None and not callable(type_check):
 *             raise TypeError, u"Type check function must be callable (or None)"             # <<<<<<<<<<<<<<
 *         if name != TREE_PYTYPE_NAME and \
 *                not issubclass(type_class, ObjectifiedDataElement):
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_16), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":915
 *         if type_check is not None and not callable(type_check):
 *             raise TypeError, u"Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
 *                not issubclass(type_class, ObjectifiedDataElement):
 *             raise TypeError, \
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "src/lxml/lxml.objectify.pyx":916
 *             raise TypeError, u"Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \
 *                not issubclass(type_class, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *             raise TypeError, \
 *                 u"Data classes must inherit from ObjectifiedDataElement"
 */
    __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = PyObject_IsSubclass(__pyx_v_type_class, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (!__pyx_t_3);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":917
 *         if name != TREE_PYTYPE_NAME and \
 *                not issubclass(type_class, ObjectifiedDataElement):
 *             raise TypeError, \             # <<<<<<<<<<<<<<
 *                 u"Data classes must inherit from ObjectifiedDataElement"
 *         self.name  = name
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_17), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":919
 *             raise TypeError, \
 *                 u"Data classes must inherit from ObjectifiedDataElement"
 *         self.name  = name             # <<<<<<<<<<<<<<
 *         self._type = type_class
 *         self.type_check = type_check
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "src/lxml/lxml.objectify.pyx":920
 *                 u"Data classes must inherit from ObjectifiedDataElement"
 *         self.name  = name
 *         self._type = type_class             # <<<<<<<<<<<<<<
 *         self.type_check = type_check
 *         if stringify is None:
 */
  __Pyx_INCREF(__pyx_v_type_class);
  __Pyx_GIVEREF(__pyx_v_type_class);
  __Pyx_GOTREF(__pyx_v_self->_type);
  __Pyx_DECREF(__pyx_v_self->_type);
  __pyx_v_self->_type = __pyx_v_type_class;

  /* "src/lxml/lxml.objectify.pyx":921
 *         self.name  = name
 *         self._type = type_class
 *         self.type_check = type_check             # <<<<<<<<<<<<<<
 *         if stringify is None:
 *             stringify = unicode
 */
  __Pyx_INCREF(__pyx_v_type_check);
  __Pyx_GIVEREF(__pyx_v_type_check);
  __Pyx_GOTREF(__pyx_v_self->type_check);
  __Pyx_DECREF(__pyx_v_self->type_check);
  __pyx_v_self->type_check = __pyx_v_type_check;

  /* "src/lxml/lxml.objectify.pyx":922
 *         self._type = type_class
 *         self.type_check = type_check
 *         if stringify is None:             # <<<<<<<<<<<<<<
 *             stringify = unicode
 *         self.stringify = stringify
 */
  __pyx_t_3 = (__pyx_v_stringify == Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":923
 *         self.type_check = type_check
 *         if stringify is None:
 *             stringify = unicode             # <<<<<<<<<<<<<<
 *         self.stringify = stringify
 *         self._schema_types = []
 */
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyUnicode_Type))));
    __Pyx_DECREF(__pyx_v_stringify);
    __pyx_v_stringify = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "src/lxml/lxml.objectify.pyx":924
 *         if stringify is None:
 *             stringify = unicode
 *         self.stringify = stringify             # <<<<<<<<<<<<<<
 *         self._schema_types = []
 * 
 */
  __Pyx_INCREF(__pyx_v_stringify);
  __Pyx_GIVEREF(__pyx_v_stringify);
  __Pyx_GOTREF(__pyx_v_self->stringify);
  __Pyx_DECREF(__pyx_v_self->stringify);
  __pyx_v_self->stringify = __pyx_v_stringify;

  /* "src/lxml/lxml.objectify.pyx":925
 *             stringify = unicode
 *         self.stringify = stringify
 *         self._schema_types = []             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->_schema_types);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_schema_types));
  __pyx_v_self->_schema_types = __pyx_t_1;
  __pyx_t_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_stringify);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_2__repr__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":927
 *         self._schema_types = []
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":928
 * 
 *     def __repr__(self):
 *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)             # <<<<<<<<<<<<<<
 * 
 *     def register(self, before=None, after=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->_type, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.PyType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_6PyType_4register[] = "register(self, before=None, after=None)\n\n        Register the type.\n\n        The additional keyword arguments 'before' and 'after' accept a\n        sequence of type names that must appear before/after the new type in\n        the type list.  If any of them is not currently known, it is simply\n        ignored.  Raises ValueError if the dependencies cannot be fulfilled.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_before = 0;
  PyObject *__pyx_v_after = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__before,&__pyx_n_s__after,0};
    PyObject* values[2] = {0,0};

    /* "src/lxml/lxml.objectify.pyx":930
 *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
 *         u"""register(self, before=None, after=None)
 * 
 */
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__before);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__after);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_before = values[0];
    __pyx_v_after = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_4register(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), __pyx_v_before, __pyx_v_after);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_before, PyObject *__pyx_v_after) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_entry = NULL;
  PyObject *__pyx_v_first_pos = NULL;
  PyObject *__pyx_v_last_pos = NULL;
  PyObject *__pyx_v_i = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_check = NULL;
  PyObject *__pyx_v_pytype = NULL;
  PyObject *__pyx_v_xs_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("register", 0);
  __Pyx_INCREF(__pyx_v_before);
  __Pyx_INCREF(__pyx_v_after);

  /* "src/lxml/lxml.objectify.pyx":940
 *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
 *         """
 *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
 *             raise ValueError, u"Cannot register tree type"
 *         if self.type_check is not None:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":941
 *         """
 *         if self.name == TREE_PYTYPE_NAME:
 *             raise ValueError, u"Cannot register tree type"             # <<<<<<<<<<<<<<
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:
 */
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_19), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":942
 *         if self.name == TREE_PYTYPE_NAME:
 *             raise ValueError, u"Cannot register tree type"
 *         if self.type_check is not None:             # <<<<<<<<<<<<<<
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:
 */
  __pyx_t_2 = (__pyx_v_self->type_check != Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":943
 *             raise ValueError, u"Cannot register tree type"
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)
 */
    if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
      __Pyx_XDECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "src/lxml/lxml.objectify.pyx":944
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<<
 *                     _TYPE_CHECKS.remove(item)
 *                     break
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_item, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = (__pyx_t_4 == __pyx_v_self->type_check);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":945
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)             # <<<<<<<<<<<<<<
 *                     break
 *             entry = (self.type_check, self)
 */
        __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_item);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
        __Pyx_GIVEREF(__pyx_v_item);
        __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "src/lxml/lxml.objectify.pyx":946
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)
 *                     break             # <<<<<<<<<<<<<<
 *             entry = (self.type_check, self)
 *             first_pos = 0
 */
        goto __pyx_L6_break;
        goto __pyx_L7;
      }
      __pyx_L7:;
    }
    __pyx_L6_break:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":947
 *                     _TYPE_CHECKS.remove(item)
 *                     break
 *             entry = (self.type_check, self)             # <<<<<<<<<<<<<<
 *             first_pos = 0
 *             last_pos = -1
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->type_check);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->type_check);
    __Pyx_GIVEREF(__pyx_v_self->type_check);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_v_entry = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":948
 *                     break
 *             entry = (self.type_check, self)
 *             first_pos = 0             # <<<<<<<<<<<<<<
 *             last_pos = -1
 *             if before or after:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_first_pos = __pyx_int_0;

    /* "src/lxml/lxml.objectify.pyx":949
 *             entry = (self.type_check, self)
 *             first_pos = 0
 *             last_pos = -1             # <<<<<<<<<<<<<<
 *             if before or after:
 *                 if before is None:
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_v_last_pos = __pyx_int_neg_1;

    /* "src/lxml/lxml.objectify.pyx":950
 *             first_pos = 0
 *             last_pos = -1
 *             if before or after:             # <<<<<<<<<<<<<<
 *                 if before is None:
 *                     before = ()
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_2) {
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_2;
    }
    if (__pyx_t_8) {

      /* "src/lxml/lxml.objectify.pyx":951
 *             last_pos = -1
 *             if before or after:
 *                 if before is None:             # <<<<<<<<<<<<<<
 *                     before = ()
 *                 elif after is None:
 */
      __pyx_t_8 = (__pyx_v_before == Py_None);
      if (__pyx_t_8) {

        /* "src/lxml/lxml.objectify.pyx":952
 *             if before or after:
 *                 if before is None:
 *                     before = ()             # <<<<<<<<<<<<<<
 *                 elif after is None:
 *                     after = ()
 */
        __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
        __Pyx_DECREF(__pyx_v_before);
        __pyx_v_before = ((PyObject *)__pyx_empty_tuple);
        goto __pyx_L9;
      }

      /* "src/lxml/lxml.objectify.pyx":953
 *                 if before is None:
 *                     before = ()
 *                 elif after is None:             # <<<<<<<<<<<<<<
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 */
      __pyx_t_8 = (__pyx_v_after == Py_None);
      if (__pyx_t_8) {

        /* "src/lxml/lxml.objectify.pyx":954
 *                     before = ()
 *                 elif after is None:
 *                     after = ()             # <<<<<<<<<<<<<<
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:
 */
        __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
        __Pyx_DECREF(__pyx_v_after);
        __pyx_v_after = ((PyObject *)__pyx_empty_tuple);
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "src/lxml/lxml.objectify.pyx":955
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<<
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
      __pyx_t_6 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        #endif
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_9);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        {
          Py_ssize_t index = -1;
          __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L13_unpacking_done;
          __pyx_L12_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L13_unpacking_done:;
        }
        __Pyx_XDECREF(__pyx_v_check);
        __pyx_v_check = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_v_pytype);
        __pyx_v_pytype = __pyx_t_9;
        __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF(__pyx_v_i);
        __pyx_v_i = __pyx_t_1;
        __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "src/lxml/lxml.objectify.pyx":956
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<<
 *                         last_pos = i
 *                     if pytype.name in after:
 */
        __pyx_t_5 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_8) {
          __pyx_t_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = ((PySequence_Contains(__pyx_v_before, __pyx_t_5))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_7 = __pyx_t_2;
        } else {
          __pyx_t_7 = __pyx_t_8;
        }
        if (__pyx_t_7) {

          /* "src/lxml/lxml.objectify.pyx":957
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i             # <<<<<<<<<<<<<<
 *                     if pytype.name in after:
 *                         first_pos = i+1
 */
          __Pyx_INCREF(__pyx_v_i);
          __Pyx_DECREF(__pyx_v_last_pos);
          __pyx_v_last_pos = __pyx_v_i;
          goto __pyx_L14;
        }
        __pyx_L14:;

        /* "src/lxml/lxml.objectify.pyx":958
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 *                     if pytype.name in after:             # <<<<<<<<<<<<<<
 *                         first_pos = i+1
 *             if last_pos == -1:
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = ((PySequence_Contains(__pyx_v_after, __pyx_t_5))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_7) {

          /* "src/lxml/lxml.objectify.pyx":959
 *                         last_pos = i
 *                     if pytype.name in after:
 *                         first_pos = i+1             # <<<<<<<<<<<<<<
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)
 */
          __pyx_t_5 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_v_first_pos);
          __pyx_v_first_pos = __pyx_t_5;
          __pyx_t_5 = 0;
          goto __pyx_L15;
        }
        __pyx_L15:;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "src/lxml/lxml.objectify.pyx":960
 *                     if pytype.name in after:
 *                         first_pos = i+1
 *             if last_pos == -1:             # <<<<<<<<<<<<<<
 *                 _TYPE_CHECKS.append(entry)
 *             elif first_pos > last_pos:
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "src/lxml/lxml.objectify.pyx":961
 *                         first_pos = i+1
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<<
 *             elif first_pos > last_pos:
 *                 raise ValueError, u"inconsistent before/after dependencies"
 */
      if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_12 = PyList_Append(__pyx_v_4lxml_9objectify__TYPE_CHECKS, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L16;
    }

    /* "src/lxml/lxml.objectify.pyx":962
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)
 *             elif first_pos > last_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError, u"inconsistent before/after dependencies"
 *             else:
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "src/lxml/lxml.objectify.pyx":963
 *                 _TYPE_CHECKS.append(entry)
 *             elif first_pos > last_pos:
 *                 raise ValueError, u"inconsistent before/after dependencies"             # <<<<<<<<<<<<<<
 *             else:
 *                 _TYPE_CHECKS.insert(last_pos, entry)
 */
      __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_20), 0, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L16;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":965
 *                 raise ValueError, u"inconsistent before/after dependencies"
 *             else:
 *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<<
 * 
 *         _PYTYPE_DICT[self.name] = self
 */
      if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "insert");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_last_pos); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_12 = PyList_Insert(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_3, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L16:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":967
 *                 _TYPE_CHECKS.insert(last_pos, entry)
 * 
 *         _PYTYPE_DICT[self.name] = self             # <<<<<<<<<<<<<<
 *         for xs_type in self._schema_types:
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_self->name, ((PyObject *)__pyx_v_self)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":968
 * 
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_self->_schema_types) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_schema_types); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++;
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    #endif
    __Pyx_XDECREF(__pyx_v_xs_type);
    __pyx_v_xs_type = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":969
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:
 *             _SCHEMA_TYPE_DICT[xs_type] = self             # <<<<<<<<<<<<<<
 * 
 *     def unregister(self):
 */
    if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type, ((PyObject *)__pyx_v_self)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_entry);
  __Pyx_XDECREF(__pyx_v_first_pos);
  __Pyx_XDECREF(__pyx_v_last_pos);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_check);
  __Pyx_XDECREF(__pyx_v_pytype);
  __Pyx_XDECREF(__pyx_v_xs_type);
  __Pyx_XDECREF(__pyx_v_before);
  __Pyx_XDECREF(__pyx_v_after);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_7unregister(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_6PyType_6unregister[] = "unregister(self)";
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_7unregister(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unregister (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_6unregister(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":971
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 * 
 *     def unregister(self):             # <<<<<<<<<<<<<<
 *         u"unregister(self)"
 *         if _PYTYPE_DICT.get(self.name) is self:
 */

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_xs_type = NULL;
  PyObject *__pyx_v_pytype = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unregister", 0);

  /* "src/lxml/lxml.objectify.pyx":973
 *     def unregister(self):
 *         u"unregister(self)"
 *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<<
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_self->name, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == ((PyObject *)__pyx_v_self));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":974
 *         u"unregister(self)"
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]             # <<<<<<<<<<<<<<
 *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
 *             if pytype is self:
 */
    if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_self->name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":975
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):             # <<<<<<<<<<<<<<
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyDict_Items(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #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_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __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_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_xs_type);
    __pyx_v_xs_type = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":976
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
 *             if pytype is self:             # <<<<<<<<<<<<<<
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:
 */
    __pyx_t_2 = (__pyx_v_pytype == ((PyObject *)__pyx_v_self));
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":977
 *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]             # <<<<<<<<<<<<<<
 *         if self.type_check is None:
 *             return
 */
      if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      if (unlikely(!__pyx_v_xs_type)) { __Pyx_RaiseUnboundLocalError("xs_type"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      if (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":978
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:             # <<<<<<<<<<<<<<
 *             return
 *         try:
 */
  __pyx_t_2 = (__pyx_v_self->type_check == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":979
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:
 *             return             # <<<<<<<<<<<<<<
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "src/lxml/lxml.objectify.pyx":980
 *         if self.type_check is None:
 *             return
 *         try:             # <<<<<<<<<<<<<<
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 *         except ValueError:
 */
  {
    __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:*/ {

      /* "src/lxml/lxml.objectify.pyx":981
 *             return
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
 */
      __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_n_s__remove); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_self->type_check);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->type_check);
      __Pyx_GIVEREF(__pyx_v_self->type_check);
      __Pyx_INCREF(((PyObject *)__pyx_v_self));
      PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __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_L17_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":982
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_12) {
      PyErr_Restore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    __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_L11_exception_handled:;
    __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_L17_try_end:;
  }

  __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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify.PyType.unregister", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_xs_type);
  __Pyx_XDECREF(__pyx_v_pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":990
 *         Note that this must be set before registering the type!
 *         """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._schema_types
 *         def __set__(self, types):
 */

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/lxml/lxml.objectify.pyx":991
 *         """
 *         def __get__(self):
 *             return self._schema_types             # <<<<<<<<<<<<<<
 *         def __set__(self, types):
 *             self._schema_types = list(map(unicode, types))
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_schema_types));
  __pyx_r = ((PyObject *)__pyx_v_self->_schema_types);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
static int __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), ((PyObject *)__pyx_v_types));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":992
 *         def __get__(self):
 *             return self._schema_types
 *         def __set__(self, types):             # <<<<<<<<<<<<<<
 *             self._schema_types = list(map(unicode, types))
 * 
 */

static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_types) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/lxml/lxml.objectify.pyx":993
 *             return self._schema_types
 *         def __set__(self, types):
 *             self._schema_types = list(map(unicode, types))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyUnicode_Type))));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyUnicode_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyUnicode_Type))));
  __Pyx_INCREF(__pyx_v_types);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_types);
  __Pyx_GIVEREF(__pyx_v_types);
  __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_schema_types);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_schema_types));
  __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.PyType.xmlSchemaTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_4name___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":903
 *     matching type will be used.
 *     """
 *     cdef readonly object name             # <<<<<<<<<<<<<<
 *     cdef readonly object type_check
 *     cdef readonly object stringify
 */

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":904
 *     """
 *     cdef readonly object name
 *     cdef readonly object type_check             # <<<<<<<<<<<<<<
 *     cdef readonly object stringify
 *     cdef object _type
 */

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":905
 *     cdef readonly object name
 *     cdef readonly object type_check
 *     cdef readonly object stringify             # <<<<<<<<<<<<<<
 *     cdef object _type
 *     cdef list _schema_types
 */

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1005
 * _TYPE_CHECKS = []
 * 
 * cdef _lower_bool(b):             # <<<<<<<<<<<<<<
 *     if b:
 *         return u"true"
 */

static PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_lower_bool", 0);

  /* "src/lxml/lxml.objectify.pyx":1006
 * 
 * cdef _lower_bool(b):
 *     if b:             # <<<<<<<<<<<<<<
 *         return u"true"
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1007
 * cdef _lower_bool(b):
 *     if b:
 *         return u"true"             # <<<<<<<<<<<<<<
 *     else:
 *         return u"false"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_u__true));
    __pyx_r = ((PyObject *)__pyx_n_u__true);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1009
 *         return u"true"
 *     else:
 *         return u"false"             # <<<<<<<<<<<<<<
 * 
 * def __lower_bool(b):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_u__false));
    __pyx_r = ((PyObject *)__pyx_n_u__false);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("lxml.objectify._lower_bool", __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_4lxml_9objectify_7__lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
static PyMethodDef __pyx_mdef_4lxml_9objectify_7__lower_bool = {__Pyx_NAMESTR("__lower_bool"), (PyCFunction)__pyx_pw_4lxml_9objectify_7__lower_bool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_4lxml_9objectify_7__lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__lower_bool (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_6__lower_bool(__pyx_self, ((PyObject *)__pyx_v_b));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1011
 *         return u"false"
 * 
 * def __lower_bool(b):             # <<<<<<<<<<<<<<
 *     return _lower_bool(b)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":1012
 * 
 * def __lower_bool(b):
 *     return _lower_bool(b)             # <<<<<<<<<<<<<<
 * 
 * cdef _pytypename(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__lower_bool(__pyx_v_b); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.__lower_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1014
 *     return _lower_bool(b)
 * 
 * cdef _pytypename(obj):             # <<<<<<<<<<<<<<
 *     if python._isString(obj):
 *         return u"str"
 */

static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pytypename", 0);

  /* "src/lxml/lxml.objectify.pyx":1015
 * 
 * cdef _pytypename(obj):
 *     if python._isString(obj):             # <<<<<<<<<<<<<<
 *         return u"str"
 *     else:
 */
  __pyx_t_1 = _isString(__pyx_v_obj);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1016
 * cdef _pytypename(obj):
 *     if python._isString(obj):
 *         return u"str"             # <<<<<<<<<<<<<<
 *     else:
 *         return _typename(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_u__str));
    __pyx_r = ((PyObject *)__pyx_n_u__str);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1018
 *         return u"str"
 *     else:
 *         return _typename(obj)             # <<<<<<<<<<<<<<
 * 
 * def pytypename(obj):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify._pytypename", __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_4lxml_9objectify_9pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_4lxml_9objectify_8pytypename[] = "pytypename(obj)\n\n    Find the name of the corresponding PyType for a Python object.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_9pytypename = {__Pyx_NAMESTR("pytypename"), (PyCFunction)__pyx_pw_4lxml_9objectify_9pytypename, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_8pytypename)};
static PyObject *__pyx_pw_4lxml_9objectify_9pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pytypename (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_8pytypename(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1020
 *         return _typename(obj)
 * 
 * def pytypename(obj):             # <<<<<<<<<<<<<<
 *     u"""pytypename(obj)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":1025
 *     Find the name of the corresponding PyType for a Python object.
 *     """
 *     return _pytypename(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef _registerPyTypes():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.pytypename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1027
 *     return _pytypename(obj)
 * 
 * cdef _registerPyTypes():             # <<<<<<<<<<<<<<
 *     pytype = PyType(u'int', int, IntElement)
 *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
 */

static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) {
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_registerPyTypes", 0);

  /* "src/lxml/lxml.objectify.pyx":1028
 * 
 * cdef _registerPyTypes():
 *     pytype = PyType(u'int', int, IntElement)             # <<<<<<<<<<<<<<
 *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
 *                              u"unsignedByte", u"nonPositiveInteger",
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__int));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u__int));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__int));
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1029
 * cdef _registerPyTypes():
 *     pytype = PyType(u'int', int, IntElement)
 *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
 *                              u"unsignedByte", u"nonPositiveInteger",
 *                              u"negativeInteger", u"long", u"nonNegativeInteger",
 */
  if (PyObject_SetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__xmlSchemaTypes, ((PyObject *)__pyx_k_tuple_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1033
 *                              u"negativeInteger", u"long", u"nonNegativeInteger",
 *                              u"unsignedLong", u"unsignedInt", u"positiveInteger",)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     # 'long' type just for backwards compatibility
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __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;

  /* "src/lxml/lxml.objectify.pyx":1036
 * 
 *     # 'long' type just for backwards compatibility
 *     pytype = PyType(u'long', None, IntElement)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__long));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u__long));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__long));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1037
 *     # 'long' type just for backwards compatibility
 *     pytype = PyType(u'long', None, IntElement)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     pytype = PyType(u'float', float, FloatElement)
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __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;

  /* "src/lxml/lxml.objectify.pyx":1039
 *     pytype.register()
 * 
 *     pytype = PyType(u'float', float, FloatElement)             # <<<<<<<<<<<<<<
 *     pytype.xmlSchemaTypes = (u"double", u"float")
 *     pytype.register()
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__float));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u__float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__float));
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)(&PyFloat_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1040
 * 
 *     pytype = PyType(u'float', float, FloatElement)
 *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  if (PyObject_SetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__xmlSchemaTypes, ((PyObject *)__pyx_k_tuple_22)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1041
 *     pytype = PyType(u'float', float, FloatElement)
 *     pytype.xmlSchemaTypes = (u"double", u"float")
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __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;

  /* "src/lxml/lxml.objectify.pyx":1043
 *     pytype.register()
 * 
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<<
 *     pytype.xmlSchemaTypes = (u"boolean",)
 *     pytype.register()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s____checkBool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s____lower_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__bool));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u__bool));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__bool));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1044
 * 
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  if (PyObject_SetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__xmlSchemaTypes, ((PyObject *)__pyx_k_tuple_23)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1045
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = (u"boolean",)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     pytype = PyType(u'str', None, StringElement)
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":1047
 *     pytype.register()
 * 
 *     pytype = PyType(u'str', None, StringElement)             # <<<<<<<<<<<<<<
 *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",
 *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__str));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u__str));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__str));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1048
 * 
 *     pytype = PyType(u'str', None, StringElement)
 *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
 *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
 *                              u"NMTOKEN", )
 */
  if (PyObject_SetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__xmlSchemaTypes, ((PyObject *)__pyx_k_tuple_24)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1051
 *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
 *                              u"NMTOKEN", )
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     # since lxml 2.0
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":1054
 * 
 *     # since lxml 2.0
 *     pytype = PyType(u'NoneType', None, NoneElement)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__NoneType));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u__NoneType));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__NoneType));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1055
 *     # since lxml 2.0
 *     pytype = PyType(u'NoneType', None, NoneElement)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     # backwards compatibility
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":1058
 * 
 *     # backwards compatibility
 *     pytype = PyType(u'none', None, NoneElement)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__none));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u__none));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__none));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1059
 *     # backwards compatibility
 *     pytype = PyType(u'none', None, NoneElement)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 * # non-registered PyType for inner tree elements
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_pytype), __pyx_n_s__register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify._registerPyTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_11getRegisteredTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_10getRegisteredTypes[] = "getRegisteredTypes()\n\n    Returns a list of the currently registered PyType objects.\n\n    To add a new type, retrieve this list and call unregister() for all\n    entries.  Then add the new type at a suitable position (possibly replacing\n    an existing one) and call register() for all entries.\n\n    This is necessary if the new type interferes with the type check functions\n    of existing ones (normally only int/float/bool) and must the tried before\n    other types.  To add a type that is not yet parsable by the current type\n    check functions, you can simply register() it, which will append it to the\n    end of the type list.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_11getRegisteredTypes = {__Pyx_NAMESTR("getRegisteredTypes"), (PyCFunction)__pyx_pw_4lxml_9objectify_11getRegisteredTypes, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10getRegisteredTypes)};
static PyObject *__pyx_pw_4lxml_9objectify_11getRegisteredTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRegisteredTypes (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_10getRegisteredTypes(__pyx_self);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1067
 * _registerPyTypes()
 * 
 * def getRegisteredTypes():             # <<<<<<<<<<<<<<
 *     u"""getRegisteredTypes()
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_known = 0;
  CYTHON_UNUSED PyObject *__pyx_v_check = NULL;
  PyObject *__pyx_v_pytype = NULL;
  PyObject *__pyx_v_name = 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)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getRegisteredTypes", 0);

  /* "src/lxml/lxml.objectify.pyx":1082
 *     end of the type list.
 *     """
 *     cdef list types = []             # <<<<<<<<<<<<<<
 *     cdef set known = set()
 *     for check, pytype in _TYPE_CHECKS:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_types = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1083
 *     """
 *     cdef list types = []
 *     cdef set known = set()             # <<<<<<<<<<<<<<
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_known = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1084
 *     cdef list types = []
 *     cdef set known = set()
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *         name = pytype.name
 *         if name not in known:
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_check);
    __pyx_v_check = __pyx_t_4;
    __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "src/lxml/lxml.objectify.pyx":1085
 *     cdef set known = set()
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name             # <<<<<<<<<<<<<<
 *         if name not in known:
 *             known.add(name)
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "src/lxml/lxml.objectify.pyx":1086
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name
 *         if name not in known:             # <<<<<<<<<<<<<<
 *             known.add(name)
 *             types.append(pytype)
 */
    __pyx_t_8 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_8) {

      /* "src/lxml/lxml.objectify.pyx":1087
 *         name = pytype.name
 *         if name not in known:
 *             known.add(name)             # <<<<<<<<<<<<<<
 *             types.append(pytype)
 *     for pytype in _PYTYPE_DICT.values():
 */
      __pyx_t_9 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "src/lxml/lxml.objectify.pyx":1088
 *         if name not in known:
 *             known.add(name)
 *             types.append(pytype)             # <<<<<<<<<<<<<<
 *     for pytype in _PYTYPE_DICT.values():
 *         name = pytype.name
 */
      __pyx_t_9 = PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1089
 *             known.add(name)
 *             types.append(pytype)
 *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
 *         name = pytype.name
 *         if name not in known:
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyDict_Values(__pyx_v_4lxml_9objectify__PYTYPE_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_1 = __pyx_t_10(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":1090
 *             types.append(pytype)
 *     for pytype in _PYTYPE_DICT.values():
 *         name = pytype.name             # <<<<<<<<<<<<<<
 *         if name not in known:
 *             known.add(name)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/lxml/lxml.objectify.pyx":1091
 *     for pytype in _PYTYPE_DICT.values():
 *         name = pytype.name
 *         if name not in known:             # <<<<<<<<<<<<<<
 *             known.add(name)
 *             types.append(pytype)
 */
    __pyx_t_8 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_8) {

      /* "src/lxml/lxml.objectify.pyx":1092
 *         name = pytype.name
 *         if name not in known:
 *             known.add(name)             # <<<<<<<<<<<<<<
 *             types.append(pytype)
 *     return types
 */
      __pyx_t_9 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "src/lxml/lxml.objectify.pyx":1093
 *         if name not in known:
 *             known.add(name)
 *             types.append(pytype)             # <<<<<<<<<<<<<<
 *     return types
 * 
 */
      __pyx_t_9 = PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L10;
    }
    __pyx_L10:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":1094
 *             known.add(name)
 *             types.append(pytype)
 *     return types             # <<<<<<<<<<<<<<
 * 
 * cdef PyType _guessPyType(value, PyType defaulttype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_types));
  __pyx_r = ((PyObject *)__pyx_v_types);
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify.getRegisteredTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_types);
  __Pyx_XDECREF(__pyx_v_known);
  __Pyx_XDECREF(__pyx_v_check);
  __Pyx_XDECREF(__pyx_v_pytype);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1096
 *     return types
 * 
 * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<<
 *     if value is None:
 *         return None
 */

static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *__pyx_v_value, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_defaulttype) {
  PyObject *__pyx_v_type_check = NULL;
  PyObject *__pyx_v_tested_pytype = NULL;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_guessPyType", 0);

  /* "src/lxml/lxml.objectify.pyx":1097
 * 
 * cdef PyType _guessPyType(value, PyType defaulttype):
 *     if value is None:             # <<<<<<<<<<<<<<
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1098
 * cdef PyType _guessPyType(value, PyType defaulttype):
 *     if value is None:
 *         return None             # <<<<<<<<<<<<<<
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 *         try:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(Py_None);
    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1099
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *         try:
 *             type_check(value)
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_type_check);
    __pyx_v_type_check = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_tested_pytype);
    __pyx_v_tested_pytype = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":1100
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 *         try:             # <<<<<<<<<<<<<<
 *             type_check(value)
 *             return <PyType>tested_pytype
 */
    {
      __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:*/ {

        /* "src/lxml/lxml.objectify.pyx":1101
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 *         try:
 *             type_check(value)             # <<<<<<<<<<<<<<
 *             return <PyType>tested_pytype
 *         except IGNORABLE_ERRORS:
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "src/lxml/lxml.objectify.pyx":1102
 *         try:
 *             type_check(value)
 *             return <PyType>tested_pytype             # <<<<<<<<<<<<<<
 *         except IGNORABLE_ERRORS:
 *             # could not be parsed as the specififed type => ignore
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype)));
        __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L12_try_return;
      }
      __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_L12_try_return:;
      __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_L0;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1103
 *             type_check(value)
 *             return <PyType>tested_pytype
 *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
 *             # could not be parsed as the specififed type => ignore
 *             pass
 */
      __pyx_t_12 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
      if (__pyx_t_12) {
        PyErr_Restore(0,0,0);
        goto __pyx_L9_exception_handled;
      }
      __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_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:;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1106
 *             # could not be parsed as the specififed type => ignore
 *             pass
 *     return defaulttype             # <<<<<<<<<<<<<<
 * 
 * cdef object _guessElementClass(tree.xmlNode* c_node):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_defaulttype));
  __pyx_r = __pyx_v_defaulttype;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify._guessPyType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_type_check);
  __Pyx_XDECREF(__pyx_v_tested_pytype);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1108
 *     return defaulttype
 * 
 * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
 *     value = textOf(c_node)
 *     if value is None:
 */

static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_node) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_type_check = NULL;
  PyObject *__pyx_v_pytype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_guessElementClass", 0);

  /* "src/lxml/lxml.objectify.pyx":1109
 * 
 * cdef object _guessElementClass(tree.xmlNode* c_node):
 *     value = textOf(c_node)             # <<<<<<<<<<<<<<
 *     if value is None:
 *         return None
 */
  __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1110
 * cdef object _guessElementClass(tree.xmlNode* c_node):
 *     value = textOf(c_node)
 *     if value is None:             # <<<<<<<<<<<<<<
 *         return None
 *     if value == u'':
 */
  __pyx_t_2 = (__pyx_v_value == Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":1111
 *     value = textOf(c_node)
 *     if value is None:
 *         return None             # <<<<<<<<<<<<<<
 *     if value == u'':
 *         return StringElement
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1112
 *     if value is None:
 *         return None
 *     if value == u'':             # <<<<<<<<<<<<<<
 *         return StringElement
 * 
 */
  __pyx_t_2 = __Pyx_PyUnicode_Equals(__pyx_v_value, ((PyObject *)__pyx_kp_u_4), Py_EQ); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":1113
 *         return None
 *     if value == u'':
 *         return StringElement             # <<<<<<<<<<<<<<
 * 
 *     for type_check, pytype in _TYPE_CHECKS:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
    __pyx_r = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1115
 *         return StringElement
 * 
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *         try:
 *             type_check(value)
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_type_check);
    __pyx_v_type_check = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":1116
 * 
 *     for type_check, pytype in _TYPE_CHECKS:
 *         try:             # <<<<<<<<<<<<<<
 *             type_check(value)
 *             return (<PyType>pytype)._type
 */
    {
      __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:*/ {

        /* "src/lxml/lxml.objectify.pyx":1117
 *     for type_check, pytype in _TYPE_CHECKS:
 *         try:
 *             type_check(value)             # <<<<<<<<<<<<<<
 *             return (<PyType>pytype)._type
 *         except IGNORABLE_ERRORS:
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "src/lxml/lxml.objectify.pyx":1118
 *         try:
 *             type_check(value)
 *             return (<PyType>pytype)._type             # <<<<<<<<<<<<<<
 *         except IGNORABLE_ERRORS:
 *             pass
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type);
        __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L13_try_return;
      }
      __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_L16_try_end;
      __pyx_L13_try_return:;
      __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_L0;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1119
 *             type_check(value)
 *             return (<PyType>pytype)._type
 *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
 *             pass
 *     return None
 */
      __pyx_t_12 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
      if (__pyx_t_12) {
        PyErr_Restore(0,0,0);
        goto __pyx_L10_exception_handled;
      }
      __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_L10_exception_handled:;
      __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_L16_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1121
 *         except IGNORABLE_ERRORS:
 *             pass
 *     return None             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __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_AddTraceback("lxml.objectify._guessElementClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_type_check);
  __Pyx_XDECREF(__pyx_v_pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__[] = "__call__(self, *children, **attrib)";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
#endif
static PyObject *__pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_children = 0;
  PyObject *__pyx_v_attrib = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
  __pyx_v_attrib = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_attrib)) return NULL;
  __Pyx_GOTREF(__pyx_v_attrib);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_children = __pyx_args;
  __pyx_r = __pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self), __pyx_v_children, __pyx_v_attrib);
  __Pyx_XDECREF(__pyx_v_children);
  __Pyx_XDECREF(__pyx_v_attrib);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1132
 *     cdef bint _annotate
 * 
 *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<<
 *         u"__call__(self, *children, **attrib)"
 *         cdef _ObjectifyElementMakerCaller elementMaker
 */

static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_self, PyObject *__pyx_v_children, PyObject *__pyx_v_attrib) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker = 0;
  PyObject *__pyx_v_pytype;
  struct LxmlElement *__pyx_v_element = 0;
  struct LxmlElement *__pyx_v_childElement = 0;
  int __pyx_v_has_children;
  int __pyx_v_has_string_value;
  PyObject *__pyx_v_pytype_name = NULL;
  PyObject *__pyx_v_child = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "src/lxml/lxml.objectify.pyx":1140
 *         cdef bint has_children
 *         cdef bint has_string_value
 *         if self._element_factory is None:             # <<<<<<<<<<<<<<
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->_element_factory == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1141
 *         cdef bint has_string_value
 *         if self._element_factory is None:
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)             # <<<<<<<<<<<<<<
 *         else:
 *             element = self._element_factory(self._tag, attrib, self._nsmap)
 */
    __pyx_t_2 = __pyx_v_self->_tag;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = Py_None;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_v_self->_nsmap;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_attrib), __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1143
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)
 *         else:
 *             element = self._element_factory(self._tag, attrib, self._nsmap)             # <<<<<<<<<<<<<<
 * 
 *         pytype_name = None
 */
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_self->_tag);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->_tag);
    __Pyx_GIVEREF(__pyx_v_self->_tag);
    __Pyx_INCREF(((PyObject *)__pyx_v_attrib));
    PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_attrib));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_attrib));
    __Pyx_INCREF(__pyx_v_self->_nsmap);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->_nsmap);
    __Pyx_GIVEREF(__pyx_v_self->_nsmap);
    __pyx_t_4 = PyObject_Call(__pyx_v_self->_element_factory, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1145
 *             element = self._element_factory(self._tag, attrib, self._nsmap)
 * 
 *         pytype_name = None             # <<<<<<<<<<<<<<
 *         has_children = 0
 *         has_string_value = 0
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_pytype_name = Py_None;

  /* "src/lxml/lxml.objectify.pyx":1146
 * 
 *         pytype_name = None
 *         has_children = 0             # <<<<<<<<<<<<<<
 *         has_string_value = 0
 *         for child in children:
 */
  __pyx_v_has_children = 0;

  /* "src/lxml/lxml.objectify.pyx":1147
 *         pytype_name = None
 *         has_children = 0
 *         has_string_value = 0             # <<<<<<<<<<<<<<
 *         for child in children:
 *             if child is None:
 */
  __pyx_v_has_string_value = 0;

  /* "src/lxml/lxml.objectify.pyx":1148
 *         has_children = 0
 *         has_string_value = 0
 *         for child in children:             # <<<<<<<<<<<<<<
 *             if child is None:
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_children); __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++;
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    #endif
    __Pyx_XDECREF(__pyx_v_child);
    __pyx_v_child = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "src/lxml/lxml.objectify.pyx":1149
 *         has_string_value = 0
 *         for child in children:
 *             if child is None:             # <<<<<<<<<<<<<<
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 *                     cetree.setAttributeValue(
 */
    __pyx_t_1 = (__pyx_v_child == Py_None);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1150
 *         for child in children:
 *             if child is None:
 *                 if python.PyTuple_GET_SIZE(children) == 1:             # <<<<<<<<<<<<<<
 *                     cetree.setAttributeValue(
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 */
      __pyx_t_1 = (PyTuple_GET_SIZE(((PyObject *)__pyx_v_children)) == 1);
      if (__pyx_t_1) {

        /* "src/lxml/lxml.objectify.pyx":1152
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 *                     cetree.setAttributeValue(
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
 *             elif python._isString(child):
 *                 _add_text(element, child)
 */
        __pyx_t_5 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_3 = ((PyObject *)__pyx_n_u__true);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_7 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;
      goto __pyx_L6;
    }

    /* "src/lxml/lxml.objectify.pyx":1153
 *                     cetree.setAttributeValue(
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 *             elif python._isString(child):             # <<<<<<<<<<<<<<
 *                 _add_text(element, child)
 *                 has_string_value = 1
 */
    __pyx_t_1 = _isString(__pyx_v_child);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1154
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 *             elif python._isString(child):
 *                 _add_text(element, child)             # <<<<<<<<<<<<<<
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):
 */
      __pyx_t_3 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/lxml/lxml.objectify.pyx":1155
 *             elif python._isString(child):
 *                 _add_text(element, child)
 *                 has_string_value = 1             # <<<<<<<<<<<<<<
 *             elif isinstance(child, _Element):
 *                 cetree.appendChild(element, <_Element>child)
 */
      __pyx_v_has_string_value = 1;
      goto __pyx_L6;
    }

    /* "src/lxml/lxml.objectify.pyx":1156
 *                 _add_text(element, child)
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1
 */
    __pyx_t_3 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_8includes_11etreepublic__Element));
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_child, __pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1157
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):
 *                 cetree.appendChild(element, <_Element>child)             # <<<<<<<<<<<<<<
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 */
      appendChild(__pyx_v_element, ((struct LxmlElement *)__pyx_v_child));

      /* "src/lxml/lxml.objectify.pyx":1158
 *             elif isinstance(child, _Element):
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1             # <<<<<<<<<<<<<<
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 */
      __pyx_v_has_children = 1;
      goto __pyx_L6;
    }

    /* "src/lxml/lxml.objectify.pyx":1159
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 *                 if elementMaker._element_factory is None:
 */
    __pyx_t_3 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller));
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_child, __pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1160
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 *                 elementMaker = <_ObjectifyElementMakerCaller>child             # <<<<<<<<<<<<<<
 *                 if elementMaker._element_factory is None:
 *                     cetree.makeSubElement(element, elementMaker._tag,
 */
      __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child)));
      __Pyx_XDECREF(((PyObject *)__pyx_v_elementMaker));
      __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child);

      /* "src/lxml/lxml.objectify.pyx":1161
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<<
 *                     cetree.makeSubElement(element, elementMaker._tag,
 *                                           None, None, None, None)
 */
      __pyx_t_1 = (__pyx_v_elementMaker->_element_factory == Py_None);
      if (__pyx_t_1) {

        /* "src/lxml/lxml.objectify.pyx":1162
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 *                 if elementMaker._element_factory is None:
 *                     cetree.makeSubElement(element, elementMaker._tag,             # <<<<<<<<<<<<<<
 *                                           None, None, None, None)
 *                 else:
 */
        __pyx_t_3 = __pyx_v_elementMaker->_tag;
        __Pyx_INCREF(__pyx_t_3);

        /* "src/lxml/lxml.objectify.pyx":1163
 *                 if elementMaker._element_factory is None:
 *                     cetree.makeSubElement(element, elementMaker._tag,
 *                                           None, None, None, None)             # <<<<<<<<<<<<<<
 *                 else:
 *                     childElement = elementMaker._element_factory(
 */
        __pyx_t_5 = Py_None;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_8 = Py_None;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_9 = Py_None;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_10 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_t_3, __pyx_t_5, __pyx_t_2, __pyx_t_8, __pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1166
 *                 else:
 *                     childElement = elementMaker._element_factory(
 *                         elementMaker._tag)             # <<<<<<<<<<<<<<
 *                     cetree.appendChild(element, childElement)
 *                 has_children = 1
 */
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_elementMaker->_tag);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_elementMaker->_tag);
        __Pyx_GIVEREF(__pyx_v_elementMaker->_tag);
        __pyx_t_9 = PyObject_Call(__pyx_v_elementMaker->_element_factory, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
        if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v_childElement));
        __pyx_v_childElement = ((struct LxmlElement *)__pyx_t_9);
        __pyx_t_9 = 0;

        /* "src/lxml/lxml.objectify.pyx":1167
 *                     childElement = elementMaker._element_factory(
 *                         elementMaker._tag)
 *                     cetree.appendChild(element, childElement)             # <<<<<<<<<<<<<<
 *                 has_children = 1
 *             else:
 */
        appendChild(__pyx_v_element, __pyx_v_childElement);
      }
      __pyx_L8:;

      /* "src/lxml/lxml.objectify.pyx":1168
 *                         elementMaker._tag)
 *                     cetree.appendChild(element, childElement)
 *                 has_children = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 if pytype_name is not None:
 */
      __pyx_v_has_children = 1;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":1170
 *                 has_children = 1
 *             else:
 *                 if pytype_name is not None:             # <<<<<<<<<<<<<<
 *                     # concatenation always makes the result a string
 *                     has_string_value = 1
 */
      __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
      if (__pyx_t_1) {

        /* "src/lxml/lxml.objectify.pyx":1172
 *                 if pytype_name is not None:
 *                     # concatenation always makes the result a string
 *                     has_string_value = 1             # <<<<<<<<<<<<<<
 *                 pytype_name = _typename(child)
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 */
        __pyx_v_has_string_value = 1;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "src/lxml/lxml.objectify.pyx":1173
 *                     # concatenation always makes the result a string
 *                     has_string_value = 1
 *                 pytype_name = _typename(child)             # <<<<<<<<<<<<<<
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:
 */
      __pyx_t_9 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_v_pytype_name);
      __pyx_v_pytype_name = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "src/lxml/lxml.objectify.pyx":1174
 *                     has_string_value = 1
 *                 pytype_name = _typename(child)
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
 *                 if pytype is not NULL:
 *                     _add_text(element, (<PyType>pytype).stringify(child))
 */
      __pyx_t_9 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_pytype = PyDict_GetItem(__pyx_t_9, __pyx_v_pytype_name);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "src/lxml/lxml.objectify.pyx":1175
 *                 pytype_name = _typename(child)
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:             # <<<<<<<<<<<<<<
 *                     _add_text(element, (<PyType>pytype).stringify(child))
 *                 else:
 */
      __pyx_t_1 = (__pyx_v_pytype != NULL);
      if (__pyx_t_1) {

        /* "src/lxml/lxml.objectify.pyx":1176
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:
 *                     _add_text(element, (<PyType>pytype).stringify(child))             # <<<<<<<<<<<<<<
 *                 else:
 *                     has_string_value = 1
 */
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_child);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_child);
        __Pyx_GIVEREF(__pyx_v_child);
        __pyx_t_10 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __pyx_t_9 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1178
 *                     _add_text(element, (<PyType>pytype).stringify(child))
 *                 else:
 *                     has_string_value = 1             # <<<<<<<<<<<<<<
 *                     child = unicode(child)
 *                     _add_text(element, child)
 */
        __pyx_v_has_string_value = 1;

        /* "src/lxml/lxml.objectify.pyx":1179
 *                 else:
 *                     has_string_value = 1
 *                     child = unicode(child)             # <<<<<<<<<<<<<<
 *                     _add_text(element, child)
 * 
 */
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_child);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_child);
        __Pyx_GIVEREF(__pyx_v_child);
        __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_v_child);
        __pyx_v_child = __pyx_t_10;
        __pyx_t_10 = 0;

        /* "src/lxml/lxml.objectify.pyx":1180
 *                     has_string_value = 1
 *                     child = unicode(child)
 *                     _add_text(element, child)             # <<<<<<<<<<<<<<
 * 
 *         if self._annotate and not has_children:
 */
        __pyx_t_10 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_L10:;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1182
 *                     _add_text(element, child)
 * 
 *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 */
  if (__pyx_v_self->_annotate) {
    __pyx_t_1 = (!__pyx_v_has_children);
    __pyx_t_11 = __pyx_t_1;
  } else {
    __pyx_t_11 = __pyx_v_self->_annotate;
  }
  if (__pyx_t_11) {

    /* "src/lxml/lxml.objectify.pyx":1183
 * 
 *         if self._annotate and not has_children:
 *             if has_string_value:             # <<<<<<<<<<<<<<
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 *             elif pytype_name is not None:
 */
    if (__pyx_v_has_string_value) {

      /* "src/lxml/lxml.objectify.pyx":1184
 *         if self._annotate and not has_children:
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")             # <<<<<<<<<<<<<<
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = ((PyObject *)__pyx_n_u__str);
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_7 = setAttributeValue(__pyx_v_element, __pyx_t_4, __pyx_t_10); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L12;
    }

    /* "src/lxml/lxml.objectify.pyx":1185
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 *             elif pytype_name is not None:             # <<<<<<<<<<<<<<
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 * 
 */
    __pyx_t_11 = (__pyx_v_pytype_name != Py_None);
    if (__pyx_t_11) {

      /* "src/lxml/lxml.objectify.pyx":1186
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
 * 
 *         return element
 */
      __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = setAttributeValue(__pyx_v_element, __pyx_t_10, __pyx_v_pytype_name); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L12;
    }
    __pyx_L12:;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "src/lxml/lxml.objectify.pyx":1188
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 * 
 *         return element             # <<<<<<<<<<<<<<
 * 
 * cdef _add_text(_Element elem, text):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_element));
  __pyx_r = ((PyObject *)__pyx_v_element);
  goto __pyx_L0;

  __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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_elementMaker);
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XDECREF((PyObject *)__pyx_v_childElement);
  __Pyx_XDECREF(__pyx_v_pytype_name);
  __Pyx_XDECREF(__pyx_v_child);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1190
 *         return element
 * 
 * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
 *     # add text to the tree in construction, either as element text or
 *     # tail text, depending on the current tree state
 */

static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_elem, PyObject *__pyx_v_text) {
  xmlNode *__pyx_v_c_child;
  PyObject *__pyx_v_old = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_add_text", 0);
  __Pyx_INCREF(__pyx_v_text);

  /* "src/lxml/lxml.objectify.pyx":1194
 *     # tail text, depending on the current tree state
 *     cdef tree.xmlNode* c_child
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)             # <<<<<<<<<<<<<<
 *     if c_child is not NULL:
 *         old = cetree.tailOf(c_child)
 */
  __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node, 0);

  /* "src/lxml/lxml.objectify.pyx":1195
 *     cdef tree.xmlNode* c_child
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)
 *     if c_child is not NULL:             # <<<<<<<<<<<<<<
 *         old = cetree.tailOf(c_child)
 *         if old is not None:
 */
  __pyx_t_1 = (__pyx_v_c_child != NULL);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1196
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)
 *     if c_child is not NULL:
 *         old = cetree.tailOf(c_child)             # <<<<<<<<<<<<<<
 *         if old is not None:
 *             text = old + text
 */
    __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_old = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":1197
 *     if c_child is not NULL:
 *         old = cetree.tailOf(c_child)
 *         if old is not None:             # <<<<<<<<<<<<<<
 *             text = old + text
 *         cetree.setTailText(c_child, text)
 */
    __pyx_t_1 = (__pyx_v_old != Py_None);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1198
 *         old = cetree.tailOf(c_child)
 *         if old is not None:
 *             text = old + text             # <<<<<<<<<<<<<<
 *         cetree.setTailText(c_child, text)
 *     else:
 */
      __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_text);
      __pyx_v_text = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "src/lxml/lxml.objectify.pyx":1199
 *         if old is not None:
 *             text = old + text
 *         cetree.setTailText(c_child, text)             # <<<<<<<<<<<<<<
 *     else:
 *         old = cetree.textOf(elem._c_node)
 */
    __pyx_t_3 = setTailText(__pyx_v_c_child, __pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1201
 *         cetree.setTailText(c_child, text)
 *     else:
 *         old = cetree.textOf(elem._c_node)             # <<<<<<<<<<<<<<
 *         if old is not None:
 *             text = old + text
 */
    __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_old = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":1202
 *     else:
 *         old = cetree.textOf(elem._c_node)
 *         if old is not None:             # <<<<<<<<<<<<<<
 *             text = old + text
 *         cetree.setNodeText(elem._c_node, text)
 */
    __pyx_t_1 = (__pyx_v_old != Py_None);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1203
 *         old = cetree.textOf(elem._c_node)
 *         if old is not None:
 *             text = old + text             # <<<<<<<<<<<<<<
 *         cetree.setNodeText(elem._c_node, text)
 * 
 */
      __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_text);
      __pyx_v_text = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":1204
 *         if old is not None:
 *             text = old + text
 *         cetree.setNodeText(elem._c_node, text)             # <<<<<<<<<<<<<<
 * 
 * cdef class ElementMaker:
 */
    __pyx_t_3 = setNodeText(__pyx_v_elem->_c_node, __pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify._add_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_old);
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_namespace = 0;
  PyObject *__pyx_v_nsmap = 0;
  PyObject *__pyx_v_annotate = 0;
  PyObject *__pyx_v_makeelement = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__namespace,&__pyx_n_s__nsmap,&__pyx_n_s__annotate,&__pyx_n_s__makeelement,0};
    PyObject* values[4] = {0,0,0,0};

    /* "src/lxml/lxml.objectify.pyx":1226
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
 *                  makeelement=None):
 *         if nsmap is None:
 */
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_25;

    /* "src/lxml/lxml.objectify.pyx":1227
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
 *                  makeelement=None):             # <<<<<<<<<<<<<<
 *         if nsmap is None:
 *             if annotate:
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      if (kw_args > 0 && likely(kw_args <= 4)) {
        Py_ssize_t index;
        for (index = 0; index < 4 && kw_args > 0; index++) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
          if (value) { values[index] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
      goto __pyx_L5_argtuple_error;
    } else {
    }
    __pyx_v_namespace = values[0];
    __pyx_v_nsmap = values[1];
    __pyx_v_annotate = values[2];
    __pyx_v_makeelement = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker___init__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), __pyx_v_namespace, __pyx_v_nsmap, __pyx_v_annotate, __pyx_v_makeelement);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1226
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
 *                  makeelement=None):
 *         if nsmap is None:
 */

static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_namespace, PyObject *__pyx_v_nsmap, PyObject *__pyx_v_annotate, PyObject *__pyx_v_makeelement) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_nsmap);

  /* "src/lxml/lxml.objectify.pyx":1228
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
 *                  makeelement=None):
 *         if nsmap is None:             # <<<<<<<<<<<<<<
 *             if annotate:
 *                 nsmap = _DEFAULT_NSMAP
 */
  __pyx_t_1 = (__pyx_v_nsmap == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1229
 *                  makeelement=None):
 *         if nsmap is None:
 *             if annotate:             # <<<<<<<<<<<<<<
 *                 nsmap = _DEFAULT_NSMAP
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1230
 *         if nsmap is None:
 *             if annotate:
 *                 nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
 *             else:
 *                 nsmap = {}
 */
      __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
      __Pyx_DECREF(__pyx_v_nsmap);
      __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
      goto __pyx_L4;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":1232
 *                 nsmap = _DEFAULT_NSMAP
 *             else:
 *                 nsmap = {}             # <<<<<<<<<<<<<<
 *         self._nsmap = nsmap
 *         if namespace is None:
 */
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_DECREF(__pyx_v_nsmap);
      __pyx_v_nsmap = ((PyObject *)__pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1233
 *             else:
 *                 nsmap = {}
 *         self._nsmap = nsmap             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             self._namespace = None
 */
  __Pyx_INCREF(__pyx_v_nsmap);
  __Pyx_GIVEREF(__pyx_v_nsmap);
  __Pyx_GOTREF(__pyx_v_self->_nsmap);
  __Pyx_DECREF(__pyx_v_self->_nsmap);
  __pyx_v_self->_nsmap = __pyx_v_nsmap;

  /* "src/lxml/lxml.objectify.pyx":1234
 *                 nsmap = {}
 *         self._nsmap = nsmap
 *         if namespace is None:             # <<<<<<<<<<<<<<
 *             self._namespace = None
 *         else:
 */
  __pyx_t_1 = (__pyx_v_namespace == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1235
 *         self._nsmap = nsmap
 *         if namespace is None:
 *             self._namespace = None             # <<<<<<<<<<<<<<
 *         else:
 *             self._namespace = u"{%s}" % namespace
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_namespace);
    __Pyx_DECREF(__pyx_v_self->_namespace);
    __pyx_v_self->_namespace = Py_None;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1237
 *             self._namespace = None
 *         else:
 *             self._namespace = u"{%s}" % namespace             # <<<<<<<<<<<<<<
 *         self._annotate = annotate
 *         if makeelement is not None:
 */
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_26), __pyx_v_namespace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_GOTREF(__pyx_v_self->_namespace);
    __Pyx_DECREF(__pyx_v_self->_namespace);
    __pyx_v_self->_namespace = ((PyObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":1238
 *         else:
 *             self._namespace = u"{%s}" % namespace
 *         self._annotate = annotate             # <<<<<<<<<<<<<<
 *         if makeelement is not None:
 *             assert callable(makeelement)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_annotate = __pyx_t_1;

  /* "src/lxml/lxml.objectify.pyx":1239
 *             self._namespace = u"{%s}" % namespace
 *         self._annotate = annotate
 *         if makeelement is not None:             # <<<<<<<<<<<<<<
 *             assert callable(makeelement)
 *             self._makeelement = makeelement
 */
  __pyx_t_1 = (__pyx_v_makeelement != Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1240
 *         self._annotate = annotate
 *         if makeelement is not None:
 *             assert callable(makeelement)             # <<<<<<<<<<<<<<
 *             self._makeelement = makeelement
 *         else:
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!PyCallable_Check(__pyx_v_makeelement))) {
      PyErr_SetNone(PyExc_AssertionError);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #endif

    /* "src/lxml/lxml.objectify.pyx":1241
 *         if makeelement is not None:
 *             assert callable(makeelement)
 *             self._makeelement = makeelement             # <<<<<<<<<<<<<<
 *         else:
 *             self._makeelement = None
 */
    __Pyx_INCREF(__pyx_v_makeelement);
    __Pyx_GIVEREF(__pyx_v_makeelement);
    __Pyx_GOTREF(__pyx_v_self->_makeelement);
    __Pyx_DECREF(__pyx_v_self->_makeelement);
    __pyx_v_self->_makeelement = __pyx_v_makeelement;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1243
 *             self._makeelement = makeelement
 *         else:
 *             self._makeelement = None             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, tag):
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_makeelement);
    __Pyx_DECREF(__pyx_v_self->_makeelement);
    __pyx_v_self->_makeelement = Py_None;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nsmap);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1245
 *             self._makeelement = None
 * 
 *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if is_special_method(tag):
 */

static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);
  __Pyx_INCREF(__pyx_v_tag);

  /* "src/lxml/lxml.objectify.pyx":1247
 *     def __getattr__(self, tag):
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if is_special_method(tag):             # <<<<<<<<<<<<<<
 *             return object.__getattr__(self, tag)
 *         if self._namespace is not None and tag[0] != u"{":
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
  __Pyx_GIVEREF(__pyx_v_tag);
  __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_9objectify_is_special_method, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1248
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if is_special_method(tag):
 *             return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
 *         if self._namespace is not None and tag[0] != u"{":
 *             tag = self._namespace + tag
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_tag);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tag);
    __Pyx_GIVEREF(__pyx_v_tag);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1249
 *         if is_special_method(tag):
 *             return object.__getattr__(self, tag)
 *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
 *             tag = self._namespace + tag
 *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
 */
  __pyx_t_3 = (__pyx_v_self->_namespace != Py_None);
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tag, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Equals(__pyx_t_4, ((PyObject *)__pyx_kp_u_27), Py_NE); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_3;
  }
  if (__pyx_t_6) {

    /* "src/lxml/lxml.objectify.pyx":1250
 *             return object.__getattr__(self, tag)
 *         if self._namespace is not None and tag[0] != u"{":
 *             tag = self._namespace + tag             # <<<<<<<<<<<<<<
 *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag
 */
    __pyx_t_4 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1251
 *         if self._namespace is not None and tag[0] != u"{":
 *             tag = self._namespace + tag
 *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)             # <<<<<<<<<<<<<<
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap
 */
  __pyx_t_4 = __Pyx_tp_new(((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1252
 *             tag = self._namespace + tag
 *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag             # <<<<<<<<<<<<<<
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate
 */
  __Pyx_INCREF(__pyx_v_tag);
  __Pyx_GIVEREF(__pyx_v_tag);
  __Pyx_GOTREF(__pyx_v_element_maker->_tag);
  __Pyx_DECREF(__pyx_v_element_maker->_tag);
  __pyx_v_element_maker->_tag = __pyx_v_tag;

  /* "src/lxml/lxml.objectify.pyx":1253
 *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap             # <<<<<<<<<<<<<<
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement
 */
  __Pyx_INCREF(__pyx_v_self->_nsmap);
  __Pyx_GIVEREF(__pyx_v_self->_nsmap);
  __Pyx_GOTREF(__pyx_v_element_maker->_nsmap);
  __Pyx_DECREF(__pyx_v_element_maker->_nsmap);
  __pyx_v_element_maker->_nsmap = __pyx_v_self->_nsmap;

  /* "src/lxml/lxml.objectify.pyx":1254
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate             # <<<<<<<<<<<<<<
 *         element_maker._element_factory = self._makeelement
 *         return element_maker
 */
  __pyx_v_element_maker->_annotate = __pyx_v_self->_annotate;

  /* "src/lxml/lxml.objectify.pyx":1255
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement             # <<<<<<<<<<<<<<
 *         return element_maker
 * 
 */
  __Pyx_INCREF(__pyx_v_self->_makeelement);
  __Pyx_GIVEREF(__pyx_v_self->_makeelement);
  __Pyx_GOTREF(__pyx_v_element_maker->_element_factory);
  __Pyx_DECREF(__pyx_v_element_maker->_element_factory);
  __pyx_v_element_maker->_element_factory = __pyx_v_self->_makeelement;

  /* "src/lxml/lxml.objectify.pyx":1256
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement
 *         return element_maker             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_element_maker));
  __pyx_r = ((PyObject *)__pyx_v_element_maker);
  goto __pyx_L0;

  __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_4);
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_element_maker);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_12enable_recursive_str[] = "enable_recursive_str(on=True)\n\n    Enable a recursively generated tree representation for str(element),\n    based on objectify.dump(element).\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_13enable_recursive_str = {__Pyx_NAMESTR("enable_recursive_str"), (PyCFunction)__pyx_pw_4lxml_9objectify_13enable_recursive_str, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_12enable_recursive_str)};
static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_on = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable_recursive_str (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__on,0};
    PyObject* values[1] = {0};
    values[0] = __pyx_k_28;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__on);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enable_recursive_str") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_on = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_12enable_recursive_str(__pyx_self, __pyx_v_on);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1264
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
 *     u"""enable_recursive_str(on=True)
 * 
 */

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

  /* "src/lxml/lxml.objectify.pyx":1271
 *     """
 *     global __RECURSIVE_STR
 *     __RECURSIVE_STR = on             # <<<<<<<<<<<<<<
 * 
 * def dump(_Element element not None):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_t_1;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
static char __pyx_doc_4lxml_9objectify_14dump[] = "dump(_Element element not None)\n\n    Return a recursively generated string representation of an element.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_15dump = {__Pyx_NAMESTR("dump"), (PyCFunction)__pyx_pw_4lxml_9objectify_15dump, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_14dump)};
static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_4lxml_9objectify_14dump(__pyx_self, ((struct LxmlElement *)__pyx_v_element));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1273
 *     __RECURSIVE_STR = on
 * 
 * def dump(_Element element not None):             # <<<<<<<<<<<<<<
 *     u"""dump(_Element element not None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump", 0);

  /* "src/lxml/lxml.objectify.pyx":1278
 *     Return a recursively generated string representation of an element.
 *     """
 *     return _dump(element, 0)             # <<<<<<<<<<<<<<
 * 
 * cdef object _dump(_Element element, int indent):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(__pyx_v_element, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1280
 *     return _dump(element, 0)
 * 
 * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<<
 *     indentstr = u"    " * indent
 *     if isinstance(element, ObjectifiedDataElement):
 */

static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_element, int __pyx_v_indent) {
  PyObject *__pyx_v_indentstr = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_xsi_ns = NULL;
  PyObject *__pyx_v_pytype_ns = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_child = 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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dump", 0);

  /* "src/lxml/lxml.objectify.pyx":1281
 * 
 * cdef object _dump(_Element element, int indent):
 *     indentstr = u"    " * indent             # <<<<<<<<<<<<<<
 *     if isinstance(element, ObjectifiedDataElement):
 *         value = repr(element)
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_indent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(((PyObject *)__pyx_kp_u_29), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_indentstr = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1282
 * cdef object _dump(_Element element, int indent):
 *     indentstr = u"    " * indent
 *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *         value = repr(element)
 *     else:
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v_element), __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1283
 *     indentstr = u"    " * indent
 *     if isinstance(element, ObjectifiedDataElement):
 *         value = repr(element)             # <<<<<<<<<<<<<<
 *     else:
 *         value = textOf(element._c_node)
 */
    __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_value = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1285
 *         value = repr(element)
 *     else:
 *         value = textOf(element._c_node)             # <<<<<<<<<<<<<<
 *         if value is not None:
 *             if not value.strip():
 */
    __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_value = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":1286
 *     else:
 *         value = textOf(element._c_node)
 *         if value is not None:             # <<<<<<<<<<<<<<
 *             if not value.strip():
 *                 value = None
 */
    __pyx_t_3 = (__pyx_v_value != Py_None);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1287
 *         value = textOf(element._c_node)
 *         if value is not None:
 *             if not value.strip():             # <<<<<<<<<<<<<<
 *                 value = None
 *             else:
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = (!__pyx_t_3);
      if (__pyx_t_4) {

        /* "src/lxml/lxml.objectify.pyx":1288
 *         if value is not None:
 *             if not value.strip():
 *                 value = None             # <<<<<<<<<<<<<<
 *             else:
 *                 value = repr(value)
 */
        __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_v_value);
        __pyx_v_value = Py_None;
        goto __pyx_L5;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1290
 *                 value = None
 *             else:
 *                 value = repr(value)             # <<<<<<<<<<<<<<
 *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
 *                                     value, _typename(element))
 */
        __pyx_t_1 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_t_1;
        __pyx_t_1 = 0;
      }
      __pyx_L5:;
      goto __pyx_L4;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1291
 *             else:
 *                 value = repr(value)
 *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,             # <<<<<<<<<<<<<<
 *                                     value, _typename(element))
 *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_s__tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/lxml/lxml.objectify.pyx":1292
 *                 value = repr(value)
 *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
 *                                     value, _typename(element))             # <<<<<<<<<<<<<<
 *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
 */
  __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_indentstr));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_indentstr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_indentstr));
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_30), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_v_result = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1293
 *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
 *                                     value, _typename(element))
 *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
 *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):
 */
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_26), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_xsi_ns = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1294
 *                                     value, _typename(element))
 *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE             # <<<<<<<<<<<<<<
 *     for name, value in cetree.iterattributes(element, 3):
 *         if u'{' in name:
 */
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_26), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_pytype_ns = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1295
 *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<<
 *         if u'{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
  __pyx_t_2 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L9_unpacking_done;
      __pyx_L8_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L9_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_value);
    __pyx_v_value = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "src/lxml/lxml.objectify.pyx":1296
 *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):
 *         if u'{' in name:             # <<<<<<<<<<<<<<
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:
 */
    __pyx_t_4 = ((PySequence_Contains(__pyx_v_name, ((PyObject *)__pyx_kp_u_27)))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "src/lxml/lxml.objectify.pyx":1297
 *     for name, value in cetree.iterattributes(element, 3):
 *         if u'{' in name:
 *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
 *                 if value == TREE_PYTYPE_NAME:
 *                     continue
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_name, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_4) {

        /* "src/lxml/lxml.objectify.pyx":1298
 *         if u'{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
 *                     continue
 *                 else:
 */
        __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_4) {

          /* "src/lxml/lxml.objectify.pyx":1299
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:
 *                     continue             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = name.replace(pytype_ns, u'py:')
 */
          goto __pyx_L6_continue;
          goto __pyx_L12;
        }
        /*else*/ {

          /* "src/lxml/lxml.objectify.pyx":1301
 *                     continue
 *                 else:
 *                     name = name.replace(pytype_ns, u'py:')             # <<<<<<<<<<<<<<
 *             name = name.replace(xsi_ns, u'xsi:')
 *         result += u"%s  * %s = %r\n" % (indentstr, name, value)
 */
          __pyx_t_8 = PyObject_GetAttr(__pyx_v_name, __pyx_n_s__replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(((PyObject *)__pyx_v_pytype_ns));
          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_pytype_ns));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_pytype_ns));
          __Pyx_INCREF(((PyObject *)__pyx_kp_u_31));
          PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_u_31));
          __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_31));
          __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_t_1;
          __pyx_t_1 = 0;
        }
        __pyx_L12:;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "src/lxml/lxml.objectify.pyx":1302
 *                 else:
 *                     name = name.replace(pytype_ns, u'py:')
 *             name = name.replace(xsi_ns, u'xsi:')             # <<<<<<<<<<<<<<
 *         result += u"%s  * %s = %r\n" % (indentstr, name, value)
 * 
 */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_name, __pyx_n_s__replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_v_xsi_ns));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_xsi_ns));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_xsi_ns));
      __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_u_32));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
      __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "src/lxml/lxml.objectify.pyx":1303
 *                     name = name.replace(pytype_ns, u'py:')
 *             name = name.replace(xsi_ns, u'xsi:')
 *         result += u"%s  * %s = %r\n" % (indentstr, name, value)             # <<<<<<<<<<<<<<
 * 
 *     indent += 1
 */
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(((PyObject *)__pyx_v_indentstr));
    PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_indentstr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_indentstr));
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_33), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_8;
    __pyx_t_8 = 0;
    __pyx_L6_continue:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/lxml/lxml.objectify.pyx":1305
 *         result += u"%s  * %s = %r\n" % (indentstr, name, value)
 * 
 *     indent += 1             # <<<<<<<<<<<<<<
 *     for child in element.iterchildren():
 *         result += _dump(child, indent)
 */
  __pyx_v_indent = (__pyx_v_indent + 1);

  /* "src/lxml/lxml.objectify.pyx":1306
 * 
 *     indent += 1
 *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
 *         result += _dump(child, indent)
 *     if indent == 1:
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_s__iterchildren); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
    __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++;
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++;
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_8 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_8)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF(__pyx_v_child);
    __pyx_v_child = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "src/lxml/lxml.objectify.pyx":1307
 *     indent += 1
 *     for child in element.iterchildren():
 *         result += _dump(child, indent)             # <<<<<<<<<<<<<<
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'
 */
    if (!(likely(((__pyx_v_child) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = __pyx_v_child;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_t_8), __pyx_v_indent); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_8;
    __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/lxml/lxml.objectify.pyx":1308
 *     for child in element.iterchildren():
 *         result += _dump(child, indent)
 *     if indent == 1:             # <<<<<<<<<<<<<<
 *         return result[:-1] # strip last '\n'
 *     else:
 */
  __pyx_t_4 = (__pyx_v_indent == 1);
  if (__pyx_t_4) {

    /* "src/lxml/lxml.objectify.pyx":1309
 *         result += _dump(child, indent)
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
 *     else:
 *         return result
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_result, 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L15;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1311
 *         return result[:-1] # strip last '\n'
 *     else:
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  }
  __pyx_L15:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("lxml.objectify._dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_indentstr);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_xsi_ns);
  __Pyx_XDECREF(__pyx_v_pytype_ns);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_child);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_17__unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_4lxml_9objectify_17__unpickleElementTree = {__Pyx_NAMESTR("__unpickleElementTree"), (PyCFunction)__pyx_pw_4lxml_9objectify_17__unpickleElementTree, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_4lxml_9objectify_17__unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unpickleElementTree (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_16__unpickleElementTree(__pyx_self, ((PyObject *)__pyx_v_data));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1317
 * # Pickle support for objectified ElementTree
 * 
 * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
 *     return etree.ElementTree(fromstring(data))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__unpickleElementTree", 0);

  /* "src/lxml/lxml.objectify.pyx":1318
 * 
 * def __unpickleElementTree(data):
 *     return etree.ElementTree(fromstring(data))             # <<<<<<<<<<<<<<
 * 
 * cdef _setupPickle(elementTreeReduceFunction):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__ElementTree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.__unpickleElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1320
 *     return etree.ElementTree(fromstring(data))
 * 
 * cdef _setupPickle(elementTreeReduceFunction):             # <<<<<<<<<<<<<<
 *     if python.IS_PYTHON3:
 *         import copyreg
 */

static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_elementTreeReduceFunction) {
  PyObject *__pyx_v_copyreg = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setupPickle", 0);

  /* "src/lxml/lxml.objectify.pyx":1321
 * 
 * cdef _setupPickle(elementTreeReduceFunction):
 *     if python.IS_PYTHON3:             # <<<<<<<<<<<<<<
 *         import copyreg
 *     else:
 */
  if (IS_PYTHON3) {

    /* "src/lxml/lxml.objectify.pyx":1322
 * cdef _setupPickle(elementTreeReduceFunction):
 *     if python.IS_PYTHON3:
 *         import copyreg             # <<<<<<<<<<<<<<
 *     else:
 *         import copy_reg as copyreg
 */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__copyreg), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_copyreg = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1324
 *         import copyreg
 *     else:
 *         import copy_reg as copyreg             # <<<<<<<<<<<<<<
 *     copyreg.pickle(etree._ElementTree,
 *                    elementTreeReduceFunction, __unpickleElementTree)
 */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__copy_reg), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_copyreg = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1325
 *     else:
 *         import copy_reg as copyreg
 *     copyreg.pickle(etree._ElementTree,             # <<<<<<<<<<<<<<
 *                    elementTreeReduceFunction, __unpickleElementTree)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_s__pickle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s___ElementTree); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/lxml/lxml.objectify.pyx":1326
 *         import copy_reg as copyreg
 *     copyreg.pickle(etree._ElementTree,
 *                    elementTreeReduceFunction, __unpickleElementTree)             # <<<<<<<<<<<<<<
 * 
 * def pickleReduceElementTree(obj):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_34); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_elementTreeReduceFunction);
  __Pyx_GIVEREF(__pyx_v_elementTreeReduceFunction);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __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("lxml.objectify._setupPickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_copyreg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_19pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_4lxml_9objectify_19pickleReduceElementTree = {__Pyx_NAMESTR("pickleReduceElementTree"), (PyCFunction)__pyx_pw_4lxml_9objectify_19pickleReduceElementTree, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_4lxml_9objectify_19pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pickleReduceElementTree (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_18pickleReduceElementTree(__pyx_self, ((PyObject *)__pyx_v_obj));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1328
 *                    elementTreeReduceFunction, __unpickleElementTree)
 * 
 * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
 *     return (__unpickleElementTree, (etree.tostring(obj),))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pickleReduceElementTree", 0);

  /* "src/lxml/lxml.objectify.pyx":1329
 * 
 * def pickleReduceElementTree(obj):
 *     return (__unpickleElementTree, (etree.tostring(obj),))             # <<<<<<<<<<<<<<
 * 
 * _setupPickle(pickleReduceElementTree)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_34); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_obj);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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("lxml.objectify.pickleReduceElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__[] = "Lookup mechanism for objectify.\n\n        The default Element classes can be replaced by passing subclasses of\n        ObjectifiedElement and ObjectifiedDataElement as keyword arguments.\n        'tree_class' defines inner tree classes (defaults to\n        ObjectifiedElement), 'empty_data_class' defines the default class for\n        empty data elements (defauls to StringElement).\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
#endif
static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tree_class = 0;
  PyObject *__pyx_v_empty_data_class = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tree_class,&__pyx_n_s__empty_data_class,0};
    PyObject* values[2] = {0,0};

    /* "src/lxml/lxml.objectify.pyx":1343
 *     cdef object empty_data_class
 *     cdef object tree_class
 *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
 *         u"""Lookup mechanism for objectify.
 * 
 */
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tree_class);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__empty_data_class);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tree_class = values[0];
    __pyx_v_empty_data_class = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self), __pyx_v_tree_class, __pyx_v_empty_data_class);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_self, PyObject *__pyx_v_tree_class, PyObject *__pyx_v_empty_data_class) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_tree_class);
  __Pyx_INCREF(__pyx_v_empty_data_class);

  /* "src/lxml/lxml.objectify.pyx":1352
 *         empty data elements (defauls to StringElement).
 *         """
 *         self._lookup_function = _lookupElementClass             # <<<<<<<<<<<<<<
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement
 */
  __pyx_v_self->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;

  /* "src/lxml/lxml.objectify.pyx":1353
 *         """
 *         self._lookup_function = _lookupElementClass
 *         if tree_class is None:             # <<<<<<<<<<<<<<
 *             tree_class = ObjectifiedElement
 *         self.tree_class = tree_class
 */
  __pyx_t_1 = (__pyx_v_tree_class == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1354
 *         self._lookup_function = _lookupElementClass
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement             # <<<<<<<<<<<<<<
 *         self.tree_class = tree_class
 *         if empty_data_class is None:
 */
    __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
    __Pyx_DECREF(__pyx_v_tree_class);
    __pyx_v_tree_class = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1355
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement
 *         self.tree_class = tree_class             # <<<<<<<<<<<<<<
 *         if empty_data_class is None:
 *             empty_data_class = StringElement
 */
  __Pyx_INCREF(__pyx_v_tree_class);
  __Pyx_GIVEREF(__pyx_v_tree_class);
  __Pyx_GOTREF(__pyx_v_self->tree_class);
  __Pyx_DECREF(__pyx_v_self->tree_class);
  __pyx_v_self->tree_class = __pyx_v_tree_class;

  /* "src/lxml/lxml.objectify.pyx":1356
 *             tree_class = ObjectifiedElement
 *         self.tree_class = tree_class
 *         if empty_data_class is None:             # <<<<<<<<<<<<<<
 *             empty_data_class = StringElement
 *         self.empty_data_class = empty_data_class
 */
  __pyx_t_1 = (__pyx_v_empty_data_class == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1357
 *         self.tree_class = tree_class
 *         if empty_data_class is None:
 *             empty_data_class = StringElement             # <<<<<<<<<<<<<<
 *         self.empty_data_class = empty_data_class
 * 
 */
    __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
    __Pyx_DECREF(__pyx_v_empty_data_class);
    __pyx_v_empty_data_class = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1358
 *         if empty_data_class is None:
 *             empty_data_class = StringElement
 *         self.empty_data_class = empty_data_class             # <<<<<<<<<<<<<<
 * 
 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
 */
  __Pyx_INCREF(__pyx_v_empty_data_class);
  __Pyx_GIVEREF(__pyx_v_empty_data_class);
  __Pyx_GOTREF(__pyx_v_self->empty_data_class);
  __Pyx_DECREF(__pyx_v_self->empty_data_class);
  __pyx_v_self->empty_data_class = __pyx_v_empty_data_class;

  __pyx_r = 0;
  __Pyx_XDECREF(__pyx_v_tree_class);
  __Pyx_XDECREF(__pyx_v_empty_data_class);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1360
 *         self.empty_data_class = empty_data_class
 * 
 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
 *     cdef ObjectifyElementClassLookup lookup
 *     cdef python.PyObject* dict_result
 */

static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_state, CYTHON_UNUSED struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) {
  struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup = 0;
  PyObject *__pyx_v_dict_result;
  PyObject *__pyx_v_value = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_el_class = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_lookupElementClass", 0);

  /* "src/lxml/lxml.objectify.pyx":1363
 *     cdef ObjectifyElementClassLookup lookup
 *     cdef python.PyObject* dict_result
 *     lookup = <ObjectifyElementClassLookup>state             # <<<<<<<<<<<<<<
 *     # if element has children => no data class
 *     if cetree.hasChild(c_node):
 */
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state)));
  __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state);

  /* "src/lxml/lxml.objectify.pyx":1365
 *     lookup = <ObjectifyElementClassLookup>state
 *     # if element has children => no data class
 *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
 *         return lookup.tree_class
 * 
 */
  __pyx_t_1 = hasChild(__pyx_v_c_node);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1366
 *     # if element has children => no data class
 *     if cetree.hasChild(c_node):
 *         return lookup.tree_class             # <<<<<<<<<<<<<<
 * 
 *     # if element is defined as xsi:nil, return NoneElement class
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_lookup->tree_class);
    __pyx_r = __pyx_v_lookup->tree_class;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1370
 *     # if element is defined as xsi:nil, return NoneElement class
 *     if u"true" == cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):             # <<<<<<<<<<<<<<
 *         return NoneElement
 * 
 */
  __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__nil))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyUnicode_Equals(((PyObject *)__pyx_n_u__true), __pyx_t_2, Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1371
 *     if u"true" == cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
 *         return NoneElement             # <<<<<<<<<<<<<<
 * 
 *     # check for Python type hint
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
    __pyx_r = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1375
 *     # check for Python type hint
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
 *     if value is not None:
 *         if value == TREE_PYTYPE_NAME:
 */
  __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1376
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *     if value is not None:             # <<<<<<<<<<<<<<
 *         if value == TREE_PYTYPE_NAME:
 *             return lookup.tree_class
 */
  __pyx_t_1 = (__pyx_v_value != Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1377
 *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *     if value is not None:
 *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
 *             return lookup.tree_class
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1378
 *     if value is not None:
 *         if value == TREE_PYTYPE_NAME:
 *             return lookup.tree_class             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 *         if dict_result is not NULL:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_lookup->tree_class);
      __pyx_r = __pyx_v_lookup->tree_class;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "src/lxml/lxml.objectify.pyx":1379
 *         if value == TREE_PYTYPE_NAME:
 *             return lookup.tree_class
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)             # <<<<<<<<<<<<<<
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_dict_result = PyDict_GetItem(__pyx_t_2, __pyx_v_value);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":1380
 *             return lookup.tree_class
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 *         if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *             return (<PyType>dict_result)._type
 *         # unknown 'pyval' => try to figure it out ourself, just go on
 */
    __pyx_t_1 = (__pyx_v_dict_result != NULL);
    if (__pyx_t_1) {

      /* "src/lxml/lxml.objectify.pyx":1381
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type             # <<<<<<<<<<<<<<
 *         # unknown 'pyval' => try to figure it out ourself, just go on
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type);
      __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type;
      goto __pyx_L0;
      goto __pyx_L7;
    }
    __pyx_L7:;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":1386
 *     # check for XML Schema type hint
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")             # <<<<<<<<<<<<<<
 * 
 *     if value is not None:
 */
  __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__type))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_value);
  __pyx_v_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1388
 *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
 * 
 *     if value is not None:             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and u':' in value:
 */
  __pyx_t_1 = (__pyx_v_value != Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1389
 * 
 *     if value is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)             # <<<<<<<<<<<<<<
 *         if dict_result is NULL and u':' in value:
 *             prefix, value = value.split(u':', 1)
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_dict_result = PyDict_GetItem(__pyx_t_2, __pyx_v_value);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/lxml/lxml.objectify.pyx":1390
 *     if value is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and u':' in value:             # <<<<<<<<<<<<<<
 *             prefix, value = value.split(u':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 */
    __pyx_t_1 = (__pyx_v_dict_result == NULL);
    if (__pyx_t_1) {
      __pyx_t_3 = ((PySequence_Contains(__pyx_v_value, ((PyObject *)__pyx_kp_u_35)))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_1;
    }
    if (__pyx_t_4) {

      /* "src/lxml/lxml.objectify.pyx":1391
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and u':' in value:
 *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L11_unpacking_done:;
      }
      __pyx_v_prefix = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1392
 *         if dict_result is NULL and u':' in value:
 *             prefix, value = value.split(u':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)             # <<<<<<<<<<<<<<
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type
 */
      __pyx_t_5 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_dict_result = PyDict_GetItem(__pyx_t_5, __pyx_v_value);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "src/lxml/lxml.objectify.pyx":1393
 *             prefix, value = value.split(u':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *             return (<PyType>dict_result)._type
 * 
 */
    __pyx_t_4 = (__pyx_v_dict_result != NULL);
    if (__pyx_t_4) {

      /* "src/lxml/lxml.objectify.pyx":1394
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type             # <<<<<<<<<<<<<<
 * 
 *     # otherwise determine class based on text content type
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type);
      __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type;
      goto __pyx_L0;
      goto __pyx_L12;
    }
    __pyx_L12:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "src/lxml/lxml.objectify.pyx":1397
 * 
 *     # otherwise determine class based on text content type
 *     el_class = _guessElementClass(c_node)             # <<<<<<<<<<<<<<
 *     if el_class is not None:
 *         return el_class
 */
  __pyx_t_5 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_el_class = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "src/lxml/lxml.objectify.pyx":1398
 *     # otherwise determine class based on text content type
 *     el_class = _guessElementClass(c_node)
 *     if el_class is not None:             # <<<<<<<<<<<<<<
 *         return el_class
 * 
 */
  __pyx_t_4 = (__pyx_v_el_class != Py_None);
  if (__pyx_t_4) {

    /* "src/lxml/lxml.objectify.pyx":1399
 *     el_class = _guessElementClass(c_node)
 *     if el_class is not None:
 *         return el_class             # <<<<<<<<<<<<<<
 * 
 *     # if element is a root node => default to tree node
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_el_class);
    __pyx_r = __pyx_v_el_class;
    goto __pyx_L0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "src/lxml/lxml.objectify.pyx":1402
 * 
 *     # if element is a root node => default to tree node
 *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<<
 *         return lookup.tree_class
 * 
 */
  __pyx_t_4 = (__pyx_v_c_node->parent == NULL);
  if (!__pyx_t_4) {
    __pyx_t_1 = (!_isElement(__pyx_v_c_node->parent));
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1403
 *     # if element is a root node => default to tree node
 *     if c_node.parent is NULL or not tree._isElement(c_node.parent):
 *         return lookup.tree_class             # <<<<<<<<<<<<<<
 * 
 *     return lookup.empty_data_class
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_lookup->tree_class);
    __pyx_r = __pyx_v_lookup->tree_class;
    goto __pyx_L0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "src/lxml/lxml.objectify.pyx":1405
 *         return lookup.tree_class
 * 
 *     return lookup.empty_data_class             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_lookup->empty_data_class);
  __pyx_r = __pyx_v_lookup->empty_data_class;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify._lookupElementClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lookup);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_el_class);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1411
 * # Type annotations
 * 
 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<<
 *     if pytype is None:
 *         return None
 */

static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *__pyx_v_c_node, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype) {
  PyObject *__pyx_v_value = NULL;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_type", 0);

  /* "src/lxml/lxml.objectify.pyx":1412
 * 
 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
 *     if pytype is None:             # <<<<<<<<<<<<<<
 *         return None
 *     value = textOf(c_node)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1413
 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
 *     if pytype is None:
 *         return None             # <<<<<<<<<<<<<<
 *     value = textOf(c_node)
 *     try:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(Py_None);
    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1414
 *     if pytype is None:
 *         return None
 *     value = textOf(c_node)             # <<<<<<<<<<<<<<
 *     try:
 *         pytype.type_check(value)
 */
  __pyx_t_2 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1415
 *         return None
 *     value = textOf(c_node)
 *     try:             # <<<<<<<<<<<<<<
 *         pytype.type_check(value)
 *         return pytype
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "src/lxml/lxml.objectify.pyx":1416
 *     value = textOf(c_node)
 *     try:
 *         pytype.type_check(value)             # <<<<<<<<<<<<<<
 *         return pytype
 *     except IGNORABLE_ERRORS:
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_6 = PyObject_Call(__pyx_v_pytype->type_check, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1417
 *     try:
 *         pytype.type_check(value)
 *         return pytype             # <<<<<<<<<<<<<<
 *     except IGNORABLE_ERRORS:
 *         # could not be parsed as the specified type => ignore
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_pytype));
      __pyx_r = __pyx_v_pytype;
      goto __pyx_L8_try_return;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L11_try_end;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":1418
 *         pytype.type_check(value)
 *         return pytype
 *     except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
 *         # could not be parsed as the specified type => ignore
 *         pass
 */
    __pyx_t_7 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
    if (__pyx_t_7) {
      PyErr_Restore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L11_try_end:;
  }

  /* "src/lxml/lxml.objectify.pyx":1421
 *         # could not be parsed as the specified type => ignore
 *         pass
 *     return None             # <<<<<<<<<<<<<<
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(Py_None);
  __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_20pyannotate[] = "pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)\n\n    Recursively annotates the elements of an XML tree with 'pytype'\n    attributes.\n\n    If the 'ignore_old' keyword argument is True (the default), current 'pytype'\n    attributes will be ignored and replaced.  Otherwise, they will be checked\n    and only replaced if they no longer fit the current text value.\n\n    Setting the keyword argument ``ignore_xsi`` to True makes the function\n    additionally ignore existing ``xsi:type`` annotations.  The default is to\n    use them as a type hint.\n\n    The default annotation of empty elements can be set with the\n    ``empty_pytype`` keyword argument.  The default is not to annotate empty\n    elements.  Pass 'str', for example, to make string values the default.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_21pyannotate = {__Pyx_NAMESTR("pyannotate"), (PyCFunction)__pyx_pw_4lxml_9objectify_21pyannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_20pyannotate)};
static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element_or_tree = 0;
  PyObject *__pyx_v_ignore_old = 0;
  PyObject *__pyx_v_ignore_xsi = 0;
  PyObject *__pyx_v_empty_pytype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pyannotate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__element_or_tree,&__pyx_n_s__ignore_old,&__pyx_n_s__ignore_xsi,&__pyx_n_s__empty_pytype,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = __pyx_k_37;
    values[2] = __pyx_k_38;

    /* "src/lxml/lxml.objectify.pyx":1424
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
 *              empty_pytype=None):             # <<<<<<<<<<<<<<
 *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
 * 
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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__element_or_tree)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args > 0 && likely(kw_args <= 3)) {
        Py_ssize_t index;
        for (index = 1; index < 4 && kw_args > 0; index++) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
          if (value) { values[index] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pyannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_element_or_tree = values[0];
    __pyx_v_ignore_old = values[1];
    __pyx_v_ignore_xsi = values[2];
    __pyx_v_empty_pytype = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_20pyannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_xsi, __pyx_v_empty_pytype);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1423
 *     return None
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
 *              empty_pytype=None):
 *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
 */

static PyObject *__pyx_pf_4lxml_9objectify_20pyannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype) {
  struct LxmlElement *__pyx_v_element = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pyannotate", 0);

  /* "src/lxml/lxml.objectify.pyx":1443
 *     """
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 */
  __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1444
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<<
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, __pyx_t_1, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_22xsiannotate[] = "xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)\n\n    Recursively annotates the elements of an XML tree with 'xsi:type'\n    attributes.\n\n    If the 'ignore_old' keyword argument is True (the default), current\n    'xsi:type' attributes will be ignored and replaced.  Otherwise, they will be\n    checked and only replaced if they no longer fit the current text value.\n\n    Note that the mapping from Python types to XSI types is usually ambiguous.\n    Currently, only the first XSI type name in the corresponding PyType\n    definition will be used for annotation.  Thus, you should consider naming\n    the widest type first if you define additional types.\n\n    Setting the keyword argument ``ignore_pytype`` to True makes the function\n    additionally ignore existing ``pytype`` annotations.  The default is to\n    use them as a type hint.\n\n    The default annotation of empty elements can be set with the\n    ``empty_type`` keyword argument.  The default is not to annotate empty\n    elements.  Pass 'string', for example, to make string values the default.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_23xsiannotate = {__Pyx_NAMESTR("xsiannotate"), (PyCFunction)__pyx_pw_4lxml_9objectify_23xsiannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_22xsiannotate)};
static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element_or_tree = 0;
  PyObject *__pyx_v_ignore_old = 0;
  PyObject *__pyx_v_ignore_pytype = 0;
  PyObject *__pyx_v_empty_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("xsiannotate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__element_or_tree,&__pyx_n_s__ignore_old,&__pyx_n_s__ignore_pytype,&__pyx_n_s__empty_type,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = __pyx_k_39;
    values[2] = __pyx_k_40;

    /* "src/lxml/lxml.objectify.pyx":1447
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
 *                 empty_type=None):             # <<<<<<<<<<<<<<
 *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
 * 
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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__element_or_tree)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args > 0 && likely(kw_args <= 3)) {
        Py_ssize_t index;
        for (index = 1; index < 4 && kw_args > 0; index++) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
          if (value) { values[index] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsiannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_element_or_tree = values[0];
    __pyx_v_ignore_old = values[1];
    __pyx_v_ignore_pytype = values[2];
    __pyx_v_empty_type = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_22xsiannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_pytype, __pyx_v_empty_type);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1446
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
 *                 empty_type=None):
 *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
 */

static PyObject *__pyx_pf_4lxml_9objectify_22xsiannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type) {
  struct LxmlElement *__pyx_v_element = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xsiannotate", 0);

  /* "src/lxml/lxml.objectify.pyx":1471
 *     """
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 */
  __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1472
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<<
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_24annotate[] = "annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)\n\n    Recursively annotates the elements of an XML tree with 'xsi:type'\n    and/or 'py:pytype' attributes.\n\n    If the 'ignore_old' keyword argument is True (the default), current\n    'py:pytype' attributes will be ignored for the type annotation. Set to False\n    if you want reuse existing 'py:pytype' information (iff appropriate for the\n    element text value).\n\n    If the 'ignore_xsi' keyword argument is False (the default), existing\n    'xsi:type' attributes will be used for the type annotation, if they fit the\n    element text values. \n    \n    Note that the mapping from Python types to XSI types is usually ambiguous.\n    Currently, only the first XSI type name in the corresponding PyType\n    definition will be used for annotation.  Thus, you should consider naming\n    the widest type first if you define additional types.\n\n    The default 'py:pytype' annotation of empty elements can be set with the\n    ``empty_pytype`` keyword argument. Pass 'str', for example, to make\n    string values the default.\n\n    The default 'xsi:type' annotation of empty elements can be set with the\n    ``empty_type`` keyword argument.  The default is not to annotate empty\n    elements.  Pass 'string', for example, to make string values the default.\n\n    The keyword arguments 'annotate_xsi' (default: 0) and 'annotate_pytype'\n    (default: 1) control which kind(s) of annotation to use. \n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_25annotate = {__Pyx_NAMESTR("annotate"), (PyCFunction)__pyx_pw_4lxml_9objectify_25annotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_24annotate)};
static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element_or_tree = 0;
  PyObject *__pyx_v_ignore_old = 0;
  PyObject *__pyx_v_ignore_xsi = 0;
  PyObject *__pyx_v_empty_pytype = 0;
  PyObject *__pyx_v_empty_type = 0;
  PyObject *__pyx_v_annotate_xsi = 0;
  PyObject *__pyx_v_annotate_pytype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("annotate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__element_or_tree,&__pyx_n_s__ignore_old,&__pyx_n_s__ignore_xsi,&__pyx_n_s__empty_pytype,&__pyx_n_s__empty_type,&__pyx_n_s__annotate_xsi,&__pyx_n_s__annotate_pytype,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = __pyx_k_41;
    values[2] = __pyx_k_42;

    /* "src/lxml/lxml.objectify.pyx":1475
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<<
 *              annotate_pytype=1):
 *     u"""annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)
 */
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)__pyx_int_0);
    values[6] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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__element_or_tree)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args > 0 && likely(kw_args <= 6)) {
        Py_ssize_t index;
        for (index = 1; index < 7 && kw_args > 0; index++) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
          if (value) { values[index] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "annotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_element_or_tree = values[0];
    __pyx_v_ignore_old = values[1];
    __pyx_v_ignore_xsi = values[2];
    __pyx_v_empty_pytype = values[3];
    __pyx_v_empty_type = values[4];
    __pyx_v_annotate_xsi = values[5];
    __pyx_v_annotate_pytype = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_24annotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_xsi, __pyx_v_empty_pytype, __pyx_v_empty_type, __pyx_v_annotate_xsi, __pyx_v_annotate_pytype);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1474
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):
 */

static PyObject *__pyx_pf_4lxml_9objectify_24annotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype, PyObject *__pyx_v_empty_type, PyObject *__pyx_v_annotate_xsi, PyObject *__pyx_v_annotate_pytype) {
  struct LxmlElement *__pyx_v_element = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("annotate", 0);

  /* "src/lxml/lxml.objectify.pyx":1508
 *     """
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
 *               ignore_old, empty_type, empty_pytype)
 */
  __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1509
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<<
 *               ignore_old, empty_type, empty_pytype)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1510
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
 *               ignore_old, empty_type, empty_pytype)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_empty_type, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1513
 * 
 * 
 * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<<
 *                bint ignore_xsi, bint ignore_pytype,
 *                empty_type_name, empty_pytype_name):
 */

static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_element, int __pyx_v_annotate_xsi, int __pyx_v_annotate_pytype, int __pyx_v_ignore_xsi, int __pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type_name, PyObject *__pyx_v_empty_pytype_name) {
  struct LxmlDocument *__pyx_v_doc = 0;
  xmlNode *__pyx_v_c_node;
  xmlNs *__pyx_v_c_ns;
  PyObject *__pyx_v_dict_result;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype = 0;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype = 0;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType = 0;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType = 0;
  PyObject *__pyx_v_typename = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_value = NULL;
  long __pyx_v_istree;
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_old_pytypename = NULL;
  PyObject *__pyx_v_typename_utf8 = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_pytype_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_annotate", 0);
  __Pyx_INCREF(__pyx_v_empty_type_name);
  __Pyx_INCREF(__pyx_v_empty_pytype_name);

  /* "src/lxml/lxml.objectify.pyx":1522
 *     cdef PyType pytype, empty_pytype, StrType, NoneType
 * 
 *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_t_1 = (!__pyx_v_annotate_xsi);
  if (__pyx_t_1) {
    __pyx_t_2 = (!__pyx_v_annotate_pytype);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1523
 * 
 *     if not annotate_xsi and not annotate_pytype:
 *         return             # <<<<<<<<<<<<<<
 * 
 *     doc = element._doc
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1525
 *         return
 * 
 *     doc = element._doc             # <<<<<<<<<<<<<<
 * 
 *     if empty_type_name is not None:
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_element->_doc));
  __pyx_v_doc = __pyx_v_element->_doc;

  /* "src/lxml/lxml.objectify.pyx":1527
 *     doc = element._doc
 * 
 *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(empty_type_name, bytes):
 *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
 */
  __pyx_t_3 = (__pyx_v_empty_type_name != Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1528
 * 
 *     if empty_type_name is not None:
 *         if isinstance(empty_type_name, bytes):             # <<<<<<<<<<<<<<
 *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 */
    __pyx_t_4 = ((PyObject *)((PyObject*)(&PyBytes_Type)));
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_empty_type_name, __pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1529
 *     if empty_type_name is not None:
 *         if isinstance(empty_type_name, bytes):
 *             empty_type_name = (<bytes>empty_type_name).decode("ascii")             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_empty_type_name, __pyx_n_s__decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_empty_type_name);
      __pyx_v_empty_type_name = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":1530
 *         if isinstance(empty_type_name, bytes):
 *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)             # <<<<<<<<<<<<<<
 *     elif empty_pytype_name is not None:
 *         if isinstance(empty_pytype_name, bytes):
 */
    __pyx_t_5 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_v_dict_result = PyDict_GetItem(__pyx_t_5, __pyx_v_empty_type_name);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4;
  }

  /* "src/lxml/lxml.objectify.pyx":1531
 *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(empty_pytype_name, bytes):
 *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
 */
  __pyx_t_3 = (__pyx_v_empty_pytype_name != Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1532
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 *         if isinstance(empty_pytype_name, bytes):             # <<<<<<<<<<<<<<
 *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 */
    __pyx_t_5 = ((PyObject *)((PyObject*)(&PyBytes_Type)));
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_empty_pytype_name, __pyx_t_5); 
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1533
 *     elif empty_pytype_name is not None:
 *         if isinstance(empty_pytype_name, bytes):
 *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 *     else:
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_empty_pytype_name, __pyx_n_s__decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_empty_pytype_name);
      __pyx_v_empty_pytype_name = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "src/lxml/lxml.objectify.pyx":1534
 *         if isinstance(empty_pytype_name, bytes):
 *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)             # <<<<<<<<<<<<<<
 *     else:
 *         dict_result = NULL
 */
    __pyx_t_4 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_v_dict_result = PyDict_GetItem(__pyx_t_4, __pyx_v_empty_pytype_name);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1536
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 *     else:
 *         dict_result = NULL             # <<<<<<<<<<<<<<
 *     if dict_result is not NULL:
 *         empty_pytype = <PyType>dict_result
 */
    __pyx_v_dict_result = NULL;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1537
 *     else:
 *         dict_result = NULL
 *     if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *         empty_pytype = <PyType>dict_result
 *     else:
 */
  __pyx_t_3 = (__pyx_v_dict_result != NULL);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1538
 *         dict_result = NULL
 *     if dict_result is not NULL:
 *         empty_pytype = <PyType>dict_result             # <<<<<<<<<<<<<<
 *     else:
 *         empty_pytype = None
 */
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
    __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
    goto __pyx_L7;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1540
 *         empty_pytype = <PyType>dict_result
 *     else:
 *         empty_pytype = None             # <<<<<<<<<<<<<<
 * 
 *     StrType  = _PYTYPE_DICT.get(u'str')
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
  }
  __pyx_L7:;

  /* "src/lxml/lxml.objectify.pyx":1542
 *         empty_pytype = None
 * 
 *     StrType  = _PYTYPE_DICT.get(u'str')             # <<<<<<<<<<<<<<
 *     NoneType = _PYTYPE_DICT.get(u'NoneType')
 *     c_node = element._c_node
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((PyObject *)__pyx_n_u__str), Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_9objectify_PyType))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1543
 * 
 *     StrType  = _PYTYPE_DICT.get(u'str')
 *     NoneType = _PYTYPE_DICT.get(u'NoneType')             # <<<<<<<<<<<<<<
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 */
  if (unlikely(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((PyObject *)__pyx_n_u__NoneType), Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_9objectify_PyType))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1544
 *     StrType  = _PYTYPE_DICT.get(u'str')
 *     NoneType = _PYTYPE_DICT.get(u'NoneType')
 *     c_node = element._c_node             # <<<<<<<<<<<<<<
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 */
  __pyx_v_c_node = __pyx_v_element->_c_node;

  /* "src/lxml/lxml.objectify.pyx":1545
 *     NoneType = _PYTYPE_DICT.get(u'NoneType')
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<<
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None
 */
  BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1);

  /* "src/lxml/lxml.objectify.pyx":1546
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
 *         typename = None
 *         pytype = None
 */
  __pyx_t_3 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1547
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None             # <<<<<<<<<<<<<<
 *         pytype = None
 *         value  = None
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_typename = Py_None;

    /* "src/lxml/lxml.objectify.pyx":1548
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None
 *         pytype = None             # <<<<<<<<<<<<<<
 *         value  = None
 *         istree = 0
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);

    /* "src/lxml/lxml.objectify.pyx":1549
 *         typename = None
 *         pytype = None
 *         value  = None             # <<<<<<<<<<<<<<
 *         istree = 0
 *         # if element is defined as xsi:nil, represent it as None
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_value = Py_None;

    /* "src/lxml/lxml.objectify.pyx":1550
 *         pytype = None
 *         value  = None
 *         istree = 0             # <<<<<<<<<<<<<<
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 */
    __pyx_v_istree = 0;

    /* "src/lxml/lxml.objectify.pyx":1553
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == u"true":             # <<<<<<<<<<<<<<
 *             pytype = NoneType
 * 
 */
    __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__nil))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Equals(__pyx_t_4, ((PyObject *)__pyx_n_u__true), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1554
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == u"true":
 *             pytype = NoneType             # <<<<<<<<<<<<<<
 * 
 *         if  pytype is None and not ignore_xsi:
 */
      __Pyx_INCREF(((PyObject *)__pyx_v_NoneType));
      __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
      __pyx_v_pytype = __pyx_v_NoneType;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "src/lxml/lxml.objectify.pyx":1556
 *             pytype = NoneType
 * 
 *         if  pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 */
    __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_3) {
      __pyx_t_1 = (!__pyx_v_ignore_xsi);
      __pyx_t_2 = __pyx_t_1;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":1559
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")             # <<<<<<<<<<<<<<
 *             if typename is not None:
 *                 dict_result = python.PyDict_GetItem(
 */
      __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__type))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_v_typename);
      __pyx_v_typename = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "src/lxml/lxml.objectify.pyx":1560
 *             typename = cetree.attributeValueFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
 *             if typename is not None:             # <<<<<<<<<<<<<<
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)
 */
      __pyx_t_2 = (__pyx_v_typename != Py_None);
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":1562
 *             if typename is not None:
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)             # <<<<<<<<<<<<<<
 *                 if dict_result is NULL and u':' in typename:
 *                     prefix, typename = typename.split(u':', 1)
 */
        __pyx_t_4 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_dict_result = PyDict_GetItem(__pyx_t_4, __pyx_v_typename);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/lxml/lxml.objectify.pyx":1563
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and u':' in typename:             # <<<<<<<<<<<<<<
 *                     prefix, typename = typename.split(u':', 1)
 *                     dict_result = python.PyDict_GetItem(
 */
        __pyx_t_2 = (__pyx_v_dict_result == NULL);
        if (__pyx_t_2) {
          __pyx_t_3 = ((PySequence_Contains(__pyx_v_typename, ((PyObject *)__pyx_kp_u_35)))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_1 = __pyx_t_3;
        } else {
          __pyx_t_1 = __pyx_t_2;
        }
        if (__pyx_t_1) {

          /* "src/lxml/lxml.objectify.pyx":1564
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and u':' in typename:
 *                     prefix, typename = typename.split(u':', 1)             # <<<<<<<<<<<<<<
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
          __pyx_t_4 = PyObject_GetAttr(__pyx_v_typename, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
            PyObject* sequence = __pyx_t_5;
            #if CYTHON_COMPILING_IN_CPYTHON
            Py_ssize_t size = Py_SIZE(sequence);
            #else
            Py_ssize_t size = PySequence_Size(sequence);
            #endif
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            #if CYTHON_COMPILING_IN_CPYTHON
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            #else
            __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          {
            Py_ssize_t index = -1;
            __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_4);
            index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_6);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_8 = NULL;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L14_unpacking_done;
            __pyx_L13_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_8 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_L14_unpacking_done:;
          }
          __pyx_v_prefix = __pyx_t_4;
          __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_v_typename);
          __pyx_v_typename = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "src/lxml/lxml.objectify.pyx":1566
 *                     prefix, typename = typename.split(u':', 1)
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)             # <<<<<<<<<<<<<<
 *                 if dict_result is not NULL:
 *                     pytype = <PyType>dict_result
 */
          __pyx_t_5 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_v_dict_result = PyDict_GetItem(__pyx_t_5, __pyx_v_typename);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L12;
        }
        __pyx_L12:;

        /* "src/lxml/lxml.objectify.pyx":1567
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                     pytype = <PyType>dict_result
 *                     if pytype is not StrType:
 */
        __pyx_t_1 = (__pyx_v_dict_result != NULL);
        if (__pyx_t_1) {

          /* "src/lxml/lxml.objectify.pyx":1568
 *                         _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is not NULL:
 *                     pytype = <PyType>dict_result             # <<<<<<<<<<<<<<
 *                     if pytype is not StrType:
 *                         # StrType does not have a typecheck but is the default
 */
          __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
          __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
          __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);

          /* "src/lxml/lxml.objectify.pyx":1569
 *                 if dict_result is not NULL:
 *                     pytype = <PyType>dict_result
 *                     if pytype is not StrType:             # <<<<<<<<<<<<<<
 *                         # StrType does not have a typecheck but is the default
 *                         # anyway, so just accept it if given as type
 */
          __pyx_t_1 = (__pyx_v_pytype != __pyx_v_StrType);
          if (__pyx_t_1) {

            /* "src/lxml/lxml.objectify.pyx":1573
 *                         # anyway, so just accept it if given as type
 *                         # information
 *                         pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
 *                         if pytype is None:
 *                             typename = None
 */
            __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
            __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5);
            __pyx_t_5 = 0;

            /* "src/lxml/lxml.objectify.pyx":1574
 *                         # information
 *                         pytype = _check_type(c_node, pytype)
 *                         if pytype is None:             # <<<<<<<<<<<<<<
 *                             typename = None
 * 
 */
            __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
            if (__pyx_t_1) {

              /* "src/lxml/lxml.objectify.pyx":1575
 *                         pytype = _check_type(c_node, pytype)
 *                         if pytype is None:
 *                             typename = None             # <<<<<<<<<<<<<<
 * 
 *         if pytype is None and not ignore_pytype:
 */
              __Pyx_INCREF(Py_None);
              __Pyx_DECREF(__pyx_v_typename);
              __pyx_v_typename = Py_None;
              goto __pyx_L17;
            }
            __pyx_L17:;
            goto __pyx_L16;
          }
          __pyx_L16:;
          goto __pyx_L15;
        }
        __pyx_L15:;
        goto __pyx_L11;
      }
      __pyx_L11:;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "src/lxml/lxml.objectify.pyx":1577
 *                             typename = None
 * 
 *         if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<<
 *             # check that old pytype value is valid
 *             old_pytypename = cetree.attributeValueFromNsName(
 */
    __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_1) {
      __pyx_t_2 = (!__pyx_v_ignore_pytype);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1580
 *             # check that old pytype value is valid
 *             old_pytypename = cetree.attributeValueFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
 *             if old_pytypename is not None:
 *                 if old_pytypename == TREE_PYTYPE_NAME:
 */
      __pyx_t_5 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_old_pytypename = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "src/lxml/lxml.objectify.pyx":1581
 *             old_pytypename = cetree.attributeValueFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *             if old_pytypename is not None:             # <<<<<<<<<<<<<<
 *                 if old_pytypename == TREE_PYTYPE_NAME:
 *                     if not cetree.hasChild(c_node):
 */
      __pyx_t_3 = (__pyx_v_old_pytypename != Py_None);
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":1582
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *             if old_pytypename is not None:
 *                 if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
 *                     if not cetree.hasChild(c_node):
 *                         # only case where we should keep it,
 */
        __pyx_t_5 = PyObject_RichCompare(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_3) {

          /* "src/lxml/lxml.objectify.pyx":1583
 *             if old_pytypename is not None:
 *                 if old_pytypename == TREE_PYTYPE_NAME:
 *                     if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
 *                         # only case where we should keep it,
 *                         # everything else is clear enough
 */
          __pyx_t_3 = (!hasChild(__pyx_v_c_node));
          if (__pyx_t_3) {

            /* "src/lxml/lxml.objectify.pyx":1586
 *                         # only case where we should keep it,
 *                         # everything else is clear enough
 *                         pytype = TREE_PYTYPE             # <<<<<<<<<<<<<<
 *                 else:
 *                     if old_pytypename == u'none':
 */
            __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
            __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
            __pyx_v_pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE;
            goto __pyx_L21;
          }
          __pyx_L21:;
          goto __pyx_L20;
        }
        /*else*/ {

          /* "src/lxml/lxml.objectify.pyx":1588
 *                         pytype = TREE_PYTYPE
 *                 else:
 *                     if old_pytypename == u'none':             # <<<<<<<<<<<<<<
 *                         # transition from lxml 1.x
 *                         old_pytypename = u"NoneType"
 */
          __pyx_t_3 = __Pyx_PyUnicode_Equals(__pyx_v_old_pytypename, ((PyObject *)__pyx_n_u__none), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_3) {

            /* "src/lxml/lxml.objectify.pyx":1590
 *                     if old_pytypename == u'none':
 *                         # transition from lxml 1.x
 *                         old_pytypename = u"NoneType"             # <<<<<<<<<<<<<<
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)
 */
            __Pyx_INCREF(((PyObject *)__pyx_n_u__NoneType));
            __Pyx_DECREF(__pyx_v_old_pytypename);
            __pyx_v_old_pytypename = ((PyObject *)__pyx_n_u__NoneType);
            goto __pyx_L22;
          }
          __pyx_L22:;

          /* "src/lxml/lxml.objectify.pyx":1592
 *                         old_pytypename = u"NoneType"
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)             # <<<<<<<<<<<<<<
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result
 */
          __pyx_t_5 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_v_dict_result = PyDict_GetItem(__pyx_t_5, __pyx_v_old_pytypename);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "src/lxml/lxml.objectify.pyx":1593
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)
 *                     if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                         pytype = <PyType>dict_result
 *                         if pytype is not StrType:
 */
          __pyx_t_3 = (__pyx_v_dict_result != NULL);
          if (__pyx_t_3) {

            /* "src/lxml/lxml.objectify.pyx":1594
 *                         _PYTYPE_DICT, old_pytypename)
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result             # <<<<<<<<<<<<<<
 *                         if pytype is not StrType:
 *                             # StrType does not have a typecheck but is the
 */
            __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
            __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
            __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);

            /* "src/lxml/lxml.objectify.pyx":1595
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result
 *                         if pytype is not StrType:             # <<<<<<<<<<<<<<
 *                             # StrType does not have a typecheck but is the
 *                             # default anyway, so just accept it if given as
 */
            __pyx_t_3 = (__pyx_v_pytype != __pyx_v_StrType);
            if (__pyx_t_3) {

              /* "src/lxml/lxml.objectify.pyx":1599
 *                             # default anyway, so just accept it if given as
 *                             # type information
 *                             pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
 * 
 *         if pytype is None:
 */
              __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
              __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5);
              __pyx_t_5 = 0;
              goto __pyx_L24;
            }
            __pyx_L24:;
            goto __pyx_L23;
          }
          __pyx_L23:;
        }
        __pyx_L20:;
        goto __pyx_L19;
      }
      __pyx_L19:;
      goto __pyx_L18;
    }
    __pyx_L18:;

    /* "src/lxml/lxml.objectify.pyx":1601
 *                             pytype = _check_type(c_node, pytype)
 * 
 *         if pytype is None:             # <<<<<<<<<<<<<<
 *             # try to guess type
 *             if not cetree.hasChild(c_node):
 */
    __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1603
 *         if pytype is None:
 *             # try to guess type
 *             if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
 *                 # element has no children => data class
 *                 pytype = _guessPyType(textOf(c_node), StrType)
 */
      __pyx_t_3 = (!hasChild(__pyx_v_c_node));
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":1605
 *             if not cetree.hasChild(c_node):
 *                 # element has no children => data class
 *                 pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<<
 *             else:
 *                 istree = 1
 */
        __pyx_t_5 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_5, __pyx_v_StrType)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
        __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L26;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1607
 *                 pytype = _guessPyType(textOf(c_node), StrType)
 *             else:
 *                 istree = 1             # <<<<<<<<<<<<<<
 * 
 *         if pytype is None:
 */
        __pyx_v_istree = 1;
      }
      __pyx_L26:;
      goto __pyx_L25;
    }
    __pyx_L25:;

    /* "src/lxml/lxml.objectify.pyx":1609
 *                 istree = 1
 * 
 *         if pytype is None:             # <<<<<<<<<<<<<<
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):
 */
    __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1611
 *         if pytype is None:
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
 *                 pytype = StrType
 *             else:
 */
      __pyx_t_3 = hasText(__pyx_v_c_node);
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":1612
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):
 *                 pytype = StrType             # <<<<<<<<<<<<<<
 *             else:
 *                 pytype = empty_pytype
 */
        __Pyx_INCREF(((PyObject *)__pyx_v_StrType));
        __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
        __pyx_v_pytype = __pyx_v_StrType;
        goto __pyx_L28;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1614
 *                 pytype = StrType
 *             else:
 *                 pytype = empty_pytype             # <<<<<<<<<<<<<<
 *                 if typename is None:
 *                     typename = empty_type_name
 */
        __Pyx_INCREF(((PyObject *)__pyx_v_empty_pytype));
        __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
        __pyx_v_pytype = __pyx_v_empty_pytype;

        /* "src/lxml/lxml.objectify.pyx":1615
 *             else:
 *                 pytype = empty_pytype
 *                 if typename is None:             # <<<<<<<<<<<<<<
 *                     typename = empty_type_name
 * 
 */
        __pyx_t_3 = (__pyx_v_typename == Py_None);
        if (__pyx_t_3) {

          /* "src/lxml/lxml.objectify.pyx":1616
 *                 pytype = empty_pytype
 *                 if typename is None:
 *                     typename = empty_type_name             # <<<<<<<<<<<<<<
 * 
 *         if pytype is not None:
 */
          __Pyx_INCREF(__pyx_v_empty_type_name);
          __Pyx_DECREF(__pyx_v_typename);
          __pyx_v_typename = __pyx_v_empty_type_name;
          goto __pyx_L29;
        }
        __pyx_L29:;
      }
      __pyx_L28:;
      goto __pyx_L27;
    }
    __pyx_L27:;

    /* "src/lxml/lxml.objectify.pyx":1618
 *                     typename = empty_type_name
 * 
 *         if pytype is not None:             # <<<<<<<<<<<<<<
 *             if typename is None:
 *                 if not istree:
 */
    __pyx_t_3 = (((PyObject *)__pyx_v_pytype) != Py_None);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1619
 * 
 *         if pytype is not None:
 *             if typename is None:             # <<<<<<<<<<<<<<
 *                 if not istree:
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
 */
      __pyx_t_3 = (__pyx_v_typename == Py_None);
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":1620
 *         if pytype is not None:
 *             if typename is None:
 *                 if not istree:             # <<<<<<<<<<<<<<
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
 *                         # pytype->xsi:type is a 1:n mapping
 */
        __pyx_t_3 = (!__pyx_v_istree);
        if (__pyx_t_3) {

          /* "src/lxml/lxml.objectify.pyx":1621
 *             if typename is None:
 *                 if not istree:
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:             # <<<<<<<<<<<<<<
 *                         # pytype->xsi:type is a 1:n mapping
 *                         # simply take the first
 */
          __pyx_t_6 = ((PyObject *)__pyx_v_pytype->_schema_types);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_3 = (PyList_GET_SIZE(__pyx_t_6) > 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (__pyx_t_3) {

            /* "src/lxml/lxml.objectify.pyx":1624
 *                         # pytype->xsi:type is a 1:n mapping
 *                         # simply take the first
 *                         typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
 *             elif typename not in pytype._schema_types:
 *                 typename = pytype._schema_types[0]
 */
            if (unlikely(((PyObject *)__pyx_v_pytype->_schema_types) == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_v_typename);
            __pyx_v_typename = __pyx_t_6;
            __pyx_t_6 = 0;
            goto __pyx_L33;
          }
          __pyx_L33:;
          goto __pyx_L32;
        }
        __pyx_L32:;
        goto __pyx_L31;
      }

      /* "src/lxml/lxml.objectify.pyx":1625
 *                         # simply take the first
 *                         typename = pytype._schema_types[0]
 *             elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
 *                 typename = pytype._schema_types[0]
 * 
 */
      __pyx_t_3 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_pytype->_schema_types), __pyx_v_typename))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":1626
 *                         typename = pytype._schema_types[0]
 *             elif typename not in pytype._schema_types:
 *                 typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
 * 
 *         if annotate_xsi:
 */
        if (unlikely(((PyObject *)__pyx_v_pytype->_schema_types) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_v_typename);
        __pyx_v_typename = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L31;
      }
      __pyx_L31:;
      goto __pyx_L30;
    }
    __pyx_L30:;

    /* "src/lxml/lxml.objectify.pyx":1628
 *                 typename = pytype._schema_types[0]
 * 
 *         if annotate_xsi:             # <<<<<<<<<<<<<<
 *             if typename is None or istree:
 *                 cetree.delAttributeFromNsName(
 */
    if (__pyx_v_annotate_xsi) {

      /* "src/lxml/lxml.objectify.pyx":1629
 * 
 *         if annotate_xsi:
 *             if typename is None or istree:             # <<<<<<<<<<<<<<
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
 */
      __pyx_t_3 = (__pyx_v_typename == Py_None);
      if (!__pyx_t_3) {
        __pyx_t_1 = __pyx_v_istree;
      } else {
        __pyx_t_1 = __pyx_t_3;
      }
      if (__pyx_t_1) {

        /* "src/lxml/lxml.objectify.pyx":1631
 *             if typename is None or istree:
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")             # <<<<<<<<<<<<<<
 *             else:
 *                 # update or create attribute
 */
        delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__type)));
        goto __pyx_L35;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1634
 *             else:
 *                 # update or create attribute
 *                 typename_utf8 = cetree.utf8(typename)             # <<<<<<<<<<<<<<
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
 */
        __pyx_t_6 = ((PyObject *)utf8(__pyx_v_typename)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_v_typename_utf8 = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "src/lxml/lxml.objectify.pyx":1636
 *                 typename_utf8 = cetree.utf8(typename)
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')             # <<<<<<<<<<<<<<
 *                 if c_ns is not NULL:
 *                     if b':' in typename_utf8:
 */
        __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_NS, ((unsigned char *)((unsigned char *)__pyx_k__xsd)));

        /* "src/lxml/lxml.objectify.pyx":1637
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
 *                 if c_ns is not NULL:             # <<<<<<<<<<<<<<
 *                     if b':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(b':', 1)
 */
        __pyx_t_1 = (__pyx_v_c_ns != NULL);
        if (__pyx_t_1) {

          /* "src/lxml/lxml.objectify.pyx":1638
 *                     doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
 *                 if c_ns is not NULL:
 *                     if b':' in typename_utf8:             # <<<<<<<<<<<<<<
 *                         prefix, name = typename_utf8.split(b':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 */
          __pyx_t_1 = ((PySequence_Contains(__pyx_v_typename_utf8, ((PyObject *)__pyx_kp_b_35)))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_1) {

            /* "src/lxml/lxml.objectify.pyx":1639
 *                 if c_ns is not NULL:
 *                     if b':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(b':', 1)             # <<<<<<<<<<<<<<
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name
 */
            __pyx_t_6 = PyObject_GetAttr(__pyx_v_typename_utf8, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
              PyObject* sequence = __pyx_t_5;
              #if CYTHON_COMPILING_IN_CPYTHON
              Py_ssize_t size = Py_SIZE(sequence);
              #else
              Py_ssize_t size = PySequence_Size(sequence);
              #endif
              if (unlikely(size != 2)) {
                if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              #if CYTHON_COMPILING_IN_CPYTHON
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
              } else {
                __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
              }
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_4);
              #else
              __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              #endif
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            } else
            {
              Py_ssize_t index = -1;
              __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
              index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L38_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_6);
              index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L38_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_4);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_8 = NULL;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L39_unpacking_done;
              __pyx_L38_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __pyx_t_8 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_L39_unpacking_done:;
            }
            __Pyx_XDECREF(__pyx_v_prefix);
            __pyx_v_prefix = __pyx_t_6;
            __pyx_t_6 = 0;
            __pyx_v_name = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "src/lxml/lxml.objectify.pyx":1640
 *                     if b':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(b':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
 *                             typename_utf8 = name
 *                         elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
 */
            __pyx_t_1 = (__pyx_v_c_ns->prefix == NULL);
            if (!__pyx_t_1) {
              __pyx_t_3 = ((__pyx_v_c_ns->prefix[0]) == '\x00');
              __pyx_t_2 = __pyx_t_3;
            } else {
              __pyx_t_2 = __pyx_t_1;
            }
            if (__pyx_t_2) {

              /* "src/lxml/lxml.objectify.pyx":1641
 *                         prefix, name = typename_utf8.split(b':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name             # <<<<<<<<<<<<<<
 *                         elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
 *                             typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
 */
              __Pyx_INCREF(__pyx_v_name);
              __Pyx_DECREF(__pyx_v_typename_utf8);
              __pyx_v_typename_utf8 = __pyx_v_name;
              goto __pyx_L40;
            }

            /* "src/lxml/lxml.objectify.pyx":1642
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name
 *                         elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
 *                             typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 */
            __pyx_t_2 = (xmlStrcmp((const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0);
            if (__pyx_t_2) {

              /* "src/lxml/lxml.objectify.pyx":1643
 *                             typename_utf8 = name
 *                         elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
 *                             typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name             # <<<<<<<<<<<<<<
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
 */
              __pyx_t_5 = __Pyx_PyBytes_FromUString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(((PyObject *)__pyx_t_5));
              __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_kp_b_35)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(((PyObject *)__pyx_t_4));
              __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
              __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_4), __pyx_v_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_v_typename_utf8);
              __pyx_v_typename_utf8 = __pyx_t_5;
              __pyx_t_5 = 0;
              goto __pyx_L40;
            }
            __pyx_L40:;
            goto __pyx_L37;
          }

          /* "src/lxml/lxml.objectify.pyx":1644
 *                         elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
 *                             typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
 *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 */
          __pyx_t_2 = (__pyx_v_c_ns->prefix != NULL);
          if (!__pyx_t_2) {
            __pyx_t_1 = ((__pyx_v_c_ns->prefix[0]) != '\x00');
            __pyx_t_3 = __pyx_t_1;
          } else {
            __pyx_t_3 = __pyx_t_2;
          }
          if (__pyx_t_3) {

            /* "src/lxml/lxml.objectify.pyx":1645
 *                             typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8             # <<<<<<<<<<<<<<
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
 */
            __pyx_t_5 = __Pyx_PyBytes_FromUString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_5));
            __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_kp_b_35)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_4));
            __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
            __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_4), __pyx_v_typename_utf8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_v_typename_utf8);
            __pyx_v_typename_utf8 = __pyx_t_5;
            __pyx_t_5 = 0;
            goto __pyx_L37;
          }
          __pyx_L37:;
          goto __pyx_L36;
        }
        __pyx_L36:;

        /* "src/lxml/lxml.objectify.pyx":1647
 *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')             # <<<<<<<<<<<<<<
 *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
 * 
 */
        __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__xsi)));

        /* "src/lxml/lxml.objectify.pyx":1648
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
 *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))             # <<<<<<<<<<<<<<
 * 
 *         if annotate_pytype:
 */
        xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, ((unsigned char *)((unsigned char *)__pyx_k__type)), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_typename_utf8));
      }
      __pyx_L35:;
      goto __pyx_L34;
    }
    __pyx_L34:;

    /* "src/lxml/lxml.objectify.pyx":1650
 *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
 * 
 *         if annotate_pytype:             # <<<<<<<<<<<<<<
 *             if pytype is None:
 *                 # delete attribute if it exists
 */
    if (__pyx_v_annotate_pytype) {

      /* "src/lxml/lxml.objectify.pyx":1651
 * 
 *         if annotate_pytype:
 *             if pytype is None:             # <<<<<<<<<<<<<<
 *                 # delete attribute if it exists
 *                 cetree.delAttributeFromNsName(
 */
      __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
      if (__pyx_t_3) {

        /* "src/lxml/lxml.objectify.pyx":1654
 *                 # delete attribute if it exists
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
 *             else:
 *                 # update or create attribute
 */
        delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
        goto __pyx_L42;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1658
 *                 # update or create attribute
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')             # <<<<<<<<<<<<<<
 *                 pytype_name = cetree.utf8(pytype.name)
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 */
        __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, ((unsigned char *)((unsigned char *)__pyx_k__py)));

        /* "src/lxml/lxml.objectify.pyx":1659
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
 *                 pytype_name = cetree.utf8(pytype.name)             # <<<<<<<<<<<<<<
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _xcstr(pytype_name))
 */
        __pyx_t_5 = __pyx_v_pytype->name;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_4 = ((PyObject *)utf8(__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_pytype_name = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/lxml/lxml.objectify.pyx":1661
 *                 pytype_name = cetree.utf8(pytype.name)
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _xcstr(pytype_name))             # <<<<<<<<<<<<<<
 *                 if pytype is NoneType:
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 */
        xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME, (const xmlChar*)PyBytes_AS_STRING(((PyObject *)__pyx_v_pytype_name)));

        /* "src/lxml/lxml.objectify.pyx":1662
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _xcstr(pytype_name))
 *                 if pytype is NoneType:             # <<<<<<<<<<<<<<
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
 */
        __pyx_t_3 = (__pyx_v_pytype == __pyx_v_NoneType);
        if (__pyx_t_3) {

          /* "src/lxml/lxml.objectify.pyx":1664
 *                 if pytype is NoneType:
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')             # <<<<<<<<<<<<<<
 *                     tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 */
          __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)__pyx_k__xsi)));

          /* "src/lxml/lxml.objectify.pyx":1665
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
 *                     tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")             # <<<<<<<<<<<<<<
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 */
          xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, ((unsigned char *)((unsigned char *)__pyx_k__nil)), ((unsigned char *)((unsigned char *)__pyx_k__true)));
          goto __pyx_L43;
        }
        __pyx_L43:;
      }
      __pyx_L42:;
      goto __pyx_L41;
    }
    __pyx_L41:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "src/lxml/lxml.objectify.pyx":1666
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
 *                     tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<<
 * 
 * cdef object _strip_attributes = etree.strip_attributes
 */
  END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify._annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_doc);
  __Pyx_XDECREF((PyObject *)__pyx_v_pytype);
  __Pyx_XDECREF((PyObject *)__pyx_v_empty_pytype);
  __Pyx_XDECREF((PyObject *)__pyx_v_StrType);
  __Pyx_XDECREF((PyObject *)__pyx_v_NoneType);
  __Pyx_XDECREF(__pyx_v_typename);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_old_pytypename);
  __Pyx_XDECREF(__pyx_v_typename_utf8);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_pytype_name);
  __Pyx_XDECREF(__pyx_v_empty_type_name);
  __Pyx_XDECREF(__pyx_v_empty_pytype_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_26deannotate[] = "deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)\n\n    Recursively de-annotate the elements of an XML tree by removing 'py:pytype'\n    and/or 'xsi:type' attributes and/or 'xsi:nil' attributes.\n\n    If the 'pytype' keyword argument is True (the default), 'py:pytype'\n    attributes will be removed. If the 'xsi' keyword argument is True (the \n    default), 'xsi:type' attributes will be removed.\n    If the 'xsi_nil' keyword argument is True (default: False), 'xsi:nil'\n    attributes will be removed.\n\n    Note that this does not touch the namespace declarations by\n    default.  If you want to remove unused namespace declarations from\n    the tree, pass the option ``cleanup_namespaces=True``.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_27deannotate = {__Pyx_NAMESTR("deannotate"), (PyCFunction)__pyx_pw_4lxml_9objectify_27deannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_26deannotate)};
static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element_or_tree = 0;
  int __pyx_v_pytype;
  int __pyx_v_xsi;
  int __pyx_v_xsi_nil;
  int __pyx_v_cleanup_namespaces;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deannotate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__element_or_tree,&__pyx_n_s__pytype,&__pyx_n_s__xsi,&__pyx_n_s__xsi_nil,&__pyx_n_s__cleanup_namespaces,0};
    PyObject* values[5] = {0,0,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  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__element_or_tree)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args > 0 && likely(kw_args <= 4)) {
        Py_ssize_t index;
        for (index = 1; index < 5 && kw_args > 0; index++) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
          if (value) { values[index] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_element_or_tree = values[0];
    if (values[1]) {
      __pyx_v_pytype = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pytype == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "src/lxml/lxml.objectify.pyx":1671
 * cdef object _cleanup_namespaces = etree.cleanup_namespaces
 * 
 * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
 *                bint xsi_nil=False, bint cleanup_namespaces=False):
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
 */
      __pyx_v_pytype = ((int)1);
    }
    if (values[2]) {
      __pyx_v_xsi = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_xsi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_xsi = ((int)1);
    }
    if (values[3]) {
      __pyx_v_xsi_nil = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_xsi_nil == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "src/lxml/lxml.objectify.pyx":1672
 * 
 * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
 *                bint xsi_nil=False, bint cleanup_namespaces=False):             # <<<<<<<<<<<<<<
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
 * 
 */
      __pyx_v_xsi_nil = ((int)0);
    }
    if (values[4]) {
      __pyx_v_cleanup_namespaces = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_cleanup_namespaces == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_cleanup_namespaces = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_26deannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_pytype, __pyx_v_xsi, __pyx_v_xsi_nil, __pyx_v_cleanup_namespaces);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1671
 * cdef object _cleanup_namespaces = etree.cleanup_namespaces
 * 
 * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
 *                bint xsi_nil=False, bint cleanup_namespaces=False):
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
 */

static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, int __pyx_v_pytype, int __pyx_v_xsi, int __pyx_v_xsi_nil, int __pyx_v_cleanup_namespaces) {
  PyObject *__pyx_v_attribute_names = 0;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deannotate", 0);

  /* "src/lxml/lxml.objectify.pyx":1688
 *     the tree, pass the option ``cleanup_namespaces=True``.
 *     """
 *     cdef list attribute_names = []             # <<<<<<<<<<<<<<
 * 
 *     if pytype:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_attribute_names = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1690
 *     cdef list attribute_names = []
 * 
 *     if pytype:             # <<<<<<<<<<<<<<
 *         attribute_names.append(PYTYPE_ATTRIBUTE)
 *     if xsi:
 */
  if (__pyx_v_pytype) {

    /* "src/lxml/lxml.objectify.pyx":1691
 * 
 *     if pytype:
 *         attribute_names.append(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
 *     if xsi:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1692
 *     if pytype:
 *         attribute_names.append(PYTYPE_ATTRIBUTE)
 *     if xsi:             # <<<<<<<<<<<<<<
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *     if xsi_nil:
 */
  if (__pyx_v_xsi) {

    /* "src/lxml/lxml.objectify.pyx":1693
 *         attribute_names.append(PYTYPE_ATTRIBUTE)
 *     if xsi:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
 *     if xsi_nil:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
 */
    __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1694
 *     if xsi:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *     if xsi_nil:             # <<<<<<<<<<<<<<
 *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
 * 
 */
  if (__pyx_v_xsi_nil) {

    /* "src/lxml/lxml.objectify.pyx":1695
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *     if xsi_nil:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)             # <<<<<<<<<<<<<<
 * 
 *     _strip_attributes(element_or_tree, *attribute_names)
 */
    __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":1697
 *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
 * 
 *     _strip_attributes(element_or_tree, *attribute_names)             # <<<<<<<<<<<<<<
 *     if cleanup_namespaces:
 *         _cleanup_namespaces(element_or_tree)
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_element_or_tree);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_element_or_tree);
  __Pyx_GIVEREF(__pyx_v_element_or_tree);
  __pyx_t_3 = PySequence_Tuple(((PyObject *)__pyx_v_attribute_names)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":1698
 * 
 *     _strip_attributes(element_or_tree, *attribute_names)
 *     if cleanup_namespaces:             # <<<<<<<<<<<<<<
 *         _cleanup_namespaces(element_or_tree)
 * 
 */
  if (__pyx_v_cleanup_namespaces) {

    /* "src/lxml/lxml.objectify.pyx":1699
 *     _strip_attributes(element_or_tree, *attribute_names)
 *     if cleanup_namespaces:
 *         _cleanup_namespaces(element_or_tree)             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_element_or_tree);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_element_or_tree);
    __Pyx_GIVEREF(__pyx_v_element_or_tree);
    __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_9objectify__cleanup_namespaces, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  __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_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attribute_names);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_28set_default_parser[] = "set_default_parser(new_parser = None)\n\n    Replace the default parser used by objectify's Element() and\n    fromstring() functions.\n\n    The new parser must be an etree.XMLParser.\n\n    Call without arguments to reset to the original parser.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_29set_default_parser = {__Pyx_NAMESTR("set_default_parser"), (PyCFunction)__pyx_pw_4lxml_9objectify_29set_default_parser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_28set_default_parser)};
static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_new_parser = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_default_parser (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__new_parser,0};
    PyObject* values[1] = {0};

    /* "src/lxml/lxml.objectify.pyx":1711
 * objectify_parser = __DEFAULT_PARSER
 * 
 * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
 *     u"""set_default_parser(new_parser = None)
 * 
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_parser);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_parser = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_28set_default_parser(__pyx_self, __pyx_v_new_parser);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "src/lxml/lxml.objectify.pyx":1722
 *     """
 *     global objectify_parser
 *     if new_parser is None:             # <<<<<<<<<<<<<<
 *         objectify_parser = __DEFAULT_PARSER
 *     elif isinstance(new_parser, etree.XMLParser):
 */
  __pyx_t_1 = (__pyx_v_new_parser == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1723
 *     global objectify_parser
 *     if new_parser is None:
 *         objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
 *     elif isinstance(new_parser, etree.XMLParser):
 *         objectify_parser = new_parser
 */
    __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
    __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;
    goto __pyx_L3;
  }

  /* "src/lxml/lxml.objectify.pyx":1724
 *     if new_parser is None:
 *         objectify_parser = __DEFAULT_PARSER
 *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<<
 *         objectify_parser = new_parser
 *     else:
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_new_parser, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1725
 *         objectify_parser = __DEFAULT_PARSER
 *     elif isinstance(new_parser, etree.XMLParser):
 *         objectify_parser = new_parser             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
 */
    __Pyx_INCREF(__pyx_v_new_parser);
    __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_GIVEREF(__pyx_v_new_parser);
    __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_new_parser;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1727
 *         objectify_parser = new_parser
 *     else:
 *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"             # <<<<<<<<<<<<<<
 * 
 * def makeparser(**kw):
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_47), 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_31makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_30makeparser[] = "makeparser(remove_blank_text=True, **kw)\n\n    Create a new XML parser for objectify trees.\n\n    You can pass all keyword arguments that are supported by\n    ``etree.XMLParser()``.  Note that this parser defaults to removing\n    blank text.  You can disable this by passing the\n    ``remove_blank_text`` boolean keyword option yourself.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_31makeparser = {__Pyx_NAMESTR("makeparser"), (PyCFunction)__pyx_pw_4lxml_9objectify_31makeparser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_30makeparser)};
static PyObject *__pyx_pw_4lxml_9objectify_31makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("makeparser (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("makeparser", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "makeparser", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __pyx_r = __pyx_pf_4lxml_9objectify_30makeparser(__pyx_self, __pyx_v_kw);
  __Pyx_XDECREF(__pyx_v_kw);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1729
 *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
 * 
 * def makeparser(**kw):             # <<<<<<<<<<<<<<
 *     u"""makeparser(remove_blank_text=True, **kw)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_parser = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("makeparser", 0);

  /* "src/lxml/lxml.objectify.pyx":1739
 *     ``remove_blank_text`` boolean keyword option yourself.
 *     """
 *     if 'remove_blank_text' not in kw:             # <<<<<<<<<<<<<<
 *         kw['remove_blank_text'] = True
 *     parser = etree.XMLParser(**kw)
 */
  __pyx_t_1 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_kw), ((PyObject *)__pyx_n_s__remove_blank_text)))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1740
 *     """
 *     if 'remove_blank_text' not in kw:
 *         kw['remove_blank_text'] = True             # <<<<<<<<<<<<<<
 *     parser = etree.XMLParser(**kw)
 *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
 */
    __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(((PyObject *)__pyx_v_kw), ((PyObject *)__pyx_n_s__remove_blank_text), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1741
 *     if 'remove_blank_text' not in kw:
 *         kw['remove_blank_text'] = True
 *     parser = etree.XMLParser(**kw)             # <<<<<<<<<<<<<<
 *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
 *     return parser
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = ((PyObject *)__pyx_v_kw);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_parser = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1742
 *         kw['remove_blank_text'] = True
 *     parser = etree.XMLParser(**kw)
 *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
 *     return parser
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_s_48); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/lxml/lxml.objectify.pyx":1743
 *     parser = etree.XMLParser(**kw)
 *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
 *     return parser             # <<<<<<<<<<<<<<
 * 
 * cdef _Element _makeElement(tag, text, attrib, nsmap):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_parser);
  __pyx_r = __pyx_v_parser;
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify.makeparser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/lxml/lxml.objectify.pyx":1745
 *     return parser
 * 
 * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<<
 *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
 * 
 */

static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx_v_tag, PyObject *__pyx_v_text, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) {
  struct LxmlElement *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_makeElement", 0);

  /* "src/lxml/lxml.objectify.pyx":1746
 * 
 * cdef _Element _makeElement(tag, text, attrib, nsmap):
 *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_4lxml_9objectify_objectify_parser;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = Py_None;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)__pyx_t_1), __pyx_t_2, __pyx_v_text, __pyx_t_3, __pyx_v_attrib, __pyx_v_nsmap)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = ((struct LxmlElement *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct LxmlElement *)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("lxml.objectify._makeElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_32fromstring[] = "fromstring(xml, parser=None, base_url=None)\n\n    Objectify specific version of the lxml.etree fromstring() function\n    that uses the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword argument allows to set the original base URL of\n    the document to support relative Paths when looking up external entities\n    (DTD, XInclude, ...).\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_33fromstring = {__Pyx_NAMESTR("fromstring"), (PyCFunction)__pyx_pw_4lxml_9objectify_33fromstring, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_32fromstring)};
static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_xml = 0;
  PyObject *__pyx_v_parser = 0;
  PyObject *__pyx_v_base_url = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromstring (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__xml,&__pyx_n_s__parser,&__pyx_n_s__base_url,0};
    PyObject* values[3] = {0,0,0};

    /* "src/lxml/lxml.objectify.pyx":1756
 * SubElement = etree.SubElement
 * 
 * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""fromstring(xml, parser=None, base_url=None)
 * 
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    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__xml)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 2;
        PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_xml = values[0];
    __pyx_v_parser = values[1];
    __pyx_v_base_url = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_32fromstring(__pyx_self, __pyx_v_xml, __pyx_v_parser, __pyx_v_base_url);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromstring", 0);
  __Pyx_INCREF(__pyx_v_parser);

  /* "src/lxml/lxml.objectify.pyx":1768
 *     (DTD, XInclude, ...).
 *     """
 *     if parser is None:             # <<<<<<<<<<<<<<
 *         parser = objectify_parser
 *     return _fromstring(xml, parser, base_url=base_url)
 */
  __pyx_t_1 = (__pyx_v_parser == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1769
 *     """
 *     if parser is None:
 *         parser = objectify_parser             # <<<<<<<<<<<<<<
 *     return _fromstring(xml, parser, base_url=base_url)
 * 
 */
    __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_DECREF(__pyx_v_parser);
    __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1770
 *     if parser is None:
 *         parser = objectify_parser
 *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
 * 
 * def XML(xml, parser=None, *, base_url=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_xml);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xml);
  __Pyx_GIVEREF(__pyx_v_xml);
  __Pyx_INCREF(__pyx_v_parser);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
  __Pyx_GIVEREF(__pyx_v_parser);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__base_url), __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_34XML[] = "XML(xml, parser=None, base_url=None)\n\n    Objectify specific version of the lxml.etree XML() literal factory\n    that uses the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword argument allows to set the original base URL of\n    the document to support relative Paths when looking up external entities\n    (DTD, XInclude, ...).\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_35XML = {__Pyx_NAMESTR("XML"), (PyCFunction)__pyx_pw_4lxml_9objectify_35XML, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_34XML)};
static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_xml = 0;
  PyObject *__pyx_v_parser = 0;
  PyObject *__pyx_v_base_url = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("XML (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__xml,&__pyx_n_s__parser,&__pyx_n_s__base_url,0};
    PyObject* values[3] = {0,0,0};

    /* "src/lxml/lxml.objectify.pyx":1772
 *     return _fromstring(xml, parser, base_url=base_url)
 * 
 * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""XML(xml, parser=None, base_url=None)
 * 
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    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__xml)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 2;
        PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_xml = values[0];
    __pyx_v_parser = values[1];
    __pyx_v_base_url = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_34XML(__pyx_self, __pyx_v_xml, __pyx_v_parser, __pyx_v_base_url);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("XML", 0);
  __Pyx_INCREF(__pyx_v_parser);

  /* "src/lxml/lxml.objectify.pyx":1784
 *     (DTD, XInclude, ...).
 *     """
 *     if parser is None:             # <<<<<<<<<<<<<<
 *         parser = objectify_parser
 *     return _fromstring(xml, parser, base_url=base_url)
 */
  __pyx_t_1 = (__pyx_v_parser == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1785
 *     """
 *     if parser is None:
 *         parser = objectify_parser             # <<<<<<<<<<<<<<
 *     return _fromstring(xml, parser, base_url=base_url)
 * 
 */
    __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_DECREF(__pyx_v_parser);
    __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1786
 *     if parser is None:
 *         parser = objectify_parser
 *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
 * 
 * cdef object _parse
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_xml);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xml);
  __Pyx_GIVEREF(__pyx_v_xml);
  __Pyx_INCREF(__pyx_v_parser);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
  __Pyx_GIVEREF(__pyx_v_parser);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__base_url), __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_36parse[] = "parse(f, parser=None, base_url=None)\n\n    Parse a file or file-like object with the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword allows setting a URL for the document\n    when parsing from a file-like object.  This is needed when looking\n    up external entities (DTD, XInclude, ...) with relative paths.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_37parse = {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pw_4lxml_9objectify_37parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_36parse)};
static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_parser = 0;
  PyObject *__pyx_v_base_url = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__f,&__pyx_n_s__parser,&__pyx_n_s__base_url,0};
    PyObject* values[3] = {0,0,0};

    /* "src/lxml/lxml.objectify.pyx":1791
 * _parse = etree.parse
 * 
 * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""parse(f, parser=None, base_url=None)
 * 
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    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__f)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 2;
        PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_f = values[0];
    __pyx_v_parser = values[1];
    __pyx_v_base_url = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_36parse(__pyx_self, __pyx_v_f, __pyx_v_parser, __pyx_v_base_url);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse", 0);
  __Pyx_INCREF(__pyx_v_parser);

  /* "src/lxml/lxml.objectify.pyx":1802
 *     up external entities (DTD, XInclude, ...) with relative paths.
 *     """
 *     if parser is None:             # <<<<<<<<<<<<<<
 *         parser = objectify_parser
 *     return _parse(f, parser, base_url=base_url)
 */
  __pyx_t_1 = (__pyx_v_parser == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1803
 *     """
 *     if parser is None:
 *         parser = objectify_parser             # <<<<<<<<<<<<<<
 *     return _parse(f, parser, base_url=base_url)
 * 
 */
    __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __Pyx_DECREF(__pyx_v_parser);
    __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1804
 *     if parser is None:
 *         parser = objectify_parser
 *     return _parse(f, parser, base_url=base_url)             # <<<<<<<<<<<<<<
 * 
 * cdef dict _DEFAULT_NSMAP = {
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_f);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_INCREF(__pyx_v_parser);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
  __Pyx_GIVEREF(__pyx_v_parser);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__base_url), __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_9objectify__parse, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_38Element[] = "Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)\n\n    Objectify specific version of the lxml.etree Element() factory that\n    always creates a structural (tree) element.\n\n    NOTE: requires parser based element class lookup activated in lxml.etree!\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_39Element = {__Pyx_NAMESTR("Element"), (PyCFunction)__pyx_pw_4lxml_9objectify_39Element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_38Element)};
static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v__tag = 0;
  PyObject *__pyx_v_attrib = 0;
  PyObject *__pyx_v_nsmap = 0;
  PyObject *__pyx_v__pytype = 0;
  PyObject *__pyx_v__attributes = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Element (wrapper)", 0);
  __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
  __Pyx_GOTREF(__pyx_v__attributes);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s___tag,&__pyx_n_s__attrib,&__pyx_n_s__nsmap,&__pyx_n_s___pytype,0};
    PyObject* values[4] = {0,0,0,0};

    /* "src/lxml/lxml.objectify.pyx":1814
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
 *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
 * 
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    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___tag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attrib);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nsmap);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 3;
        PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "Element") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v__tag = values[0];
    __pyx_v_attrib = values[1];
    __pyx_v_nsmap = values[2];
    __pyx_v__pytype = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0;
  __Pyx_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_38Element(__pyx_self, __pyx_v__tag, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__pytype, __pyx_v__attributes);
  __Pyx_XDECREF(__pyx_v__attributes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__attributes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Element", 0);
  __Pyx_INCREF(__pyx_v_nsmap);
  __Pyx_INCREF(__pyx_v__pytype);
  __Pyx_INCREF(__pyx_v__attributes);

  /* "src/lxml/lxml.objectify.pyx":1822
 *     NOTE: requires parser based element class lookup activated in lxml.etree!
 *     """
 *     if attrib is not None:             # <<<<<<<<<<<<<<
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)
 */
  __pyx_t_1 = (__pyx_v_attrib != Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1823
 *     """
 *     if attrib is not None:
 *         if python.PyDict_Size(_attributes):             # <<<<<<<<<<<<<<
 *             attrib.update(_attributes)
 *         _attributes = attrib
 */
    __pyx_t_2 = PyDict_Size(__pyx_v__attributes);
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":1824
 *     if attrib is not None:
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
 *         _attributes = attrib
 *     if _pytype is None:
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_s__update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v__attributes);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__attributes);
      __Pyx_GIVEREF(__pyx_v__attributes);
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "src/lxml/lxml.objectify.pyx":1825
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)
 *         _attributes = attrib             # <<<<<<<<<<<<<<
 *     if _pytype is None:
 *         _pytype = TREE_PYTYPE_NAME
 */
    __Pyx_INCREF(__pyx_v_attrib);
    __Pyx_DECREF(__pyx_v__attributes);
    __pyx_v__attributes = __pyx_v_attrib;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1826
 *             attrib.update(_attributes)
 *         _attributes = attrib
 *     if _pytype is None:             # <<<<<<<<<<<<<<
 *         _pytype = TREE_PYTYPE_NAME
 *     if nsmap is None:
 */
  __pyx_t_1 = (__pyx_v__pytype == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1827
 *         _attributes = attrib
 *     if _pytype is None:
 *         _pytype = TREE_PYTYPE_NAME             # <<<<<<<<<<<<<<
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 */
    __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
    __Pyx_DECREF(__pyx_v__pytype);
    __pyx_v__pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "src/lxml/lxml.objectify.pyx":1828
 *     if _pytype is None:
 *         _pytype = TREE_PYTYPE_NAME
 *     if nsmap is None:             # <<<<<<<<<<<<<<
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
 */
  __pyx_t_1 = (__pyx_v_nsmap == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1829
 *         _pytype = TREE_PYTYPE_NAME
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
 *     return _makeElement(_tag, None, _attributes, nsmap)
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
    __Pyx_DECREF(__pyx_v_nsmap);
    __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "src/lxml/lxml.objectify.pyx":1830
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_v__attributes, __pyx_t_5, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/lxml/lxml.objectify.pyx":1831
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
 *     return _makeElement(_tag, None, _attributes, nsmap)             # <<<<<<<<<<<<<<
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = Py_None;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, __pyx_t_5, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attributes);
  __Pyx_XDECREF(__pyx_v_nsmap);
  __Pyx_XDECREF(__pyx_v__pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_40DataElement[] = "DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)\n\n    Create a new element from a Python value and XML attributes taken from\n    keyword arguments or a dictionary passed as second argument.\n\n    Automatically adds a 'pytype' attribute for the Python type of the value,\n    if the type can be identified.  If '_pytype' or '_xsi' are among the\n    keyword arguments, they will be used instead.\n\n    If the _value argument is an ObjectifiedDataElement instance, its py:pytype,\n    xsi:type and other attributes and nsmap are reused unless they are redefined\n    in attrib and/or keyword arguments.\n    ";
static PyMethodDef __pyx_mdef_4lxml_9objectify_41DataElement = {__Pyx_NAMESTR("DataElement"), (PyCFunction)__pyx_pw_4lxml_9objectify_41DataElement, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_40DataElement)};
static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v__value = 0;
  PyObject *__pyx_v_attrib = 0;
  PyObject *__pyx_v_nsmap = 0;
  PyObject *__pyx_v__pytype = 0;
  PyObject *__pyx_v__xsi = 0;
  PyObject *__pyx_v__attributes = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DataElement (wrapper)", 0);
  __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
  __Pyx_GOTREF(__pyx_v__attributes);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s___value,&__pyx_n_s__attrib,&__pyx_n_s__nsmap,&__pyx_n_s___pytype,&__pyx_n_s___xsi,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "src/lxml/lxml.objectify.pyx":1833
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
 *                 **_attributes):
 *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    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___value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attrib);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nsmap);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (kw_args > 0 && (kw_args <= 2)) {
        Py_ssize_t index;
        for (index = 3; index < 5 && kw_args > 0; index++) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
          if (value) { values[index] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "DataElement") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v__value = values[0];
    __pyx_v_attrib = values[1];
    __pyx_v_nsmap = values[2];
    __pyx_v__pytype = values[3];
    __pyx_v__xsi = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0;
  __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_40DataElement(__pyx_self, __pyx_v__value, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__pytype, __pyx_v__xsi, __pyx_v__attributes);
  __Pyx_XDECREF(__pyx_v__attributes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__value, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__xsi, PyObject *__pyx_v__attributes) {
  PyObject *__pyx_v_dict_result;
  PyObject *__pyx_v_temp = NULL;
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_v_strval = NULL;
  PyObject *__pyx_v_stringify = NULL;
  PyObject *__pyx_v_type_check = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DataElement", 0);
  __Pyx_INCREF(__pyx_v_attrib);
  __Pyx_INCREF(__pyx_v_nsmap);
  __Pyx_INCREF(__pyx_v__pytype);
  __Pyx_INCREF(__pyx_v__xsi);
  __Pyx_INCREF(__pyx_v__attributes);

  /* "src/lxml/lxml.objectify.pyx":1849
 *     """
 *     cdef python.PyObject* dict_result
 *     if nsmap is None:             # <<<<<<<<<<<<<<
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:
 */
  __pyx_t_1 = (__pyx_v_nsmap == Py_None);
  if (__pyx_t_1) {

    /* "src/lxml/lxml.objectify.pyx":1850
 *     cdef python.PyObject* dict_result
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
 *     if attrib is not None and attrib:
 *         if _attributes:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
    __Pyx_DECREF(__pyx_v_nsmap);
    __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "src/lxml/lxml.objectify.pyx":1851
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
 *         if _attributes:
 *             attrib = dict(attrib)
 */
  __pyx_t_1 = (__pyx_v_attrib != Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1852
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:
 *         if _attributes:             # <<<<<<<<<<<<<<
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1853
 *     if attrib is not None and attrib:
 *         if _attributes:
 *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
 *             attrib.update(_attributes)
 *         _attributes = attrib
 */
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_attrib);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_attrib);
      __Pyx_GIVEREF(__pyx_v_attrib);
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_attrib);
      __pyx_v_attrib = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "src/lxml/lxml.objectify.pyx":1854
 *         if _attributes:
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_s__update); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v__attributes);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__attributes);
      __Pyx_GIVEREF(__pyx_v__attributes);
      __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "src/lxml/lxml.objectify.pyx":1855
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)
 *         _attributes = attrib             # <<<<<<<<<<<<<<
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:
 */
    __Pyx_INCREF(__pyx_v_attrib);
    __Pyx_DECREF(__pyx_v__attributes);
    __pyx_v__attributes = __pyx_v_attrib;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "src/lxml/lxml.objectify.pyx":1856
 *             attrib.update(_attributes)
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<<
 *         if _pytype is None:
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
 */
  __pyx_t_6 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v__value, __pyx_t_6); 
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1857
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:             # <<<<<<<<<<<<<<
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
 *                 # special case: no change!
 */
    __pyx_t_3 = (__pyx_v__pytype == Py_None);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1858
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
 *                 # special case: no change!
 *                 return _value.__copy__()
 */
      __pyx_t_3 = (__pyx_v__xsi == Py_None);
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = (!__pyx_t_1);
        if (__pyx_t_2) {
          __pyx_t_1 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
          __pyx_t_7 = __pyx_t_1;
        } else {
          __pyx_t_7 = __pyx_t_2;
        }
        __pyx_t_2 = __pyx_t_7;
      } else {
        __pyx_t_2 = __pyx_t_3;
      }
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":1860
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
 *                 # special case: no change!
 *                 return _value.__copy__()             # <<<<<<<<<<<<<<
 *     if isinstance(_value, ObjectifiedDataElement):
 *         # reuse existing nsmap unless redefined in nsmap parameter
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = PyObject_GetAttr(__pyx_v__value, __pyx_n_s____copy__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
        goto __pyx_L8;
      }
      __pyx_L8:;
      goto __pyx_L7;
    }
    __pyx_L7:;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "src/lxml/lxml.objectify.pyx":1861
 *                 # special case: no change!
 *                 return _value.__copy__()
 *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap
 */
  __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement));
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__value, __pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":1863
 *     if isinstance(_value, ObjectifiedDataElement):
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap             # <<<<<<<<<<<<<<
 *         if temp is not None and temp:
 *             temp = dict(temp)
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v__value, __pyx_n_s__nsmap); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_temp = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "src/lxml/lxml.objectify.pyx":1864
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap
 *         if temp is not None and temp:             # <<<<<<<<<<<<<<
 *             temp = dict(temp)
 *             temp.update(nsmap)
 */
    __pyx_t_2 = (__pyx_v_temp != Py_None);
    if (__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __pyx_t_3;
    } else {
      __pyx_t_7 = __pyx_t_2;
    }
    if (__pyx_t_7) {

      /* "src/lxml/lxml.objectify.pyx":1865
 *         temp = _value.nsmap
 *         if temp is not None and temp:
 *             temp = dict(temp)             # <<<<<<<<<<<<<<
 *             temp.update(nsmap)
 *             nsmap = temp
 */
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_temp);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_temp);
      __Pyx_GIVEREF(__pyx_v_temp);
      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_temp);
      __pyx_v_temp = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1866
 *         if temp is not None and temp:
 *             temp = dict(temp)
 *             temp.update(nsmap)             # <<<<<<<<<<<<<<
 *             nsmap = temp
 *         # reuse existing attributes unless redefined in attrib/_attributes
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_s__update); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_nsmap);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_nsmap);
      __Pyx_GIVEREF(__pyx_v_nsmap);
      __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/lxml/lxml.objectify.pyx":1867
 *             temp = dict(temp)
 *             temp.update(nsmap)
 *             nsmap = temp             # <<<<<<<<<<<<<<
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib
 */
      __Pyx_INCREF(__pyx_v_temp);
      __Pyx_DECREF(__pyx_v_nsmap);
      __pyx_v_nsmap = __pyx_v_temp;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "src/lxml/lxml.objectify.pyx":1869
 *             nsmap = temp
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib             # <<<<<<<<<<<<<<
 *         if temp is not None and temp:
 *             temp = dict(temp)
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v__value, __pyx_n_s__attrib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_v_temp);
    __pyx_v_temp = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "src/lxml/lxml.objectify.pyx":1870
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib
 *         if temp is not None and temp:             # <<<<<<<<<<<<<<
 *             temp = dict(temp)
 *             temp.update(_attributes)
 */
    __pyx_t_7 = (__pyx_v_temp != Py_None);
    if (__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_7;
    }
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1871
 *         temp = _value.attrib
 *         if temp is not None and temp:
 *             temp = dict(temp)             # <<<<<<<<<<<<<<
 *             temp.update(_attributes)
 *             _attributes = temp
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_temp);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_temp);
      __Pyx_GIVEREF(__pyx_v_temp);
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_temp);
      __pyx_v_temp = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "src/lxml/lxml.objectify.pyx":1872
 *         if temp is not None and temp:
 *             temp = dict(temp)
 *             temp.update(_attributes)             # <<<<<<<<<<<<<<
 *             _attributes = temp
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_s__update); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v__attributes);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__attributes);
      __Pyx_GIVEREF(__pyx_v__attributes);
      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1873
 *             temp = dict(temp)
 *             temp.update(_attributes)
 *             _attributes = temp             # <<<<<<<<<<<<<<
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 *         # arguments
 */
      __Pyx_INCREF(__pyx_v_temp);
      __Pyx_DECREF(__pyx_v__attributes);
      __pyx_v__attributes = __pyx_v_temp;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "src/lxml/lxml.objectify.pyx":1876
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 *         # arguments
 *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<<
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 */
    __pyx_t_3 = (__pyx_v__xsi == Py_None);
    if (__pyx_t_3) {
      __pyx_t_7 = (__pyx_v__pytype == Py_None);
      __pyx_t_2 = __pyx_t_7;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":1878
 *         if _xsi is None and _pytype is None:
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
 *             if dict_result is not NULL:
 *                 _xsi = <object>dict_result
 */
      __pyx_t_6 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1879
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 */
      __pyx_t_2 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":1880
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *             if dict_result is not NULL:
 *                 _xsi = <object>dict_result             # <<<<<<<<<<<<<<
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:
 */
        __Pyx_INCREF(((PyObject *)__pyx_v_dict_result));
        __Pyx_DECREF(__pyx_v__xsi);
        __pyx_v__xsi = ((PyObject *)__pyx_v_dict_result);
        goto __pyx_L13;
      }
      __pyx_L13:;

      /* "src/lxml/lxml.objectify.pyx":1881
 *             if dict_result is not NULL:
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
 *             if dict_result is not NULL:
 *                 _pytype = <object>dict_result
 */
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1882
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                 _pytype = <object>dict_result
 * 
 */
      __pyx_t_2 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":1883
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:
 *                 _pytype = <object>dict_result             # <<<<<<<<<<<<<<
 * 
 *     if _xsi is not None:
 */
        __Pyx_INCREF(((PyObject *)__pyx_v_dict_result));
        __Pyx_DECREF(__pyx_v__pytype);
        __pyx_v__pytype = ((PyObject *)__pyx_v_dict_result);
        goto __pyx_L14;
      }
      __pyx_L14:;
      goto __pyx_L12;
    }
    __pyx_L12:;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "src/lxml/lxml.objectify.pyx":1885
 *                 _pytype = <object>dict_result
 * 
 *     if _xsi is not None:             # <<<<<<<<<<<<<<
 *         if u':' in _xsi:
 *             prefix, name = _xsi.split(u':', 1)
 */
  __pyx_t_2 = (__pyx_v__xsi != Py_None);
  if (__pyx_t_2) {

    /* "src/lxml/lxml.objectify.pyx":1886
 * 
 *     if _xsi is not None:
 *         if u':' in _xsi:             # <<<<<<<<<<<<<<
 *             prefix, name = _xsi.split(u':', 1)
 *             ns = nsmap.get(prefix)
 */
    __pyx_t_2 = ((PySequence_Contains(__pyx_v__xsi, ((PyObject *)__pyx_kp_u_35)))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":1887
 *     if _xsi is not None:
 *         if u':' in _xsi:
 *             prefix, name = _xsi.split(u':', 1)             # <<<<<<<<<<<<<<
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v__xsi, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L17_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L18_unpacking_done;
        __pyx_L17_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L18_unpacking_done:;
      }
      __pyx_v_prefix = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_v_name = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "src/lxml/lxml.objectify.pyx":1888
 *         if u':' in _xsi:
 *             prefix, name = _xsi.split(u':', 1)
 *             ns = nsmap.get(prefix)             # <<<<<<<<<<<<<<
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, u"XSD types require the XSD namespace"
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_s__get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_prefix);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_prefix);
      __Pyx_GIVEREF(__pyx_v_prefix);
      __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_v_ns = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1889
 *             prefix, name = _xsi.split(u':', 1)
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
 *                 raise ValueError, u"XSD types require the XSD namespace"
 *         elif nsmap is _DEFAULT_NSMAP:
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":1890
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi
 */
        __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_50), 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L19;
      }
      __pyx_L19:;
      goto __pyx_L16;
    }

    /* "src/lxml/lxml.objectify.pyx":1891
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, u"XSD types require the XSD namespace"
 *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
 *             name = _xsi
 *             _xsi = u'xsd:' + _xsi
 */
    __pyx_t_2 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":1892
 *                 raise ValueError, u"XSD types require the XSD namespace"
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi             # <<<<<<<<<<<<<<
 *             _xsi = u'xsd:' + _xsi
 *         else:
 */
      __Pyx_INCREF(__pyx_v__xsi);
      __pyx_v_name = __pyx_v__xsi;

      /* "src/lxml/lxml.objectify.pyx":1893
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi
 *             _xsi = u'xsd:' + _xsi             # <<<<<<<<<<<<<<
 *         else:
 *             name = _xsi
 */
      __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_u_51), __pyx_v__xsi); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_v__xsi);
      __pyx_v__xsi = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L16;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":1895
 *             _xsi = u'xsd:' + _xsi
 *         else:
 *             name = _xsi             # <<<<<<<<<<<<<<
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:
 */
      __Pyx_INCREF(__pyx_v__xsi);
      __pyx_v_name = __pyx_v__xsi;

      /* "src/lxml/lxml.objectify.pyx":1896
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_s__items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_6)) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++;
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          #endif
        } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_6)) {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++;
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          #endif
        } else {
          __pyx_t_4 = __pyx_t_11(__pyx_t_6);
          if (unlikely(!__pyx_t_4)) {
            if (PyErr_Occurred()) {
              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __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_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        {
          Py_ssize_t index = -1;
          __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_9 = Py_TYPE(__pyx_t_12)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L22_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_12); if (unlikely(!__pyx_t_8)) goto __pyx_L22_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L23_unpacking_done;
          __pyx_L22_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L23_unpacking_done:;
        }
        __Pyx_XDECREF(__pyx_v_prefix);
        __pyx_v_prefix = __pyx_t_5;
        __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_v_ns);
        __pyx_v_ns = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "src/lxml/lxml.objectify.pyx":1897
 *             name = _xsi
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + u':' + _xsi
 */
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_2) {

          /* "src/lxml/lxml.objectify.pyx":1898
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<<
 *                         _xsi = prefix + u':' + _xsi
 *                     break
 */
          __pyx_t_2 = (__pyx_v_prefix != Py_None);
          if (__pyx_t_2) {
            __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_7 = __pyx_t_3;
          } else {
            __pyx_t_7 = __pyx_t_2;
          }
          if (__pyx_t_7) {

            /* "src/lxml/lxml.objectify.pyx":1899
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + u':' + _xsi             # <<<<<<<<<<<<<<
 *                     break
 *             else:
 */
            __pyx_t_4 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_u_35)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_v__xsi); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_v__xsi);
            __pyx_v__xsi = __pyx_t_8;
            __pyx_t_8 = 0;
            goto __pyx_L25;
          }
          __pyx_L25:;

          /* "src/lxml/lxml.objectify.pyx":1900
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + u':' + _xsi
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError, u"XSD types require the XSD namespace"
 */
          goto __pyx_L21_break;
          goto __pyx_L24;
        }
        __pyx_L24:;
      }
      /*else*/ {

        /* "src/lxml/lxml.objectify.pyx":1902
 *                     break
 *             else:
 *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
 *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
 *         if _pytype is None:
 */
        __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_50), 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L21_break:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L16:;

    /* "src/lxml/lxml.objectify.pyx":1903
 *             else:
 *                 raise ValueError, u"XSD types require the XSD namespace"
 *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi             # <<<<<<<<<<<<<<
 *         if _pytype is None:
 *             # allow using unregistered or even wrong xsi:type names
 */
    if (PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_v__xsi) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "src/lxml/lxml.objectify.pyx":1904
 *                 raise ValueError, u"XSD types require the XSD namespace"
 *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
 *         if _pytype is None:             # <<<<<<<<<<<<<<
 *             # allow using unregistered or even wrong xsi:type names
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
 */
    __pyx_t_7 = (__pyx_v__pytype == Py_None);
    if (__pyx_t_7) {

      /* "src/lxml/lxml.objectify.pyx":1906
 *         if _pytype is None:
 *             # allow using unregistered or even wrong xsi:type names
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)             # <<<<<<<<<<<<<<
 *             if dict_result is NULL:
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 */
      __pyx_t_6 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_dict_result = PyDict_GetItem(__pyx_t_6, __pyx_v__xsi);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/lxml/lxml.objectify.pyx":1907
 *             # allow using unregistered or even wrong xsi:type names
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
 *             if dict_result is NULL:             # <<<<<<<<<<<<<<
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:
 */
      __pyx_t_7 = (__pyx_v_dict_result == NULL);
      if (__pyx_t_7) {

        /* "src/lxml/lxml.objectify.pyx":1908
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
 *             if dict_result is NULL:
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)             # <<<<<<<<<<<<<<
 *             if dict_result is not NULL:
 *                 _pytype = (<PyType>dict_result).name
 */
        __pyx_t_6 = ((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_v_dict_result = PyDict_GetItem(__pyx_t_6, __pyx_v_name);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L28;
      }
      __pyx_L28:;

      /* "src/lxml/lxml.objectify.pyx":1909
 *             if dict_result is NULL:
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                 _pytype = (<PyType>dict_result).name
 * 
 */
      __pyx_t_7 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_7) {

        /* "src/lxml/lxml.objectify.pyx":1910
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:
 *                 _pytype = (<PyType>dict_result).name             # <<<<<<<<<<<<<<
 * 
 *     if _pytype is None:
 */
        __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->name);
        __Pyx_DECREF(__pyx_v__pytype);
        __pyx_v__pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->name;
        goto __pyx_L29;
      }
      __pyx_L29:;
      goto __pyx_L27;
    }
    __pyx_L27:;
    goto __pyx_L15;
  }
  __pyx_L15:;

  /* "src/lxml/lxml.objectify.pyx":1912
 *                 _pytype = (<PyType>dict_result).name
 * 
 *     if _pytype is None:             # <<<<<<<<<<<<<<
 *         _pytype = _pytypename(_value)
 * 
 */
  __pyx_t_7 = (__pyx_v__pytype == Py_None);
  if (__pyx_t_7) {

    /* "src/lxml/lxml.objectify.pyx":1913
 * 
 *     if _pytype is None:
 *         _pytype = _pytypename(_value)             # <<<<<<<<<<<<<<
 * 
 *     if _value is None and _pytype != u"str":
 */
    __pyx_t_6 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_v__pytype);
    __pyx_v__pytype = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L30;
  }
  __pyx_L30:;

  /* "src/lxml/lxml.objectify.pyx":1915
 *         _pytype = _pytypename(_value)
 * 
 *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
 *         _pytype = _pytype or u"NoneType"
 *         strval = None
 */
  __pyx_t_7 = (__pyx_v__value == Py_None);
  if (__pyx_t_7) {
    __pyx_t_2 = __Pyx_PyUnicode_Equals(__pyx_v__pytype, ((PyObject *)__pyx_n_u__str), Py_NE); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_7;
  }
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1916
 * 
 *     if _value is None and _pytype != u"str":
 *         _pytype = _pytype or u"NoneType"             # <<<<<<<<<<<<<<
 *         strval = None
 *     elif python._isString(_value):
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_3) {
      __Pyx_INCREF(((PyObject *)__pyx_n_u__NoneType));
      __pyx_t_6 = __pyx_n_u__NoneType;
    } else {
      __Pyx_INCREF(__pyx_v__pytype);
      __pyx_t_6 = __pyx_v__pytype;
    }
    __Pyx_DECREF(__pyx_v__pytype);
    __pyx_v__pytype = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":1917
 *     if _value is None and _pytype != u"str":
 *         _pytype = _pytype or u"NoneType"
 *         strval = None             # <<<<<<<<<<<<<<
 *     elif python._isString(_value):
 *         strval = _value
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_strval = Py_None;
    goto __pyx_L31;
  }

  /* "src/lxml/lxml.objectify.pyx":1918
 *         _pytype = _pytype or u"NoneType"
 *         strval = None
 *     elif python._isString(_value):             # <<<<<<<<<<<<<<
 *         strval = _value
 *     elif isinstance(_value, bool):
 */
  __pyx_t_3 = _isString(__pyx_v__value);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1919
 *         strval = None
 *     elif python._isString(_value):
 *         strval = _value             # <<<<<<<<<<<<<<
 *     elif isinstance(_value, bool):
 *         if _value:
 */
    __Pyx_INCREF(__pyx_v__value);
    __pyx_v_strval = __pyx_v__value;
    goto __pyx_L31;
  }

  /* "src/lxml/lxml.objectify.pyx":1920
 *     elif python._isString(_value):
 *         strval = _value
 *     elif isinstance(_value, bool):             # <<<<<<<<<<<<<<
 *         if _value:
 *             strval = u"true"
 */
  __pyx_t_6 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v__value, __pyx_t_6); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1921
 *         strval = _value
 *     elif isinstance(_value, bool):
 *         if _value:             # <<<<<<<<<<<<<<
 *             strval = u"true"
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1922
 *     elif isinstance(_value, bool):
 *         if _value:
 *             strval = u"true"             # <<<<<<<<<<<<<<
 *         else:
 *             strval = u"false"
 */
      __Pyx_INCREF(((PyObject *)__pyx_n_u__true));
      __pyx_v_strval = ((PyObject *)__pyx_n_u__true);
      goto __pyx_L32;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":1924
 *             strval = u"true"
 *         else:
 *             strval = u"false"             # <<<<<<<<<<<<<<
 *     else:
 *         stringify = unicode
 */
      __Pyx_INCREF(((PyObject *)__pyx_n_u__false));
      __pyx_v_strval = ((PyObject *)__pyx_n_u__false);
    }
    __pyx_L32:;
    goto __pyx_L31;
  }
  /*else*/ {

    /* "src/lxml/lxml.objectify.pyx":1926
 *             strval = u"false"
 *     else:
 *         stringify = unicode             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *         if dict_result is not NULL:
 */
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyUnicode_Type))));
    __pyx_v_stringify = ((PyObject *)((PyObject*)(&PyUnicode_Type)));

    /* "src/lxml/lxml.objectify.pyx":1927
 *     else:
 *         stringify = unicode
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)             # <<<<<<<<<<<<<<
 *         if dict_result is not NULL:
 *             stringify = (<PyType>dict_result).stringify
 */
    __pyx_t_6 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_v_dict_result = PyDict_GetItem(__pyx_t_6, __pyx_v__pytype);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "src/lxml/lxml.objectify.pyx":1928
 *         stringify = unicode
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *         if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *             stringify = (<PyType>dict_result).stringify
 *         strval = stringify(_value)
 */
    __pyx_t_3 = (__pyx_v_dict_result != NULL);
    if (__pyx_t_3) {

      /* "src/lxml/lxml.objectify.pyx":1929
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *         if dict_result is not NULL:
 *             stringify = (<PyType>dict_result).stringify             # <<<<<<<<<<<<<<
 *         strval = stringify(_value)
 * 
 */
      __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->stringify);
      __Pyx_DECREF(__pyx_v_stringify);
      __pyx_v_stringify = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->stringify;
      goto __pyx_L33;
    }
    __pyx_L33:;

    /* "src/lxml/lxml.objectify.pyx":1930
 *         if dict_result is not NULL:
 *             stringify = (<PyType>dict_result).stringify
 *         strval = stringify(_value)             # <<<<<<<<<<<<<<
 * 
 *     if _pytype is not None:
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v__value);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__value);
    __Pyx_GIVEREF(__pyx_v__value);
    __pyx_t_8 = PyObject_Call(__pyx_v_stringify, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_v_strval = __pyx_t_8;
    __pyx_t_8 = 0;
  }
  __pyx_L31:;

  /* "src/lxml/lxml.objectify.pyx":1932
 *         strval = stringify(_value)
 * 
 *     if _pytype is not None:             # <<<<<<<<<<<<<<
 *         if _pytype == u"NoneType" or _pytype == u"none":
 *             strval = None
 */
  __pyx_t_3 = (__pyx_v__pytype != Py_None);
  if (__pyx_t_3) {

    /* "src/lxml/lxml.objectify.pyx":1933
 * 
 *     if _pytype is not None:
 *         if _pytype == u"NoneType" or _pytype == u"none":             # <<<<<<<<<<<<<<
 *             strval = None
 *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
 */
    __pyx_t_3 = __Pyx_PyUnicode_Equals(__pyx_v__pytype, ((PyObject *)__pyx_n_u__NoneType), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_3) {
      __pyx_t_7 = __Pyx_PyUnicode_Equals(__pyx_v__pytype, ((PyObject *)__pyx_n_u__none), Py_EQ); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __pyx_t_7;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "src/lxml/lxml.objectify.pyx":1934
 *     if _pytype is not None:
 *         if _pytype == u"NoneType" or _pytype == u"none":
 *             strval = None             # <<<<<<<<<<<<<<
 *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
 *         else:
 */
      __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_v_strval);
      __pyx_v_strval = Py_None;

      /* "src/lxml/lxml.objectify.pyx":1935
 *         if _pytype == u"NoneType" or _pytype == u"none":
 *             strval = None
 *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"             # <<<<<<<<<<<<<<
 *         else:
 *             # check if type information from arguments is valid
 */
      if (PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u__true)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L35;
    }
    /*else*/ {

      /* "src/lxml/lxml.objectify.pyx":1938
 *         else:
 *             # check if type information from arguments is valid
 *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)             # <<<<<<<<<<<<<<
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check
 */
      __pyx_t_8 = ((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_dict_result = PyDict_GetItem(__pyx_t_8, __pyx_v__pytype);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "src/lxml/lxml.objectify.pyx":1939
 *             # check if type information from arguments is valid
 *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:
 */
      __pyx_t_2 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_2) {

        /* "src/lxml/lxml.objectify.pyx":1940
 *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check             # <<<<<<<<<<<<<<
 *                 if type_check is not None:
 *                     type_check(strval)
 */
        __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check);
        __pyx_v_type_check = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check;

        /* "src/lxml/lxml.objectify.pyx":1941
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:             # <<<<<<<<<<<<<<
 *                     type_check(strval)
 * 
 */
        __pyx_t_2 = (__pyx_v_type_check != Py_None);
        if (__pyx_t_2) {

          /* "src/lxml/lxml.objectify.pyx":1942
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:
 *                     type_check(strval)             # <<<<<<<<<<<<<<
 * 
 *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_strval);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_strval);
          __Pyx_GIVEREF(__pyx_v_strval);
          __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L37;
        }
        __pyx_L37:;

        /* "src/lxml/lxml.objectify.pyx":1944
 *                     type_check(strval)
 * 
 *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
 * 
 *     return _makeElement(u"value", strval, _attributes, nsmap)
 */
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        if (PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L36;
      }
      __pyx_L36:;
    }
    __pyx_L35:;
    goto __pyx_L34;
  }
  __pyx_L34:;

  /* "src/lxml/lxml.objectify.pyx":1946
 *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
 * 
 *     return _makeElement(u"value", strval, _attributes, nsmap)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = ((PyObject *)__pyx_n_u__value);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_8 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_t_6, __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attributes);
  __Pyx_XDECREF(__pyx_v_temp);
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_strval);
  __Pyx_XDECREF(__pyx_v_stringify);
  __Pyx_XDECREF(__pyx_v_type_check);
  __Pyx_XDECREF(__pyx_v_attrib);
  __Pyx_XDECREF(__pyx_v_nsmap);
  __Pyx_XDECREF(__pyx_v__pytype);
  __Pyx_XDECREF(__pyx_v__xsi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_path = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath___init__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_path);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":21
 *     cdef _ObjectPath*  _c_path
 *     cdef Py_ssize_t _path_len
 *     def __init__(self, path):             # <<<<<<<<<<<<<<
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)
 */

static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, PyObject *__pyx_v_path) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":22
 *     cdef Py_ssize_t _path_len
 *     def __init__(self, path):
 *         if python._isString(path):             # <<<<<<<<<<<<<<
 *             self._path = _parseObjectPathString(path)
 *             self._path_str = path
 */
  __pyx_t_1 = _isString(__pyx_v_path);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":23
 *     def __init__(self, path):
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)             # <<<<<<<<<<<<<<
 *             self._path_str = path
 *         else:
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__parseObjectPathString(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_path);
    __Pyx_DECREF(__pyx_v_self->_path);
    __pyx_v_self->_path = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":24
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)
 *             self._path_str = path             # <<<<<<<<<<<<<<
 *         else:
 *             self._path = _parseObjectPathList(path)
 */
    __Pyx_INCREF(__pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    __Pyx_GOTREF(__pyx_v_self->_path_str);
    __Pyx_DECREF(__pyx_v_self->_path_str);
    __pyx_v_self->_path_str = __pyx_v_path;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":26
 *             self._path_str = path
 *         else:
 *             self._path = _parseObjectPathList(path)             # <<<<<<<<<<<<<<
 *             self._path_str = u'.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__parseObjectPathList(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_path);
    __Pyx_DECREF(__pyx_v_self->_path);
    __pyx_v_self->_path = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":27
 *         else:
 *             self._path = _parseObjectPathList(path)
 *             self._path_str = u'.'.join(path)             # <<<<<<<<<<<<<<
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 */
    __pyx_t_2 = ((PyObject *)PyUnicode_Join(__pyx_kp_u_9, __pyx_v_path)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_path_str);
    __Pyx_DECREF(__pyx_v_self->_path_str);
    __pyx_v_self->_path_str = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":28
 *             self._path = _parseObjectPathList(path)
 *             self._path_str = u'.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)             # <<<<<<<<<<<<<<
 *         self._c_path = _buildObjectPathSegments(self._path)
 *         self.find = self.__call__
 */
  __pyx_t_2 = __pyx_v_self->_path;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_self->_path_len = PyList_GET_SIZE(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":29
 *             self._path_str = u'.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)             # <<<<<<<<<<<<<<
 *         self.find = self.__call__
 * 
 */
  __pyx_t_2 = __pyx_v_self->_path;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_4lxml_9objectify__buildObjectPathSegments(__pyx_t_2); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->_c_path = __pyx_t_3;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":30
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 *         self.find = self.__call__             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____call__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->find);
  __Pyx_DECREF(__pyx_v_self->find);
  __pyx_v_self->find = __pyx_t_2;
  __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":32
 *         self.find = self.__call__
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_path is not NULL:
 *             python.PyMem_Free(self._c_path)
 */

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

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":33
 * 
 *     def __dealloc__(self):
 *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
 *             python.PyMem_Free(self._c_path)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_c_path != NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":34
 *     def __dealloc__(self):
 *         if self._c_path is not NULL:
 *             python.PyMem_Free(self._c_path)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    PyMem_Free(__pyx_v_self->_c_path);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":36
 *             python.PyMem_Free(self._c_path)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self._path_str
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":37
 * 
 *     def __str__(self):
 *         return self._path_str             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, _Element root not None, *default):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_path_str);
  __pyx_r = __pyx_v_self->_path_str;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_6__call__[] = "Follow the attribute path in the object structure and return the\n        target attribute value.\n\n        If it it not found, either returns a default value (if one was passed\n        as second argument) or raises AttributeError.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__;
#endif
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct LxmlElement *__pyx_v_root = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_default = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_default)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_default);
  } else {
    __pyx_v_default = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__root,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__root)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_root = ((struct LxmlElement *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_default); __pyx_v_default = 0;
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_default);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_default);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":39
 *         return self._path_str
 * 
 *     def __call__(self, _Element root not None, *default):             # <<<<<<<<<<<<<<
 *         u"""Follow the attribute path in the object structure and return the
 *         target attribute value.
 */

static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_default) {
  Py_ssize_t __pyx_v_use_default;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);
  __Pyx_INCREF(__pyx_v_default);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":47
 *         """
 *         cdef Py_ssize_t use_default
 *         use_default = python.PyTuple_GET_SIZE(default)             # <<<<<<<<<<<<<<
 *         if use_default == 1:
 *             default = python.PyTuple_GET_ITEM(default, 0)
 */
  __pyx_v_use_default = PyTuple_GET_SIZE(__pyx_v_default);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":48
 *         cdef Py_ssize_t use_default
 *         use_default = python.PyTuple_GET_SIZE(default)
 *         if use_default == 1:             # <<<<<<<<<<<<<<
 *             default = python.PyTuple_GET_ITEM(default, 0)
 *             python.Py_INCREF(default)
 */
  __pyx_t_1 = (__pyx_v_use_default == 1);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":49
 *         use_default = python.PyTuple_GET_SIZE(default)
 *         if use_default == 1:
 *             default = python.PyTuple_GET_ITEM(default, 0)             # <<<<<<<<<<<<<<
 *             python.Py_INCREF(default)
 *             use_default = 1
 */
    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_default, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_default);
    __pyx_v_default = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":50
 *         if use_default == 1:
 *             default = python.PyTuple_GET_ITEM(default, 0)
 *             python.Py_INCREF(default)             # <<<<<<<<<<<<<<
 *             use_default = 1
 *         elif use_default > 1:
 */
    Py_INCREF(__pyx_v_default);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":51
 *             default = python.PyTuple_GET_ITEM(default, 0)
 *             python.Py_INCREF(default)
 *             use_default = 1             # <<<<<<<<<<<<<<
 *         elif use_default > 1:
 *             raise TypeError, u"invalid number of arguments: needs one or two"
 */
    __pyx_v_use_default = 1;
    goto __pyx_L3;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":52
 *             python.Py_INCREF(default)
 *             use_default = 1
 *         elif use_default > 1:             # <<<<<<<<<<<<<<
 *             raise TypeError, u"invalid number of arguments: needs one or two"
 *         return _findObjectPath(root, self._c_path, self._path_len,
 */
  __pyx_t_1 = (__pyx_v_use_default > 1);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":53
 *             use_default = 1
 *         elif use_default > 1:
 *             raise TypeError, u"invalid number of arguments: needs one or two"             # <<<<<<<<<<<<<<
 *         return _findObjectPath(root, self._c_path, self._path_len,
 *                                default, use_default)
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_52), 0, 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":54
 *         elif use_default > 1:
 *             raise TypeError, u"invalid number of arguments: needs one or two"
 *         return _findObjectPath(root, self._c_path, self._path_len,             # <<<<<<<<<<<<<<
 *                                default, use_default)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":55
 *             raise TypeError, u"invalid number of arguments: needs one or two"
 *         return _findObjectPath(root, self._c_path, self._path_len,
 *                                default, use_default)             # <<<<<<<<<<<<<<
 * 
 *     def hasattr(self, _Element root not None):
 */
  __pyx_t_2 = __pyx_f_4lxml_9objectify__findObjectPath(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, __pyx_v_default, __pyx_v_use_default); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_default);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr[] = "hasattr(self, root)";
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hasattr (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_root));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":57
 *                                default, use_default)
 * 
 *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
 *         u"hasattr(self, root)"
 *         try:
 */

static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hasattr", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":59
 *     def hasattr(self, _Element root not None):
 *         u"hasattr(self, root)"
 *         try:             # <<<<<<<<<<<<<<
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":60
 *         u"hasattr(self, root)"
 *         try:
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return False
 */
      __pyx_t_4 = Py_None;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __pyx_f_4lxml_9objectify__findObjectPath(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":61
 *         try:
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":62
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:
 *             return False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":63
 *         except AttributeError:
 *             return False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def setattr(self, _Element root not None, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_10setattr[] = "setattr(self, root, value)\n\n        Set the value of the target element in a subtree.\n\n        If any of the children on the path does not exist, it is created.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct LxmlElement *__pyx_v_root = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setattr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__root,&__pyx_n_s__value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__root)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __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_root = ((struct LxmlElement *)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":65
 *         return True
 * 
 *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
 *         u"""setattr(self, root, value)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setattr", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":72
 *         If any of the children on the path does not exist, it is created.
 *         """
 *         _createObjectPath(root, self._c_path, self._path_len, 1, value)             # <<<<<<<<<<<<<<
 * 
 *     def addattr(self, _Element root not None, value):
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__createObjectPath(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, 1, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_12addattr[] = "addattr(self, root, value)\n\n        Append a value to the target element in a subtree.\n\n        If any of the children on the path does not exist, it is created.\n        ";
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct LxmlElement *__pyx_v_root = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("addattr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__root,&__pyx_n_s__value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__root)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __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_root = ((struct LxmlElement *)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":74
 *         _createObjectPath(root, self._c_path, self._path_len, 1, value)
 * 
 *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
 *         u"""addattr(self, root, value)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("addattr", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":81
 *         If any of the children on the path does not exist, it is created.
 *         """
 *         _createObjectPath(root, self._c_path, self._path_len, 0, value)             # <<<<<<<<<<<<<<
 * 
 * cdef object __MATCH_PATH_SEGMENT
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__createObjectPath(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, 0, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":16
 *     Example for a path: 'root.child[1].{other}child[25]'
 *     """
 *     cdef readonly object find             # <<<<<<<<<<<<<<
 *     cdef object _path
 *     cdef object _path_str
 */

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":91
 * _RELATIVE_PATH_SEGMENT = (None, None, 0)
 * 
 * cdef _parseObjectPathString(path):             # <<<<<<<<<<<<<<
 *     u"""Parse object path string into a (ns, name, index) list.
 *     """
 */

static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *__pyx_v_path) {
  int __pyx_v_has_dot;
  PyObject *__pyx_v_new_path = 0;
  PyObject *__pyx_v_path_pos = NULL;
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_v_dot = NULL;
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parseObjectPathString", 0);
  __Pyx_INCREF(__pyx_v_path);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":95
 *     """
 *     cdef bint has_dot
 *     cdef list new_path = []             # <<<<<<<<<<<<<<
 *     if python.PyBytes_Check(path):
 *         path = python.PyUnicode_FromEncodedObject(path, 'ascii', NULL)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_new_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":96
 *     cdef bint has_dot
 *     cdef list new_path = []
 *     if python.PyBytes_Check(path):             # <<<<<<<<<<<<<<
 *         path = python.PyUnicode_FromEncodedObject(path, 'ascii', NULL)
 *     path = path.strip()
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_path);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":97
 *     cdef list new_path = []
 *     if python.PyBytes_Check(path):
 *         path = python.PyUnicode_FromEncodedObject(path, 'ascii', NULL)             # <<<<<<<<<<<<<<
 *     path = path.strip()
 *     if path == u'.':
 */
    __pyx_t_1 = ((PyObject *)PyUnicode_FromEncodedObject(__pyx_v_path, __pyx_k__ascii, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_path);
    __pyx_v_path = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":98
 *     if python.PyBytes_Check(path):
 *         path = python.PyUnicode_FromEncodedObject(path, 'ascii', NULL)
 *     path = path.strip()             # <<<<<<<<<<<<<<
 *     if path == u'.':
 *         return [_RELATIVE_PATH_SEGMENT]
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_path, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_path);
  __pyx_v_path = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":99
 *         path = python.PyUnicode_FromEncodedObject(path, 'ascii', NULL)
 *     path = path.strip()
 *     if path == u'.':             # <<<<<<<<<<<<<<
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0
 */
  __pyx_t_2 = __Pyx_PyUnicode_Equals(__pyx_v_path, ((PyObject *)__pyx_kp_u_9), Py_EQ); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":100
 *     path = path.strip()
 *     if path == u'.':
 *         return [_RELATIVE_PATH_SEGMENT]             # <<<<<<<<<<<<<<
 *     path_pos = 0
 *     while python.PyUnicode_GET_SIZE(path) > 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
    __Pyx_GIVEREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
    __pyx_r = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":101
 *     if path == u'.':
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0             # <<<<<<<<<<<<<<
 *     while python.PyUnicode_GET_SIZE(path) > 0:
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_path_pos = __pyx_int_0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":102
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0
 *     while python.PyUnicode_GET_SIZE(path) > 0:             # <<<<<<<<<<<<<<
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 *         if match is None:
 */
  while (1) {
    __pyx_t_2 = (PyUnicode_GET_SIZE(__pyx_v_path) > 0);
    if (!__pyx_t_2) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":103
 *     path_pos = 0
 *     while python.PyUnicode_GET_SIZE(path) > 0:
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)             # <<<<<<<<<<<<<<
 *         if match is None:
 *             break
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    __Pyx_INCREF(__pyx_v_path_pos);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_pos);
    __Pyx_GIVEREF(__pyx_v_path_pos);
    __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_match);
    __pyx_v_match = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":104
 *     while python.PyUnicode_GET_SIZE(path) > 0:
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 *         if match is None:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_2 = (__pyx_v_match == Py_None);
    if (__pyx_t_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":105
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 *         if match is None:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         dot, ns, name, index = match.groups()
 */
      goto __pyx_L6_break;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":107
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<<
 *         if index is None or not index:
 *             index = 0
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        *(temps[i]) = item;
      }
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6};
      __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_8(__pyx_t_7); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L9_unpacking_done;
      __pyx_L8_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L9_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_dot);
    __pyx_v_dot = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_v_ns);
    __pyx_v_ns = __pyx_t_4;
    __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_index);
    __pyx_v_index = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":108
 * 
 *         dot, ns, name, index = match.groups()
 *         if index is None or not index:             # <<<<<<<<<<<<<<
 *             index = 0
 *         else:
 */
    __pyx_t_2 = (__pyx_v_index == Py_None);
    if (!__pyx_t_2) {
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = (!__pyx_t_9);
      __pyx_t_9 = __pyx_t_10;
    } else {
      __pyx_t_9 = __pyx_t_2;
    }
    if (__pyx_t_9) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":109
 *         dot, ns, name, index = match.groups()
 *         if index is None or not index:
 *             index = 0             # <<<<<<<<<<<<<<
 *         else:
 *             index = int(index)
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_int_0;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":111
 *             index = 0
 *         else:
 *             index = int(index)             # <<<<<<<<<<<<<<
 *         has_dot = dot == u'.'
 *         if python.PyList_GET_SIZE(new_path) == 0:
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_t_6;
      __pyx_t_6 = 0;
    }
    __pyx_L10:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":112
 *         else:
 *             index = int(index)
 *         has_dot = dot == u'.'             # <<<<<<<<<<<<<<
 *         if python.PyList_GET_SIZE(new_path) == 0:
 *             if has_dot:
 */
    __pyx_t_9 = __Pyx_PyUnicode_Equals(__pyx_v_dot, ((PyObject *)__pyx_kp_u_9), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_has_dot = __pyx_t_9;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":113
 *             index = int(index)
 *         has_dot = dot == u'.'
 *         if python.PyList_GET_SIZE(new_path) == 0:             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 # path '.child' => ignore root
 */
    __pyx_t_9 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
    if (__pyx_t_9) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":114
 *         has_dot = dot == u'.'
 *         if python.PyList_GET_SIZE(new_path) == 0:
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 # path '.child' => ignore root
 *                 new_path.append(_RELATIVE_PATH_SEGMENT)
 */
      if (__pyx_v_has_dot) {

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":116
 *             if has_dot:
 *                 # path '.child' => ignore root
 *                 new_path.append(_RELATIVE_PATH_SEGMENT)             # <<<<<<<<<<<<<<
 *             elif index != 0:
 *                 raise ValueError, u"index not allowed on root node"
 */
        __pyx_t_6 = __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_11 = PyList_Append(__pyx_v_new_path, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L12;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":117
 *                 # path '.child' => ignore root
 *                 new_path.append(_RELATIVE_PATH_SEGMENT)
 *             elif index != 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, u"index not allowed on root node"
 *         elif not has_dot:
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_9) {

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":118
 *                 new_path.append(_RELATIVE_PATH_SEGMENT)
 *             elif index != 0:
 *                 raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
 *         elif not has_dot:
 *             raise ValueError, u"invalid path"
 */
        __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_53), 0, 0);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L12;
      }
      __pyx_L12:;
      goto __pyx_L11;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":119
 *             elif index != 0:
 *                 raise ValueError, u"index not allowed on root node"
 *         elif not has_dot:             # <<<<<<<<<<<<<<
 *             raise ValueError, u"invalid path"
 *         if ns is not None:
 */
    __pyx_t_9 = (!__pyx_v_has_dot);
    if (__pyx_t_9) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":120
 *                 raise ValueError, u"index not allowed on root node"
 *         elif not has_dot:
 *             raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
 *         if ns is not None:
 *             ns = python.PyUnicode_AsUTF8String(ns)
 */
      __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_54), 0, 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":121
 *         elif not has_dot:
 *             raise ValueError, u"invalid path"
 *         if ns is not None:             # <<<<<<<<<<<<<<
 *             ns = python.PyUnicode_AsUTF8String(ns)
 *         name = python.PyUnicode_AsUTF8String(name)
 */
    __pyx_t_9 = (__pyx_v_ns != Py_None);
    if (__pyx_t_9) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":122
 *             raise ValueError, u"invalid path"
 *         if ns is not None:
 *             ns = python.PyUnicode_AsUTF8String(ns)             # <<<<<<<<<<<<<<
 *         name = python.PyUnicode_AsUTF8String(name)
 *         new_path.append( (ns, name, index) )
 */
      __pyx_t_6 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_ns)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_v_ns);
      __pyx_v_ns = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":123
 *         if ns is not None:
 *             ns = python.PyUnicode_AsUTF8String(ns)
 *         name = python.PyUnicode_AsUTF8String(name)             # <<<<<<<<<<<<<<
 *         new_path.append( (ns, name, index) )
 * 
 */
    __pyx_t_6 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_name)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":124
 *             ns = python.PyUnicode_AsUTF8String(ns)
 *         name = python.PyUnicode_AsUTF8String(name)
 *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
 * 
 *         path_pos = match.end()
 */
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    __pyx_t_11 = PyList_Append(__pyx_v_new_path, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":126
 *         new_path.append( (ns, name, index) )
 * 
 *         path_pos = match.end()             # <<<<<<<<<<<<<<
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyUnicode_GET_SIZE(path) > path_pos:
 */
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_match, __pyx_n_s__end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_path_pos);
    __pyx_v_path_pos = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L6_break:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":127
 * 
 *         path_pos = match.end()
 *     if python.PyList_GET_SIZE(new_path) == 0 or \             # <<<<<<<<<<<<<<
 *            python.PyUnicode_GET_SIZE(path) > path_pos:
 *         raise ValueError, u"invalid path"
 */
  __pyx_t_9 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
  if (!__pyx_t_9) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":128
 *         path_pos = match.end()
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyUnicode_GET_SIZE(path) > path_pos:             # <<<<<<<<<<<<<<
 *         raise ValueError, u"invalid path"
 *     return new_path
 */
    __pyx_t_3 = PyInt_FromSsize_t(PyUnicode_GET_SIZE(__pyx_v_path)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_path_pos, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = __pyx_t_2;
  } else {
    __pyx_t_10 = __pyx_t_9;
  }
  if (__pyx_t_10) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":129
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyUnicode_GET_SIZE(path) > path_pos:
 *         raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
 *     return new_path
 * 
 */
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_54), 0, 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":130
 *            python.PyUnicode_GET_SIZE(path) > path_pos:
 *         raise ValueError, u"invalid path"
 *     return new_path             # <<<<<<<<<<<<<<
 * 
 * cdef _parseObjectPathList(path):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_new_path));
  __pyx_r = ((PyObject *)__pyx_v_new_path);
  goto __pyx_L0;

  __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_AddTraceback("lxml.objectify._parseObjectPathString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_path);
  __Pyx_XDECREF(__pyx_v_path_pos);
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XDECREF(__pyx_v_dot);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":132
 *     return new_path
 * 
 * cdef _parseObjectPathList(path):             # <<<<<<<<<<<<<<
 *     u"""Parse object path sequence into a (ns, name, index) list.
 *     """
 */

static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *__pyx_v_path) {
  xmlChar *__pyx_v_index_pos;
  xmlChar *__pyx_v_index_end;
  unsigned char *__pyx_v_c_name;
  PyObject *__pyx_v_new_path = 0;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parseObjectPathList", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":138
 *     cdef xmlChar* index_end
 *     cdef unsigned char* c_name
 *     cdef list new_path = []             # <<<<<<<<<<<<<<
 *     for item in path:
 *         item = item.strip()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_new_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":139
 *     cdef unsigned char* c_name
 *     cdef list new_path = []
 *     for item in path:             # <<<<<<<<<<<<<<
 *         item = item.strip()
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
 */
  if (PyList_CheckExact(__pyx_v_path) || PyTuple_CheckExact(__pyx_v_path)) {
    __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":140
 *     cdef list new_path = []
 *     for item in path:
 *         item = item.strip()             # <<<<<<<<<<<<<<
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
 *             # path '.child' => ignore root
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_item, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":141
 *     for item in path:
 *         item = item.strip()
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':             # <<<<<<<<<<<<<<
 *             # path '.child' => ignore root
 *             ns = name = None
 */
    __pyx_t_6 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
    if (__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyUnicode_Equals(__pyx_v_item, ((PyObject *)__pyx_kp_u_4), Py_EQ); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_6;
    }
    if (__pyx_t_8) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":143
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
 *             # path '.child' => ignore root
 *             ns = name = None             # <<<<<<<<<<<<<<
 *             index = 0
 *         else:
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF(__pyx_v_ns);
      __pyx_v_ns = Py_None;
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF(__pyx_v_name);
      __pyx_v_name = Py_None;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":144
 *             # path '.child' => ignore root
 *             ns = name = None
 *             index = 0             # <<<<<<<<<<<<<<
 *         else:
 *             ns, name = cetree.getNsTag(item)
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_XDECREF(__pyx_v_index);
      __pyx_v_index = __pyx_int_0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":146
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<<
 *             c_name = <unsigned char*>_cstr(name)
 *             index_pos = tree.xmlStrchr(c_name, c'[')
 */
      __pyx_t_5 = ((PyObject *)getNsTag(__pyx_v_item)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyTuple_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else if (1) {
        __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_ns);
      __pyx_v_ns = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_v_name);
      __pyx_v_name = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":147
 *         else:
 *             ns, name = cetree.getNsTag(item)
 *             c_name = <unsigned char*>_cstr(name)             # <<<<<<<<<<<<<<
 *             index_pos = tree.xmlStrchr(c_name, c'[')
 *             if index_pos is NULL:
 */
      __pyx_v_c_name = ((unsigned char *)PyBytes_AS_STRING(__pyx_v_name));

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":148
 *             ns, name = cetree.getNsTag(item)
 *             c_name = <unsigned char*>_cstr(name)
 *             index_pos = tree.xmlStrchr(c_name, c'[')             # <<<<<<<<<<<<<<
 *             if index_pos is NULL:
 *                 index = 0
 */
      __pyx_v_index_pos = xmlStrchr(__pyx_v_c_name, '[');

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":149
 *             c_name = <unsigned char*>_cstr(name)
 *             index_pos = tree.xmlStrchr(c_name, c'[')
 *             if index_pos is NULL:             # <<<<<<<<<<<<<<
 *                 index = 0
 *             else:
 */
      __pyx_t_8 = (__pyx_v_index_pos == NULL);
      if (__pyx_t_8) {

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":150
 *             index_pos = tree.xmlStrchr(c_name, c'[')
 *             if index_pos is NULL:
 *                 index = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
 */
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_XDECREF(__pyx_v_index);
        __pyx_v_index = __pyx_int_0;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":152
 *                 index = 0
 *             else:
 *                 index_end = tree.xmlStrchr(index_pos + 1, c']')             # <<<<<<<<<<<<<<
 *                 if index_end is NULL:
 *                     raise ValueError, u"index must be enclosed in []"
 */
        __pyx_v_index_end = xmlStrchr((__pyx_v_index_pos + 1), ']');

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":153
 *             else:
 *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
 *                 if index_end is NULL:             # <<<<<<<<<<<<<<
 *                     raise ValueError, u"index must be enclosed in []"
 *                 index = int((<unsigned char*>index_pos)[1:index_end - index_pos])
 */
        __pyx_t_8 = (__pyx_v_index_end == NULL);
        if (__pyx_t_8) {

          /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":154
 *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
 *                 if index_end is NULL:
 *                     raise ValueError, u"index must be enclosed in []"             # <<<<<<<<<<<<<<
 *                 index = int((<unsigned char*>index_pos)[1:index_end - index_pos])
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 */
          __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_55), 0, 0);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":155
 *                 if index_end is NULL:
 *                     raise ValueError, u"index must be enclosed in []"
 *                 index = int((<unsigned char*>index_pos)[1:index_end - index_pos])             # <<<<<<<<<<<<<<
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, u"index not allowed on root node"
 */
        __pyx_t_5 = PyBytes_FromStringAndSize(((unsigned char *)__pyx_v_index_pos) + 1, (__pyx_v_index_end - __pyx_v_index_pos) - 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_v_index);
        __pyx_v_index = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":156
 *                     raise ValueError, u"index must be enclosed in []"
 *                 index = int((<unsigned char*>index_pos)[1:index_end - index_pos])
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:             # <<<<<<<<<<<<<<
 *                     raise ValueError, u"index not allowed on root node"
 *                 name = <bytes>c_name[:index_pos - c_name]
 */
        __pyx_t_8 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
        if (__pyx_t_8) {
          __pyx_t_5 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_7 = __pyx_t_6;
        } else {
          __pyx_t_7 = __pyx_t_8;
        }
        if (__pyx_t_7) {

          /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":157
 *                 index = int((<unsigned char*>index_pos)[1:index_end - index_pos])
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
 *                 name = <bytes>c_name[:index_pos - c_name]
 *         new_path.append( (ns, name, index) )
 */
          __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_53), 0, 0);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":158
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, u"index not allowed on root node"
 *                 name = <bytes>c_name[:index_pos - c_name]             # <<<<<<<<<<<<<<
 *         new_path.append( (ns, name, index) )
 *     if python.PyList_GET_SIZE(new_path) == 0:
 */
        __pyx_t_5 = PyBytes_FromStringAndSize(__pyx_v_c_name + 0, (__pyx_v_index_pos - __pyx_v_c_name) - 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_t_5)));
        __Pyx_DECREF(__pyx_v_name);
        __pyx_v_name = ((PyObject *)__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      }
      __pyx_L8:;
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":159
 *                     raise ValueError, u"index not allowed on root node"
 *                 name = <bytes>c_name[:index_pos - c_name]
 *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
 *     if python.PyList_GET_SIZE(new_path) == 0:
 *         raise ValueError, u"invalid path"
 */
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    __pyx_t_12 = PyList_Append(__pyx_v_new_path, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":160
 *                 name = <bytes>c_name[:index_pos - c_name]
 *         new_path.append( (ns, name, index) )
 *     if python.PyList_GET_SIZE(new_path) == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError, u"invalid path"
 *     return new_path
 */
  __pyx_t_7 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
  if (__pyx_t_7) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":161
 *         new_path.append( (ns, name, index) )
 *     if python.PyList_GET_SIZE(new_path) == 0:
 *         raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
 *     return new_path
 * 
 */
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_54), 0, 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":162
 *     if python.PyList_GET_SIZE(new_path) == 0:
 *         raise ValueError, u"invalid path"
 *     return new_path             # <<<<<<<<<<<<<<
 * 
 * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_new_path));
  __pyx_r = ((PyObject *)__pyx_v_new_path);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("lxml.objectify._parseObjectPathList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_path);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":164
 *     return new_path
 * 
 * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:             # <<<<<<<<<<<<<<
 *     cdef _ObjectPath* c_path
 *     cdef _ObjectPath* c_path_segments
 */

static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *__pyx_v_path_list) {
  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path;
  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path_segments;
  PyObject *__pyx_v_href = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_index = NULL;
  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  const xmlChar *__pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_buildObjectPathSegments", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":168
 *     cdef _ObjectPath* c_path_segments
 *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))             # <<<<<<<<<<<<<<
 *     if c_path_segments is NULL:
 *         raise MemoryError()
 */
  __pyx_v_c_path_segments = ((__pyx_t_4lxml_9objectify__ObjectPath *)PyMem_Malloc(((sizeof(__pyx_t_4lxml_9objectify__ObjectPath)) * PyList_GET_SIZE(__pyx_v_path_list))));

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":169
 *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
 *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     c_path = c_path_segments
 */
  __pyx_t_1 = (__pyx_v_c_path_segments == NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":170
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
 *     if c_path_segments is NULL:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     c_path = c_path_segments
 *     for href, name, index in path_list:
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":171
 *     if c_path_segments is NULL:
 *         raise MemoryError()
 *     c_path = c_path_segments             # <<<<<<<<<<<<<<
 *     for href, name, index in path_list:
 *         c_path[0].href = _xcstr(href) if href is not None else NULL
 */
  __pyx_v_c_path = __pyx_v_c_path_segments;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":172
 *         raise MemoryError()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
 *         c_path[0].href = _xcstr(href) if href is not None else NULL
 *         c_path[0].name = _xcstr(name) if name is not None else NULL
 */
  if (PyList_CheckExact(__pyx_v_path_list) || PyTuple_CheckExact(__pyx_v_path_list)) {
    __pyx_t_2 = __pyx_v_path_list; __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_path_list); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_href);
    __pyx_v_href = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_7;
    __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_v_index);
    __pyx_v_index = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":173
 *     c_path = c_path_segments
 *     for href, name, index in path_list:
 *         c_path[0].href = _xcstr(href) if href is not None else NULL             # <<<<<<<<<<<<<<
 *         c_path[0].name = _xcstr(name) if name is not None else NULL
 *         c_path[0].index = index
 */
    __pyx_t_1 = (__pyx_v_href != Py_None);
    if (__pyx_t_1) {
      __pyx_t_11 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_href);
    } else {
      __pyx_t_11 = NULL;
    }
    (__pyx_v_c_path[0]).href = __pyx_t_11;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":174
 *     for href, name, index in path_list:
 *         c_path[0].href = _xcstr(href) if href is not None else NULL
 *         c_path[0].name = _xcstr(name) if name is not None else NULL             # <<<<<<<<<<<<<<
 *         c_path[0].index = index
 *         c_path += 1
 */
    __pyx_t_1 = (__pyx_v_name != Py_None);
    if (__pyx_t_1) {
      __pyx_t_11 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name);
    } else {
      __pyx_t_11 = NULL;
    }
    (__pyx_v_c_path[0]).name = __pyx_t_11;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":175
 *         c_path[0].href = _xcstr(href) if href is not None else NULL
 *         c_path[0].name = _xcstr(name) if name is not None else NULL
 *         c_path[0].index = index             # <<<<<<<<<<<<<<
 *         c_path += 1
 *     return c_path_segments
 */
    __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_c_path[0]).index = __pyx_t_12;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":176
 *         c_path[0].name = _xcstr(name) if name is not None else NULL
 *         c_path[0].index = index
 *         c_path += 1             # <<<<<<<<<<<<<<
 *     return c_path_segments
 * 
 */
    __pyx_v_c_path = (__pyx_v_c_path + 1);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":177
 *         c_path[0].index = index
 *         c_path += 1
 *     return c_path_segments             # <<<<<<<<<<<<<<
 * 
 * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,
 */
  __pyx_r = __pyx_v_c_path_segments;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("lxml.objectify._buildObjectPathSegments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_href);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":179
 *     return c_path_segments
 * 
 * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,             # <<<<<<<<<<<<<<
 *                      default_value, int use_default):
 *     u"""Follow the path to find the target element.
 */

static PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *__pyx_v_root, __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path, Py_ssize_t __pyx_v_c_path_len, PyObject *__pyx_v_default_value, int __pyx_v_use_default) {
  xmlNode *__pyx_v_c_node;
  Py_ssize_t __pyx_v_c_index;
  const xmlChar *__pyx_v_c_name;
  const xmlChar *__pyx_v_c_href;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  xmlNode *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_findObjectPath", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":185
 *     cdef tree.xmlNode* c_node
 *     cdef Py_ssize_t c_index
 *     c_node = root._c_node             # <<<<<<<<<<<<<<
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 */
  __pyx_v_c_node = __pyx_v_root->_c_node;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":186
 *     cdef Py_ssize_t c_index
 *     c_node = root._c_node
 *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 */
  __pyx_v_c_name = (__pyx_v_c_path[0]).name;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":187
 *     c_node = root._c_node
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 */
  __pyx_v_c_href = (__pyx_v_c_path[0]).href;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":188
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 */
  __pyx_t_1 = (__pyx_v_c_href == NULL);
  if (!__pyx_t_1) {
    __pyx_t_2 = ((__pyx_v_c_href[0]) == '\x00');
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":189
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         if use_default:
 */
    __pyx_v_c_href = _getNs(__pyx_v_c_node);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":190
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
 *         if use_default:
 *             return default_value
 */
  __pyx_t_3 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":191
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         if use_default:             # <<<<<<<<<<<<<<
 *             return default_value
 *         else:
 */
    if (__pyx_v_use_default) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":192
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         if use_default:
 *             return default_value             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError, \
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_default_value);
      __pyx_r = __pyx_v_default_value;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":196
 *             raise ValueError, \
 *                 u"root element does not match: need %s, got %s" % \
 *                 (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<<
 * 
 *     while c_node is not NULL:
 */
      __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_s__tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_56), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), 0, 0);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":198
 *                 (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_node is not NULL:             # <<<<<<<<<<<<<<
 *         c_path_len -= 1
 *         if c_path_len <= 0:
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_3) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":199
 * 
 *     while c_node is not NULL:
 *         c_path_len -= 1             # <<<<<<<<<<<<<<
 *         if c_path_len <= 0:
 *             break
 */
    __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":200
 *     while c_node is not NULL:
 *         c_path_len -= 1
 *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_3 = (__pyx_v_c_path_len <= 0);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":201
 *         c_path_len -= 1
 *         if c_path_len <= 0:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         c_path += 1
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":203
 *             break
 * 
 *         c_path += 1             # <<<<<<<<<<<<<<
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 */
    __pyx_v_c_path = (__pyx_v_c_path + 1);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":204
 * 
 *         c_path += 1
 *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 */
    __pyx_t_3 = ((__pyx_v_c_path[0]).href != NULL);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":205
 *         c_path += 1
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<<
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 *         if c_name is NULL:
 */
      __pyx_v_c_href = (__pyx_v_c_path[0]).href;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":206
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
 *         if c_name is NULL:
 *             c_name = c_path[0].name
 */
    __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":207
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 *         if c_name is NULL:             # <<<<<<<<<<<<<<
 *             c_name = c_path[0].name
 *             c_node = NULL
 */
    __pyx_t_3 = (__pyx_v_c_name == NULL);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":208
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 *         if c_name is NULL:
 *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
 *             c_node = NULL
 *             break
 */
      __pyx_v_c_name = (__pyx_v_c_path[0]).name;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":209
 *         if c_name is NULL:
 *             c_name = c_path[0].name
 *             c_node = NULL             # <<<<<<<<<<<<<<
 *             break
 *         c_index = c_path[0].index
 */
      __pyx_v_c_node = NULL;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":210
 *             c_name = c_path[0].name
 *             c_node = NULL
 *             break             # <<<<<<<<<<<<<<
 *         c_index = c_path[0].index
 *         c_node = c_node.last if c_index < 0 else c_node.children
 */
      goto __pyx_L7_break;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":211
 *             c_node = NULL
 *             break
 *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
 *         c_node = c_node.last if c_index < 0 else c_node.children
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
 */
    __pyx_v_c_index = (__pyx_v_c_path[0]).index;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":212
 *             break
 *         c_index = c_path[0].index
 *         c_node = c_node.last if c_index < 0 else c_node.children             # <<<<<<<<<<<<<<
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
 * 
 */
    if ((__pyx_v_c_index < 0)) {
      __pyx_t_7 = __pyx_v_c_node->last;
    } else {
      __pyx_t_7 = __pyx_v_c_node->children;
    }
    __pyx_v_c_node = __pyx_t_7;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":213
 *         c_index = c_path[0].index
 *         c_node = c_node.last if c_index < 0 else c_node.children
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
 * 
 *     if c_node is not NULL:
 */
    __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_index);
  }
  __pyx_L7_break:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":215
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
 * 
 *     if c_node is not NULL:             # <<<<<<<<<<<<<<
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:
 */
  __pyx_t_3 = (__pyx_v_c_node != NULL);
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":216
 * 
 *     if c_node is not NULL:
 *         return cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
 *     elif use_default:
 *         return default_value
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_root->_doc);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":217
 *     if c_node is not NULL:
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:             # <<<<<<<<<<<<<<
 *         return default_value
 *     else:
 */
  if (__pyx_v_use_default) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":218
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:
 *         return default_value             # <<<<<<<<<<<<<<
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_r = __pyx_v_default_value;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":220
 *         return default_value
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)             # <<<<<<<<<<<<<<
 *         raise AttributeError, u"no such child: " + tag
 * 
 */
    __pyx_t_6 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_tag = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":221
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
 *         raise AttributeError, u"no such child: " + tag             # <<<<<<<<<<<<<<
 * 
 * cdef _createObjectPath(_Element root, _ObjectPath* c_path,
 */
    __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_u_10), __pyx_v_tag); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_6, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L11:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify._findObjectPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":223
 *         raise AttributeError, u"no such child: " + tag
 * 
 * cdef _createObjectPath(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<<
 *                        Py_ssize_t c_path_len, int replace, value):
 *     u"""Follow the path to find the target element, build the missing children
 */

static PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *__pyx_v_root, __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path, Py_ssize_t __pyx_v_c_path_len, int __pyx_v_replace, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_child = 0;
  xmlNode *__pyx_v_c_node;
  xmlNode *__pyx_v_c_child;
  Py_ssize_t __pyx_v_c_index;
  const xmlChar *__pyx_v_c_name;
  const xmlChar *__pyx_v_c_href;
  struct LxmlElement *__pyx_v_element = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  xmlNode *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_createObjectPath", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":233
 *     cdef tree.xmlNode* c_child
 *     cdef Py_ssize_t c_index
 *     if c_path_len == 1:             # <<<<<<<<<<<<<<
 *         raise TypeError, u"cannot update root node"
 * 
 */
  __pyx_t_1 = (__pyx_v_c_path_len == 1);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":234
 *     cdef Py_ssize_t c_index
 *     if c_path_len == 1:
 *         raise TypeError, u"cannot update root node"             # <<<<<<<<<<<<<<
 * 
 *     c_node = root._c_node
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_57), 0, 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":236
 *         raise TypeError, u"cannot update root node"
 * 
 *     c_node = root._c_node             # <<<<<<<<<<<<<<
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 */
  __pyx_v_c_node = __pyx_v_root->_c_node;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":237
 * 
 *     c_node = root._c_node
 *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 */
  __pyx_v_c_name = (__pyx_v_c_path[0]).name;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":238
 *     c_node = root._c_node
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 */
  __pyx_v_c_href = (__pyx_v_c_path[0]).href;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":239
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 */
  __pyx_t_1 = (__pyx_v_c_href == NULL);
  if (!__pyx_t_1) {
    __pyx_t_2 = ((__pyx_v_c_href[0]) == '\x00');
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":240
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, \
 */
    __pyx_v_c_href = _getNs(__pyx_v_c_node);
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":241
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
 *         raise ValueError, \
 *             u"root element does not match: need %s, got %s" % \
 */
  __pyx_t_3 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":244
 *         raise ValueError, \
 *             u"root element does not match: need %s, got %s" % \
 *             (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<<
 * 
 *     while c_path_len > 1:
 */
    __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_s__tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_56), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), 0, 0);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":246
 *             (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_path_len > 1:             # <<<<<<<<<<<<<<
 *         c_path_len -= 1
 *         c_path += 1
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_c_path_len > 1);
    if (!__pyx_t_3) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":247
 * 
 *     while c_path_len > 1:
 *         c_path_len -= 1             # <<<<<<<<<<<<<<
 *         c_path += 1
 *         if c_path[0].href is not NULL:
 */
    __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":248
 *     while c_path_len > 1:
 *         c_path_len -= 1
 *         c_path += 1             # <<<<<<<<<<<<<<
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 */
    __pyx_v_c_path = (__pyx_v_c_path + 1);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":249
 *         c_path_len -= 1
 *         c_path += 1
 *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_index = c_path[0].index
 */
    __pyx_t_3 = ((__pyx_v_c_path[0]).href != NULL);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":250
 *         c_path += 1
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<<
 *         c_index = c_path[0].index
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 */
      __pyx_v_c_href = (__pyx_v_c_path[0]).href;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":251
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 *         if c_name is NULL:
 */
    __pyx_v_c_index = (__pyx_v_c_path[0]).index;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":252
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_index = c_path[0].index
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
 *         if c_name is NULL:
 *             c_name = c_path[0].name
 */
    __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":253
 *         c_index = c_path[0].index
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 *         if c_name is NULL:             # <<<<<<<<<<<<<<
 *             c_name = c_path[0].name
 *             c_child = NULL
 */
    __pyx_t_3 = (__pyx_v_c_name == NULL);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":254
 *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
 *         if c_name is NULL:
 *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
 *             c_child = NULL
 *         else:
 */
      __pyx_v_c_name = (__pyx_v_c_path[0]).name;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":255
 *         if c_name is NULL:
 *             c_name = c_path[0].name
 *             c_child = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             c_child = c_node.last if c_index < 0 else c_node.children
 */
      __pyx_v_c_child = NULL;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":257
 *             c_child = NULL
 *         else:
 *             c_child = c_node.last if c_index < 0 else c_node.children             # <<<<<<<<<<<<<<
 *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
 * 
 */
      if ((__pyx_v_c_index < 0)) {
        __pyx_t_7 = __pyx_v_c_node->last;
      } else {
        __pyx_t_7 = __pyx_v_c_node->children;
      }
      __pyx_v_c_child = __pyx_t_7;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":258
 *         else:
 *             c_child = c_node.last if c_index < 0 else c_node.children
 *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
 * 
 *         if c_child is not NULL:
 */
      __pyx_v_c_child = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_child, __pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_index);
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":260
 *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
 * 
 *         if c_child is not NULL:             # <<<<<<<<<<<<<<
 *             c_node = c_child
 *         elif c_index != 0:
 */
    __pyx_t_3 = (__pyx_v_c_child != NULL);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":261
 * 
 *         if c_child is not NULL:
 *             c_node = c_child             # <<<<<<<<<<<<<<
 *         elif c_index != 0:
 *             raise TypeError, \
 */
      __pyx_v_c_node = __pyx_v_c_child;
      goto __pyx_L10;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":262
 *         if c_child is not NULL:
 *             c_node = c_child
 *         elif c_index != 0:             # <<<<<<<<<<<<<<
 *             raise TypeError, \
 *                 u"creating indexed path attributes is not supported"
 */
    __pyx_t_3 = (__pyx_v_c_index != 0);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":263
 *             c_node = c_child
 *         elif c_index != 0:
 *             raise TypeError, \             # <<<<<<<<<<<<<<
 *                 u"creating indexed path attributes is not supported"
 *         elif c_path_len == 1:
 */
      __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_58), 0, 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L10;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":265
 *             raise TypeError, \
 *                 u"creating indexed path attributes is not supported"
 *         elif c_path_len == 1:             # <<<<<<<<<<<<<<
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 */
    __pyx_t_3 = (__pyx_v_c_path_len == 1);
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":266
 *                 u"creating indexed path attributes is not supported"
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)
 */
      __pyx_t_5 = ((PyObject *)__pyx_v_root->_doc);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":267
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
 *                          value)
 *             return
 */
      __pyx_t_5 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":268
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)             # <<<<<<<<<<<<<<
 *             return
 *         else:
 */
      __pyx_t_4 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_6), __pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":269
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)
 *             return             # <<<<<<<<<<<<<<
 *         else:
 *             child = cetree.makeSubElement(
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":272
 *         else:
 *             child = cetree.makeSubElement(
 *                 cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)
 */
      __pyx_t_4 = ((PyObject *)__pyx_v_root->_doc);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":273
 *             child = cetree.makeSubElement(
 *                 cetree.elementFactory(root._doc, c_node),
 *                 cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
 *                 None, None, None, None)
 *             c_node = child._c_node
 */
      __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":274
 *                 cetree.elementFactory(root._doc, c_node),
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)             # <<<<<<<<<<<<<<
 *             c_node = child._c_node
 * 
 */
      __pyx_t_6 = Py_None;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = Py_None;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = Py_None;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_10 = Py_None;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_11 = ((PyObject *)makeSubElement(((struct LxmlElement *)__pyx_t_5), __pyx_t_4, __pyx_t_6, __pyx_t_8, __pyx_t_9, __pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_child));
      __pyx_v_child = ((struct LxmlElement *)__pyx_t_11);
      __pyx_t_11 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":275
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)
 *             c_node = child._c_node             # <<<<<<<<<<<<<<
 * 
 *     # if we get here, the entire path was already there
 */
      __pyx_v_c_node = __pyx_v_child->_c_node;
    }
    __pyx_L10:;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":278
 * 
 *     # if we get here, the entire path was already there
 *     if replace:             # <<<<<<<<<<<<<<
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)
 */
  if (__pyx_v_replace) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":279
 *     # if we get here, the entire path was already there
 *     if replace:
 *         element = cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
 *         _replaceElement(element, value)
 *     else:
 */
    __pyx_t_11 = ((PyObject *)__pyx_v_root->_doc);
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_10 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_11), __pyx_v_c_node)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":280
 *     if replace:
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 */
    __pyx_t_10 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":282
 *         _replaceElement(element, value)
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
 *                      cetree.namespacedName(c_node), value)
 * 
 */
    __pyx_t_10 = ((PyObject *)__pyx_v_root->_doc);
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_11 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_10), __pyx_v_c_node->parent)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":283
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 *                      cetree.namespacedName(c_node), value)             # <<<<<<<<<<<<<<
 * 
 * cdef list _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):
 */
    __pyx_t_10 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_11), __pyx_t_10, __pyx_v_value); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_L11:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("lxml.objectify._createObjectPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":285
 *                      cetree.namespacedName(c_node), value)
 * 
 * cdef list _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<<
 *     u"""Returns a list of all descendant paths.
 *     """
 */

static PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_prefix_string) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_path_list = 0;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_buildDescendantPaths", 0);
  __Pyx_INCREF(__pyx_v_prefix_string);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":289
 *     """
 *     cdef list path, path_list
 *     tag = cetree.namespacedName(c_node)             # <<<<<<<<<<<<<<
 *     if prefix_string:
 *         if prefix_string[-1] != u'.':
 */
  __pyx_t_1 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tag = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":290
 *     cdef list path, path_list
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:             # <<<<<<<<<<<<<<
 *         if prefix_string[-1] != u'.':
 *             prefix_string += u'.'
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_prefix_string); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":291
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:
 *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
 *             prefix_string += u'.'
 *         prefix_string = prefix_string + tag
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_prefix_string, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_Equals(__pyx_t_1, ((PyObject *)__pyx_kp_u_9), Py_NE); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":292
 *     if prefix_string:
 *         if prefix_string[-1] != u'.':
 *             prefix_string += u'.'             # <<<<<<<<<<<<<<
 *         prefix_string = prefix_string + tag
 *     else:
 */
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_prefix_string, ((PyObject *)__pyx_kp_u_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_v_prefix_string);
      __pyx_v_prefix_string = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":293
 *         if prefix_string[-1] != u'.':
 *             prefix_string += u'.'
 *         prefix_string = prefix_string + tag             # <<<<<<<<<<<<<<
 *     else:
 *         prefix_string = tag
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_prefix_string, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_prefix_string);
    __pyx_v_prefix_string = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":295
 *         prefix_string = prefix_string + tag
 *     else:
 *         prefix_string = tag             # <<<<<<<<<<<<<<
 *     path = [prefix_string]
 *     path_list = []
 */
    __Pyx_INCREF(__pyx_v_tag);
    __Pyx_DECREF(__pyx_v_prefix_string);
    __pyx_v_prefix_string = __pyx_v_tag;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":296
 *     else:
 *         prefix_string = tag
 *     path = [prefix_string]             # <<<<<<<<<<<<<<
 *     path_list = []
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_prefix_string);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_prefix_string);
  __Pyx_GIVEREF(__pyx_v_prefix_string);
  __pyx_v_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":297
 *         prefix_string = tag
 *     path = [prefix_string]
 *     path_list = []             # <<<<<<<<<<<<<<
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)
 *     return path_list
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":298
 *     path = [prefix_string]
 *     path_list = []
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)             # <<<<<<<<<<<<<<
 *     return path_list
 * 
 */
  __pyx_t_3 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_node, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":299
 *     path_list = []
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)
 *     return path_list             # <<<<<<<<<<<<<<
 * 
 * cdef int _recursiveBuildDescendantPaths(tree.xmlNode* c_node,
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_path_list));
  __pyx_r = __pyx_v_path_list;
  goto __pyx_L0;

  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify._buildDescendantPaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_path_list);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_v_prefix_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":301
 *     return path_list
 * 
 * cdef int _recursiveBuildDescendantPaths(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
 *                                         list path, list path_list) except -1:
 *     u"""Fills the list 'path_list' with all descendant paths, initial prefix
 */

static int __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_path, PyObject *__pyx_v_path_list) {
  PyObject *__pyx_v_dict_result;
  xmlNode *__pyx_v_c_child;
  PyObject *__pyx_v_tags = 0;
  const xmlChar *__pyx_v_c_href;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_v_count = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_recursiveBuildDescendantPaths", 0);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":308
 *     cdef python.PyObject* dict_result
 *     cdef tree.xmlNode* c_child
 *     cdef dict tags = {}             # <<<<<<<<<<<<<<
 *     path_list.append( u'.'.join(path) )
 *     c_href = tree._getNs(c_node)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_tags = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":309
 *     cdef tree.xmlNode* c_child
 *     cdef dict tags = {}
 *     path_list.append( u'.'.join(path) )             # <<<<<<<<<<<<<<
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children
 */
  if (unlikely(((PyObject *)__pyx_v_path_list) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)PyUnicode_Join(__pyx_kp_u_9, ((PyObject *)__pyx_v_path))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_Append(__pyx_v_path_list, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":310
 *     cdef dict tags = {}
 *     path_list.append( u'.'.join(path) )
 *     c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
 *     c_child = c_node.children
 *     while c_child is not NULL:
 */
  __pyx_v_c_href = _getNs(__pyx_v_c_node);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":311
 *     path_list.append( u'.'.join(path) )
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children             # <<<<<<<<<<<<<<
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 */
  __pyx_v_c_child = __pyx_v_c_node->children;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":312
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children
 *     while c_child is not NULL:             # <<<<<<<<<<<<<<
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_c_child != NULL);
    if (!__pyx_t_3) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":313
 *     c_child = c_node.children
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
 *             c_child = c_child.next
 *             if c_child is NULL:
 */
    while (1) {
      __pyx_t_3 = (__pyx_v_c_child->type != XML_ELEMENT_NODE);
      if (!__pyx_t_3) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":314
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next             # <<<<<<<<<<<<<<
 *             if c_child is NULL:
 *                 return 0
 */
      __pyx_v_c_child = __pyx_v_c_child->next;

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":315
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next
 *             if c_child is NULL:             # <<<<<<<<<<<<<<
 *                 return 0
 *         if c_href is tree._getNs(c_child):
 */
      __pyx_t_3 = (__pyx_v_c_child == NULL);
      if (__pyx_t_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":316
 *             c_child = c_child.next
 *             if c_child is NULL:
 *                 return 0             # <<<<<<<<<<<<<<
 *         if c_href is tree._getNs(c_child):
 *             tag = pyunicode(c_child.name)
 */
        __pyx_r = 0;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      __pyx_L7:;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":317
 *             if c_child is NULL:
 *                 return 0
 *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<<
 *             tag = pyunicode(c_child.name)
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
 */
    __pyx_t_3 = (__pyx_v_c_href == _getNs(__pyx_v_c_child));
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":318
 *                 return 0
 *         if c_href is tree._getNs(c_child):
 *             tag = pyunicode(c_child.name)             # <<<<<<<<<<<<<<
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
 *             # special case: parent has namespace, child does not
 */
      __pyx_t_1 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L8;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":319
 *         if c_href is tree._getNs(c_child):
 *             tag = pyunicode(c_child.name)
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<<
 *             # special case: parent has namespace, child does not
 *             tag = u'{}' + pyunicode(c_child.name)
 */
    __pyx_t_3 = (__pyx_v_c_href != NULL);
    if (__pyx_t_3) {
      __pyx_t_4 = (_getNs(__pyx_v_c_child) == NULL);
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":321
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
 *             # special case: parent has namespace, child does not
 *             tag = u'{}' + pyunicode(c_child.name)             # <<<<<<<<<<<<<<
 *         else:
 *             tag = cetree.namespacedName(c_child)
 */
      __pyx_t_1 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_u_59), __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":323
 *             tag = u'{}' + pyunicode(c_child.name)
 *         else:
 *             tag = cetree.namespacedName(c_child)             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         count = (<object>dict_result) + 1 if dict_result is not NULL else 0
 */
      __pyx_t_6 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_6;
      __pyx_t_6 = 0;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":324
 *         else:
 *             tag = cetree.namespacedName(c_child)
 *         dict_result = python.PyDict_GetItem(tags, tag)             # <<<<<<<<<<<<<<
 *         count = (<object>dict_result) + 1 if dict_result is not NULL else 0
 *         tags[tag] = count
 */
    __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag);

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":325
 *             tag = cetree.namespacedName(c_child)
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         count = (<object>dict_result) + 1 if dict_result is not NULL else 0             # <<<<<<<<<<<<<<
 *         tags[tag] = count
 *         if count > 0:
 */
    if ((__pyx_v_dict_result != NULL)) {
      __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_dict_result), __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __pyx_t_1;
      __pyx_t_1 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_6 = __pyx_int_0;
    }
    __Pyx_XDECREF(__pyx_v_count);
    __pyx_v_count = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":326
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         count = (<object>dict_result) + 1 if dict_result is not NULL else 0
 *         tags[tag] = count             # <<<<<<<<<<<<<<
 *         if count > 0:
 *             tag += u'[%d]' % count
 */
    if (PyDict_SetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":327
 *         count = (<object>dict_result) + 1 if dict_result is not NULL else 0
 *         tags[tag] = count
 *         if count > 0:             # <<<<<<<<<<<<<<
 *             tag += u'[%d]' % count
 *         path.append(tag)
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_count, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":328
 *         tags[tag] = count
 *         if count > 0:
 *             tag += u'[%d]' % count             # <<<<<<<<<<<<<<
 *         path.append(tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 */
      __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_60), __pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_tag, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":329
 *         if count > 0:
 *             tag += u'[%d]' % count
 *         path.append(tag)             # <<<<<<<<<<<<<<
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]
 */
    if (unlikely(((PyObject *)__pyx_v_path) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = PyList_Append(__pyx_v_path, __pyx_v_tag); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":330
 *             tag += u'[%d]' % count
 *         path.append(tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)             # <<<<<<<<<<<<<<
 *         del path[-1]
 *         c_child = c_child.next
 */
    __pyx_t_7 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_child, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":331
 *         path.append(tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]             # <<<<<<<<<<<<<<
 *         c_child = c_child.next
 *     return 0
 */
    if (unlikely(((PyObject *)__pyx_v_path) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (__Pyx_DelItemInt(((PyObject *)__pyx_v_path), -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":332
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]
 *         c_child = c_child.next             # <<<<<<<<<<<<<<
 *     return 0
 */
    __pyx_v_c_child = __pyx_v_c_child->next;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":333
 *         del path[-1]
 *         c_child = c_child.next
 *     return 0             # <<<<<<<<<<<<<<
 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify._recursiveBuildDescendantPaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tags);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_4lxml_9objectify_PyType *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_4lxml_9objectify_PyType *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  p->type_check = Py_None; Py_INCREF(Py_None);
  p->stringify = Py_None; Py_INCREF(Py_None);
  p->_type = Py_None; Py_INCREF(Py_None);
  p->_schema_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify_PyType(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
  Py_XDECREF(p->name);
  Py_XDECREF(p->type_check);
  Py_XDECREF(p->stringify);
  Py_XDECREF(p->_type);
  Py_XDECREF(((PyObject *)p->_schema_types));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4lxml_9objectify_PyType(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  if (p->type_check) {
    e = (*v)(p->type_check, a); if (e) return e;
  }
  if (p->stringify) {
    e = (*v)(p->stringify, a); if (e) return e;
  }
  if (p->_type) {
    e = (*v)(p->_type, a); if (e) return e;
  }
  if (p->_schema_types) {
    e = (*v)(p->_schema_types, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify_PyType(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->type_check);
  p->type_check = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->stringify);
  p->stringify = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_type);
  p->_type = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_schema_types);
  p->_schema_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(o);
}

static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(o);
}

static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_type_check(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(o);
}

static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_stringify(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
  {__Pyx_NAMESTR("register"), (PyCFunction)__pyx_pw_4lxml_9objectify_6PyType_5register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_4register)},
  {__Pyx_NAMESTR("unregister"), (PyCFunction)__pyx_pw_4lxml_9objectify_6PyType_7unregister, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_6unregister)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_PyType[] = {
  {(char *)"xmlSchemaTypes", __pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __Pyx_DOCSTR(__pyx_k_61), 0},
  {(char *)"name", __pyx_getprop_4lxml_9objectify_6PyType_name, 0, 0, 0},
  {(char *)"type_check", __pyx_getprop_4lxml_9objectify_6PyType_type_check, 0, 0, 0},
  {(char *)"stringify", __pyx_getprop_4lxml_9objectify_6PyType_stringify, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_PyType = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_PyType = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_PyType = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_PyType = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_PyType = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.PyType"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_PyType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_PyType, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_6PyType_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_PyType, /*tp_as_number*/
  &__pyx_tp_as_sequence_PyType, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_PyType, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_PyType, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("PyType(self, name, type_check, type_class, stringify=None)\n    User defined type.\n\n    Named type that contains a type check function and a type class that\n    inherits from ObjectifiedDataElement.  The type check must take a string\n    as argument and raise ValueError or TypeError if it cannot handle the\n    string value.  It may be None in which case it is not considered for type\n    guessing.\n\n    Example::\n\n        PyType('int', int, MyIntClass).register()\n\n    Note that the order in which types are registered matters.  The first\n    matching type will be used.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_PyType, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_PyType, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_PyType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_PyType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4lxml_9objectify_6PyType_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4lxml_9objectify_PyType, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_new(t, a, k);
  if (!o) return 0;
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
  __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_dealloc(o);
}

static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(PyObject *o, visitproc v, void *a) {
  int e;
  if (__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_traverse) {
    e = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_traverse(o, v, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
  if (__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_clear) {
    __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_clear(o);
  }
  return 0;
}
static PyObject *__pyx_sq_item_4lxml_9objectify_ObjectifiedElement(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(o, i);
  }
}

static PyObject *__pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n) {
  PyObject *v = PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(o, n, v);
  }
  else {
    return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(o, n);
  }
}

static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(o);
}

static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("countchildren"), (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren)},
  {__Pyx_NAMESTR("getchildren"), (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren)},
  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__)},
  {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_18addattr)},
  {__Pyx_NAMESTR("descendantpaths"), (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_26descendantpaths)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedElement[] = {
  {(char *)"text", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text, 0, 0, 0},
  {(char *)"__dict__", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__, 0, __Pyx_DOCSTR(__pyx_k_62), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ObjectifiedElement = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_4lxml_9objectify_ObjectifiedElement, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedElement = {
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.ObjectifiedElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ObjectifiedElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_ObjectifiedElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ObjectifiedElement, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__, /*tp_str*/
  __pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement, /*tp_getattro*/
  __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement, /*tp_setattro*/
  &__pyx_tp_as_buffer_ObjectifiedElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Main XML Element class.\n\n    Element children are accessed as object attributes.  Multiple children\n    with the same name are available through a list index.  Example::\n\n       >>> root = XML(\"<root><c1><c2>0</c2><c2>1</c2></c1></root>\")\n       >>> second_c2 = root.c1.c2[1]\n       >>> print(second_c2.text)\n       1\n\n    Note that you cannot (and must not) instantiate this class or its\n    subclasses.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_ObjectifiedElement, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_ObjectifiedElement, /*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_4lxml_9objectify_ObjectifiedElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyObject *__pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
  {__Pyx_NAMESTR("_setText"), (PyCFunction)__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_22ObjectifiedDataElement_4_setText)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement[] = {
  {(char *)"pyval", __pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ObjectifiedDataElement = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedDataElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedDataElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedDataElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedDataElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.ObjectifiedDataElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_ObjectifiedDataElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_ObjectifiedDataElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ObjectifiedDataElement, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ObjectifiedDataElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("This is the base class for all data type Elements.  Subclasses should\n    override the 'pyval' property and possibly the __str__ method.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_ObjectifiedDataElement, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement, /*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_4lxml_9objectify_ObjectifiedDataElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4lxml_9objectify_NumberElement *p;
  PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4lxml_9objectify_NumberElement *)o);
  p->_parse_value = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify_NumberElement(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
  Py_XDECREF(p->_parse_value);
  __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(o);
}

static int __pyx_tp_traverse_4lxml_9objectify_NumberElement(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
  e = __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(o, v, a); if (e) return e;
  if (p->_parse_value) {
    e = (*v)(p->_parse_value, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify_NumberElement(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
  PyObject* tmp;
  __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(o);
  tmp = ((PyObject*)p->_parse_value);
  p->_parse_value = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4lxml_9objectify_13NumberElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
  {__Pyx_NAMESTR("_setValueParser"), (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_13NumberElement__setValueParser)},
  {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NumberElement[] = {
  {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13NumberElement_pyval, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_NumberElement = {
  __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
  __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
  __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
  #endif
  __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
  0, /*nb_divmod*/
  __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
  __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
  __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
  __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
  __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
  __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
  __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
  __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
  __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
  __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
  __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_NumberElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_NumberElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_NumberElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_NumberElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.NumberElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_NumberElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
  &__pyx_tp_as_number_NumberElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_NumberElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_NumberElement, /*tp_as_mapping*/
  __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_NumberElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
  __pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_NumberElement, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_NumberElement, /*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_4lxml_9objectify_NumberElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pw_4lxml_9objectify_10IntElement_1_init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_IntElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
  #else
  0, /*nb_add*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
  #else
  0, /*nb_subtract*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
  #else
  0, /*nb_multiply*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
  #else
  0, /*nb_remainder*/
  #endif
  0, /*nb_divmod*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
  #else
  0, /*nb_power*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
  #else
  0, /*nb_nonzero*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
  #else
  0, /*nb_invert*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
  #else
  0, /*nb_lshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
  #else
  0, /*nb_rshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
  #else
  0, /*nb_and*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
  #else
  0, /*nb_xor*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
  #else
  0, /*nb_or*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
  #else
  0, /*nb_true_divide*/
  #endif
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_IntElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_IntElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_IntElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_IntElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.IntElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_IntElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_IntElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_IntElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_IntElement, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_IntElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_IntElement, /*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_4lxml_9objectify_IntElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pw_4lxml_9objectify_11LongElement_1_init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_LongElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
  #else
  0, /*nb_add*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
  #else
  0, /*nb_subtract*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
  #else
  0, /*nb_multiply*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
  #else
  0, /*nb_remainder*/
  #endif
  0, /*nb_divmod*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
  #else
  0, /*nb_power*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
  #else
  0, /*nb_nonzero*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
  #else
  0, /*nb_invert*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
  #else
  0, /*nb_lshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
  #else
  0, /*nb_rshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
  #else
  0, /*nb_and*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
  #else
  0, /*nb_xor*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
  #else
  0, /*nb_or*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
  #else
  0, /*nb_true_divide*/
  #endif
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_LongElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_LongElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_LongElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_LongElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.LongElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_LongElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_LongElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_LongElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_LongElement, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_LongElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_LongElement, /*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_4lxml_9objectify_LongElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pw_4lxml_9objectify_12FloatElement_1_init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_FloatElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
  #else
  0, /*nb_add*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
  #else
  0, /*nb_subtract*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
  #else
  0, /*nb_multiply*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
  #else
  0, /*nb_remainder*/
  #endif
  0, /*nb_divmod*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
  #else
  0, /*nb_power*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
  #else
  0, /*nb_nonzero*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
  #else
  0, /*nb_invert*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
  #else
  0, /*nb_lshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
  #else
  0, /*nb_rshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
  #else
  0, /*nb_and*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
  #else
  0, /*nb_xor*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
  #else
  0, /*nb_or*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
  #else
  0, /*nb_true_divide*/
  #endif
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_FloatElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_FloatElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_FloatElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_FloatElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.FloatElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_FloatElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_FloatElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_FloatElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_FloatElement, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_FloatElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_FloatElement, /*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_4lxml_9objectify_FloatElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyObject *__pyx_getprop_4lxml_9objectify_13StringElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
  {__Pyx_NAMESTR("strlen"), (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_3strlen, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_23__complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_StringElement[] = {
  {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13StringElement_pyval, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_StringElement = {
  __pyx_pw_4lxml_9objectify_13StringElement_11__add__, /*nb_add*/
  0, /*nb_subtract*/
  __pyx_pw_4lxml_9objectify_13StringElement_13__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  __pyx_pw_4lxml_9objectify_13StringElement_15__mod__, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4lxml_9objectify_13StringElement_17__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4lxml_9objectify_13StringElement_19__long__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_13StringElement_21__float__, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_StringElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_StringElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_StringElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_StringElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.StringElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_StringElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_13StringElement_1__repr__, /*tp_repr*/
  &__pyx_tp_as_number_StringElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_StringElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_StringElement, /*tp_as_mapping*/
  __pyx_pw_4lxml_9objectify_13StringElement_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_StringElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("String data class.\n\n    Note that this class does *not* support the sequence protocol of strings:\n    len(), iter(), str_attr[0], str_attr[0:1], etc. are *not* supported.\n    Instead, use the .text attribute to get a 'real' string.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
  __pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_StringElement, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_StringElement, /*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_4lxml_9objectify_StringElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyObject *__pyx_getprop_4lxml_9objectify_11NoneElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NoneElement[] = {
  {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11NoneElement_pyval, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_NoneElement = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_NoneElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_NoneElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_NoneElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_NoneElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.NoneElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_NoneElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_11NoneElement_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_NoneElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_NoneElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_NoneElement, /*tp_as_mapping*/
  __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_4lxml_9objectify_11NoneElement_1__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_NoneElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
  __pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_NoneElement, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_NoneElement, /*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_4lxml_9objectify_NoneElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
  if (!o) return 0;
  return o;
}

static PyObject *__pyx_getprop_4lxml_9objectify_11BoolElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pw_4lxml_9objectify_11BoolElement_1_init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_BoolElement[] = {
  {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11BoolElement_pyval, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_BoolElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
  #else
  0, /*nb_add*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
  #else
  0, /*nb_subtract*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
  #else
  0, /*nb_multiply*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
  #else
  0, /*nb_remainder*/
  #endif
  0, /*nb_divmod*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
  #else
  0, /*nb_power*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__, /*nb_nonzero*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
  #else
  0, /*nb_invert*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
  #else
  0, /*nb_lshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
  #else
  0, /*nb_rshift*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
  #else
  0, /*nb_and*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
  #else
  0, /*nb_xor*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
  #else
  0, /*nb_or*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
  #else
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
  #else
  0, /*nb_true_divide*/
  #endif
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_BoolElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
  #else
  0, /*sq_length*/
  #endif
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_BoolElement = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_BoolElement = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_BoolElement = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.BoolElement"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_BoolElement), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_4lxml_9objectify_11BoolElement_11__repr__, /*tp_repr*/
  &__pyx_tp_as_number_BoolElement, /*tp_as_number*/
  &__pyx_tp_as_sequence_BoolElement, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_BoolElement, /*tp_as_mapping*/
  __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_4lxml_9objectify_11BoolElement_9__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_BoolElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Boolean type base on string values: 'true' or 'false'.\n\n    Note that this inherits from IntElement to mimic the behaviour of\n    Python's bool type.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
  __pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_BoolElement, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_BoolElement, /*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_4lxml_9objectify_BoolElement, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o);
  p->_tag = Py_None; Py_INCREF(Py_None);
  p->_nsmap = Py_None; Py_INCREF(Py_None);
  p->_element_factory = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
  Py_XDECREF(p->_tag);
  Py_XDECREF(p->_nsmap);
  Py_XDECREF(p->_element_factory);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
  if (p->_tag) {
    e = (*v)(p->_tag, a); if (e) return e;
  }
  if (p->_nsmap) {
    e = (*v)(p->_nsmap, a); if (e) return e;
  }
  if (p->_element_factory) {
    e = (*v)(p->_element_factory, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->_tag);
  p->_tag = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_nsmap);
  p->_nsmap = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_element_factory);
  p->_element_factory = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__ObjectifyElementMakerCaller = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence__ObjectifyElementMakerCaller = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__ObjectifyElementMakerCaller = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__ObjectifyElementMakerCaller = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify._ObjectifyElementMakerCaller"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number__ObjectifyElementMakerCaller, /*tp_as_number*/
  &__pyx_tp_as_sequence__ObjectifyElementMakerCaller, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__ObjectifyElementMakerCaller, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__ObjectifyElementMakerCaller, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller, /*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_4lxml_9objectify__ObjectifyElementMakerCaller, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_4lxml_9objectify_ElementMaker *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)o);
  p->_makeelement = Py_None; Py_INCREF(Py_None);
  p->_namespace = Py_None; Py_INCREF(Py_None);
  p->_nsmap = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify_ElementMaker(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
  Py_XDECREF(p->_makeelement);
  Py_XDECREF(p->_namespace);
  Py_XDECREF(p->_nsmap);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4lxml_9objectify_ElementMaker(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
  if (p->_makeelement) {
    e = (*v)(p->_makeelement, a); if (e) return e;
  }
  if (p->_namespace) {
    e = (*v)(p->_namespace, a); if (e) return e;
  }
  if (p->_nsmap) {
    e = (*v)(p->_nsmap, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify_ElementMaker(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->_makeelement);
  p->_makeelement = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_namespace);
  p->_namespace = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_nsmap);
  p->_nsmap = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_4lxml_9objectify_ElementMaker(PyObject *o, PyObject *n) {
  PyObject *v = PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(o, n);
  }
  return v;
}

static PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ElementMaker = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ElementMaker = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ElementMaker = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ElementMaker = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_ElementMaker = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.ElementMaker"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_ElementMaker), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ElementMaker, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ElementMaker, /*tp_as_number*/
  &__pyx_tp_as_sequence_ElementMaker, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ElementMaker, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_4lxml_9objectify_ElementMaker, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ElementMaker, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)\n\n    An ElementMaker that can be used for constructing trees.\n\n    Example::\n\n      >>> M = ElementMaker(annotate=False)\n      >>> html = M.html( M.body( M.p('hello', M.br, 'objectify') ) )\n\n      >>> from lxml.etree import tostring\n      >>> print(tostring(html, method='html').decode('ascii'))\n      <html><body><p>hello<br>objectify</p></body></html>\n\n    Note that this module has a predefined ElementMaker instance called ``E``.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ElementMaker, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ElementMaker, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_ElementMaker, /*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*/
  __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4lxml_9objectify_ElementMaker, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p;
  PyObject *o = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o);
  p->empty_data_class = Py_None; Py_INCREF(Py_None);
  p->tree_class = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
  Py_XDECREF(p->empty_data_class);
  Py_XDECREF(p->tree_class);
  __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_dealloc(o);
}

static int __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
  if (__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_traverse) {
    e = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->empty_data_class) {
    e = (*v)(p->empty_data_class, a); if (e) return e;
  }
  if (p->tree_class) {
    e = (*v)(p->tree_class, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
  PyObject* tmp;
  if (__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_clear) {
    __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_clear(o);
  }
  tmp = ((PyObject*)p->empty_data_class);
  p->empty_data_class = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->tree_class);
  p->tree_class = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ObjectifyElementClassLookup = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ObjectifyElementClassLookup = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ObjectifyElementClassLookup = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ObjectifyElementClassLookup = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.ObjectifyElementClassLookup"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ObjectifyElementClassLookup, /*tp_as_number*/
  &__pyx_tp_as_sequence_ObjectifyElementClassLookup, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ObjectifyElementClassLookup, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ObjectifyElementClassLookup, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)\n    Element class lookup method that uses the objectify classes.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup, /*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*/
  __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_4lxml_9objectify_ObjectPath *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)o);
  p->find = Py_None; Py_INCREF(Py_None);
  p->_path = Py_None; Py_INCREF(Py_None);
  p->_path_str = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4lxml_9objectify_ObjectPath(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->find);
  Py_XDECREF(p->_path);
  Py_XDECREF(p->_path_str);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4lxml_9objectify_ObjectPath(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
  if (p->find) {
    e = (*v)(p->find, a); if (e) return e;
  }
  if (p->_path) {
    e = (*v)(p->_path, a); if (e) return e;
  }
  if (p->_path_str) {
    e = (*v)(p->_path_str, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4lxml_9objectify_ObjectPath(PyObject *o) {
  struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->find);
  p->find = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_path);
  p->_path = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_path_str);
  p->_path_str = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4lxml_9objectify_10ObjectPath_find(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(o);
}

static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
  {__Pyx_NAMESTR("hasattr"), (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr)},
  {__Pyx_NAMESTR("setattr"), (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_10setattr)},
  {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_12addattr)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectPath[] = {
  {(char *)"find", __pyx_getprop_4lxml_9objectify_10ObjectPath_find, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ObjectPath = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ObjectPath = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ObjectPath = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ObjectPath = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_4lxml_9objectify_ObjectPath = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("lxml.objectify.ObjectPath"), /*tp_name*/
  sizeof(struct __pyx_obj_4lxml_9objectify_ObjectPath), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4lxml_9objectify_ObjectPath, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ObjectPath, /*tp_as_number*/
  &__pyx_tp_as_sequence_ObjectPath, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ObjectPath, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_4lxml_9objectify_10ObjectPath_7__call__, /*tp_call*/
  __pyx_pw_4lxml_9objectify_10ObjectPath_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ObjectPath, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("ObjectPath(path)\n    Immutable object that represents a compiled object path.\n\n    Example for a path: 'root.child[1].{other}child[25]'\n    "), /*tp_doc*/
  __pyx_tp_traverse_4lxml_9objectify_ObjectPath, /*tp_traverse*/
  __pyx_tp_clear_4lxml_9objectify_ObjectPath, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4lxml_9objectify_ObjectPath, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4lxml_9objectify_ObjectPath, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4lxml_9objectify_ObjectPath, /*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*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("__parseBool"), (PyCFunction)__pyx_pw_4lxml_9objectify_5__parseBool, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("objectify"),
    __Pyx_DOCSTR(__pyx_k_63), /* 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_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
  {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 1, 0, 0},
  {&__pyx_kp_u_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 1, 0, 0},
  {&__pyx_kp_u_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 1, 0, 0},
  {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 1, 0, 0},
  {&__pyx_kp_u_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 1, 0, 0},
  {&__pyx_kp_u_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 1, 0, 0},
  {&__pyx_kp_u_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 1, 0, 0},
  {&__pyx_kp_u_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 1, 0, 0},
  {&__pyx_kp_u_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 1, 0, 0},
  {&__pyx_kp_u_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 1, 0, 0},
  {&__pyx_kp_u_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 1, 0, 0},
  {&__pyx_kp_u_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 1, 0, 0},
  {&__pyx_kp_u_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 1, 0, 0},
  {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 1, 0, 0},
  {&__pyx_kp_u_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 1, 0, 0},
  {&__pyx_n_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 1},
  {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 1, 0, 0},
  {&__pyx_kp_u_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 1, 0, 0},
  {&__pyx_kp_u_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 1, 0, 0},
  {&__pyx_kp_u_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 1, 0, 0},
  {&__pyx_n_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 1},
  {&__pyx_kp_b_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 0, 0},
  {&__pyx_kp_u_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 1, 0, 0},
  {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 1, 0, 0},
  {&__pyx_kp_u_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 1, 0, 0},
  {&__pyx_n_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 1},
  {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0, 0},
  {&__pyx_kp_u_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 1, 0, 0},
  {&__pyx_kp_u_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 1, 0, 0},
  {&__pyx_kp_u_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 1, 0, 0},
  {&__pyx_kp_u_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 1, 0, 0},
  {&__pyx_kp_u_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 1, 0, 0},
  {&__pyx_kp_u_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 1, 0, 0},
  {&__pyx_kp_u_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 1, 0, 0},
  {&__pyx_kp_u_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 1, 0, 0},
  {&__pyx_kp_u_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 1, 0, 0},
  {&__pyx_kp_u_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 1, 0, 0},
  {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0},
  {&__pyx_kp_u_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 1, 0, 0},
  {&__pyx_n_u_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 1, 0, 1},
  {&__pyx_n_u_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 1, 0, 1},
  {&__pyx_n_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 1},
  {&__pyx_n_u_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 1, 0, 1},
  {&__pyx_n_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 1},
  {&__pyx_n_u_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 1, 0, 1},
  {&__pyx_kp_u_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 1, 0, 0},
  {&__pyx_kp_u_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 1, 0, 0},
  {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
  {&__pyx_n_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 1},
  {&__pyx_kp_u_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 1, 0, 0},
  {&__pyx_kp_u_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 1, 0, 0},
  {&__pyx_kp_u_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 1, 0, 0},
  {&__pyx_kp_u_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 1, 0, 0},
  {&__pyx_kp_u_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 1, 0, 0},
  {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 1, 0, 0},
  {&__pyx_n_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 1},
  {&__pyx_kp_u__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 1, 0, 0},
  {&__pyx_kp_u__1, __pyx_k__1, sizeof(__pyx_k__1), 0, 1, 0, 0},
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
  {&__pyx_n_u__BoolElement, __pyx_k__BoolElement, sizeof(__pyx_k__BoolElement), 0, 1, 0, 1},
  {&__pyx_n_s__DataElement, __pyx_k__DataElement, sizeof(__pyx_k__DataElement), 0, 0, 1, 1},
  {&__pyx_n_u__DataElement, __pyx_k__DataElement, sizeof(__pyx_k__DataElement), 0, 1, 0, 1},
  {&__pyx_n_s__E, __pyx_k__E, sizeof(__pyx_k__E), 0, 0, 1, 1},
  {&__pyx_n_u__E, __pyx_k__E, sizeof(__pyx_k__E), 0, 1, 0, 1},
  {&__pyx_n_u__ENTITY, __pyx_k__ENTITY, sizeof(__pyx_k__ENTITY), 0, 1, 0, 1},
  {&__pyx_n_s__Element, __pyx_k__Element, sizeof(__pyx_k__Element), 0, 0, 1, 1},
  {&__pyx_n_u__Element, __pyx_k__Element, sizeof(__pyx_k__Element), 0, 1, 0, 1},
  {&__pyx_n_u__ElementMaker, __pyx_k__ElementMaker, sizeof(__pyx_k__ElementMaker), 0, 1, 0, 1},
  {&__pyx_n_s__ElementTree, __pyx_k__ElementTree, sizeof(__pyx_k__ElementTree), 0, 0, 1, 1},
  {&__pyx_n_u__FloatElement, __pyx_k__FloatElement, sizeof(__pyx_k__FloatElement), 0, 1, 0, 1},
  {&__pyx_n_u__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 1, 0, 1},
  {&__pyx_n_u__IDREF, __pyx_k__IDREF, sizeof(__pyx_k__IDREF), 0, 1, 0, 1},
  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
  {&__pyx_n_u__IntElement, __pyx_k__IntElement, sizeof(__pyx_k__IntElement), 0, 1, 0, 1},
  {&__pyx_n_u__LongElement, __pyx_k__LongElement, sizeof(__pyx_k__LongElement), 0, 1, 0, 1},
  {&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1},
  {&__pyx_n_u__NCName, __pyx_k__NCName, sizeof(__pyx_k__NCName), 0, 1, 0, 1},
  {&__pyx_n_u__NMTOKEN, __pyx_k__NMTOKEN, sizeof(__pyx_k__NMTOKEN), 0, 1, 0, 1},
  {&__pyx_n_u__Name, __pyx_k__Name, sizeof(__pyx_k__Name), 0, 1, 0, 1},
  {&__pyx_n_u__None, __pyx_k__None, sizeof(__pyx_k__None), 0, 1, 0, 1},
  {&__pyx_n_u__NoneElement, __pyx_k__NoneElement, sizeof(__pyx_k__NoneElement), 0, 1, 0, 1},
  {&__pyx_n_u__NoneType, __pyx_k__NoneType, sizeof(__pyx_k__NoneType), 0, 1, 0, 1},
  {&__pyx_n_u__NumberElement, __pyx_k__NumberElement, sizeof(__pyx_k__NumberElement), 0, 1, 0, 1},
  {&__pyx_n_u__ObjectPath, __pyx_k__ObjectPath, sizeof(__pyx_k__ObjectPath), 0, 1, 0, 1},
  {&__pyx_n_u__ObjectifiedElement, __pyx_k__ObjectifiedElement, sizeof(__pyx_k__ObjectifiedElement), 0, 1, 0, 1},
  {&__pyx_n_s__PYTYPE_ATTRIBUTE, __pyx_k__PYTYPE_ATTRIBUTE, sizeof(__pyx_k__PYTYPE_ATTRIBUTE), 0, 0, 1, 1},
  {&__pyx_n_u__PYTYPE_ATTRIBUTE, __pyx_k__PYTYPE_ATTRIBUTE, sizeof(__pyx_k__PYTYPE_ATTRIBUTE), 0, 1, 0, 1},
  {&__pyx_n_u__PyType, __pyx_k__PyType, sizeof(__pyx_k__PyType), 0, 1, 0, 1},
  {&__pyx_n_u__StringElement, __pyx_k__StringElement, sizeof(__pyx_k__StringElement), 0, 1, 0, 1},
  {&__pyx_n_s__SubElement, __pyx_k__SubElement, sizeof(__pyx_k__SubElement), 0, 0, 1, 1},
  {&__pyx_n_u__SubElement, __pyx_k__SubElement, sizeof(__pyx_k__SubElement), 0, 1, 0, 1},
  {&__pyx_n_u__TREE, __pyx_k__TREE, sizeof(__pyx_k__TREE), 0, 1, 0, 1},
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
  {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__XML, __pyx_k__XML, sizeof(__pyx_k__XML), 0, 0, 1, 1},
  {&__pyx_n_u__XML, __pyx_k__XML, sizeof(__pyx_k__XML), 0, 1, 0, 1},
  {&__pyx_n_s__XMLParser, __pyx_k__XMLParser, sizeof(__pyx_k__XMLParser), 0, 0, 1, 1},
  {&__pyx_n_s___ElementTree, __pyx_k___ElementTree, sizeof(__pyx_k___ElementTree), 0, 0, 1, 1},
  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
  {&__pyx_n_s____call__, __pyx_k____call__, sizeof(__pyx_k____call__), 0, 0, 1, 1},
  {&__pyx_n_s____checkBool, __pyx_k____checkBool, sizeof(__pyx_k____checkBool), 0, 0, 1, 1},
  {&__pyx_n_s____copy__, __pyx_k____copy__, sizeof(__pyx_k____copy__), 0, 0, 1, 1},
  {&__pyx_n_s____getattr__, __pyx_k____getattr__, sizeof(__pyx_k____getattr__), 0, 0, 1, 1},
  {&__pyx_n_s____getitem__, __pyx_k____getitem__, sizeof(__pyx_k____getitem__), 0, 0, 1, 1},
  {&__pyx_n_s____lower_bool, __pyx_k____lower_bool, sizeof(__pyx_k____lower_bool), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1},
  {&__pyx_n_s____parseBool, __pyx_k____parseBool, sizeof(__pyx_k____parseBool), 0, 0, 1, 1},
  {&__pyx_n_s____set__, __pyx_k____set__, sizeof(__pyx_k____set__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1},
  {&__pyx_n_s___attributes, __pyx_k___attributes, sizeof(__pyx_k___attributes), 0, 0, 1, 1},
  {&__pyx_n_s___pytype, __pyx_k___pytype, sizeof(__pyx_k___pytype), 0, 0, 1, 1},
  {&__pyx_n_s___tag, __pyx_k___tag, sizeof(__pyx_k___tag), 0, 0, 1, 1},
  {&__pyx_n_s___value, __pyx_k___value, sizeof(__pyx_k___value), 0, 0, 1, 1},
  {&__pyx_n_s___xsi, __pyx_k___xsi, sizeof(__pyx_k___xsi), 0, 0, 1, 1},
  {&__pyx_n_s__addnext, __pyx_k__addnext, sizeof(__pyx_k__addnext), 0, 0, 1, 1},
  {&__pyx_n_s__after, __pyx_k__after, sizeof(__pyx_k__after), 0, 0, 1, 1},
  {&__pyx_n_s__annotate, __pyx_k__annotate, sizeof(__pyx_k__annotate), 0, 0, 1, 1},
  {&__pyx_n_u__annotate, __pyx_k__annotate, sizeof(__pyx_k__annotate), 0, 1, 0, 1},
  {&__pyx_n_s__annotate_pytype, __pyx_k__annotate_pytype, sizeof(__pyx_k__annotate_pytype), 0, 0, 1, 1},
  {&__pyx_n_s__annotate_xsi, __pyx_k__annotate_xsi, sizeof(__pyx_k__annotate_xsi), 0, 0, 1, 1},
  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
  {&__pyx_n_s__attrib, __pyx_k__attrib, sizeof(__pyx_k__attrib), 0, 0, 1, 1},
  {&__pyx_n_s__attribute_names, __pyx_k__attribute_names, sizeof(__pyx_k__attribute_names), 0, 0, 1, 1},
  {&__pyx_n_s__attribute_tag, __pyx_k__attribute_tag, sizeof(__pyx_k__attribute_tag), 0, 0, 1, 1},
  {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
  {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1},
  {&__pyx_n_u__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 1, 0, 1},
  {&__pyx_n_s__base_url, __pyx_k__base_url, sizeof(__pyx_k__base_url), 0, 0, 1, 1},
  {&__pyx_n_s__before, __pyx_k__before, sizeof(__pyx_k__before), 0, 0, 1, 1},
  {&__pyx_n_u__bool, __pyx_k__bool, sizeof(__pyx_k__bool), 0, 1, 0, 1},
  {&__pyx_n_u__boolean, __pyx_k__boolean, sizeof(__pyx_k__boolean), 0, 1, 0, 1},
  {&__pyx_n_u__byte, __pyx_k__byte, sizeof(__pyx_k__byte), 0, 1, 0, 1},
  {&__pyx_n_s__check, __pyx_k__check, sizeof(__pyx_k__check), 0, 0, 1, 1},
  {&__pyx_n_s__cleanup_namespaces, __pyx_k__cleanup_namespaces, sizeof(__pyx_k__cleanup_namespaces), 0, 0, 1, 1},
  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
  {&__pyx_n_s__copy_reg, __pyx_k__copy_reg, sizeof(__pyx_k__copy_reg), 0, 0, 1, 1},
  {&__pyx_n_s__copyreg, __pyx_k__copyreg, sizeof(__pyx_k__copyreg), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__deannotate, __pyx_k__deannotate, sizeof(__pyx_k__deannotate), 0, 0, 1, 1},
  {&__pyx_n_u__deannotate, __pyx_k__deannotate, sizeof(__pyx_k__deannotate), 0, 1, 0, 1},
  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
  {&__pyx_n_s__dict_result, __pyx_k__dict_result, sizeof(__pyx_k__dict_result), 0, 0, 1, 1},
  {&__pyx_n_u__double, __pyx_k__double, sizeof(__pyx_k__double), 0, 1, 0, 1},
  {&__pyx_n_s__dump, __pyx_k__dump, sizeof(__pyx_k__dump), 0, 0, 1, 1},
  {&__pyx_n_u__dump, __pyx_k__dump, sizeof(__pyx_k__dump), 0, 1, 0, 1},
  {&__pyx_n_s__element, __pyx_k__element, sizeof(__pyx_k__element), 0, 0, 1, 1},
  {&__pyx_n_s__element_or_tree, __pyx_k__element_or_tree, sizeof(__pyx_k__element_or_tree), 0, 0, 1, 1},
  {&__pyx_n_s__empty_data_class, __pyx_k__empty_data_class, sizeof(__pyx_k__empty_data_class), 0, 0, 1, 1},
  {&__pyx_n_s__empty_pytype, __pyx_k__empty_pytype, sizeof(__pyx_k__empty_pytype), 0, 0, 1, 1},
  {&__pyx_n_s__empty_type, __pyx_k__empty_type, sizeof(__pyx_k__empty_type), 0, 0, 1, 1},
  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
  {&__pyx_n_s__etree, __pyx_k__etree, sizeof(__pyx_k__etree), 0, 0, 1, 1},
  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
  {&__pyx_n_u__false, __pyx_k__false, sizeof(__pyx_k__false), 0, 1, 0, 1},
  {&__pyx_n_u__float, __pyx_k__float, sizeof(__pyx_k__float), 0, 1, 0, 1},
  {&__pyx_n_s__fromstring, __pyx_k__fromstring, sizeof(__pyx_k__fromstring), 0, 0, 1, 1},
  {&__pyx_n_u__fromstring, __pyx_k__fromstring, sizeof(__pyx_k__fromstring), 0, 1, 0, 1},
  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
  {&__pyx_n_s__getRegisteredTypes, __pyx_k__getRegisteredTypes, sizeof(__pyx_k__getRegisteredTypes), 0, 0, 1, 1},
  {&__pyx_n_u__getRegisteredTypes, __pyx_k__getRegisteredTypes, sizeof(__pyx_k__getRegisteredTypes), 0, 1, 0, 1},
  {&__pyx_n_s__getparent, __pyx_k__getparent, sizeof(__pyx_k__getparent), 0, 0, 1, 1},
  {&__pyx_n_s__groups, __pyx_k__groups, sizeof(__pyx_k__groups), 0, 0, 1, 1},
  {&__pyx_n_s__hex, __pyx_k__hex, sizeof(__pyx_k__hex), 0, 0, 1, 1},
  {&__pyx_n_s__ignore_old, __pyx_k__ignore_old, sizeof(__pyx_k__ignore_old), 0, 0, 1, 1},
  {&__pyx_n_s__ignore_pytype, __pyx_k__ignore_pytype, sizeof(__pyx_k__ignore_pytype), 0, 0, 1, 1},
  {&__pyx_n_s__ignore_xsi, __pyx_k__ignore_xsi, sizeof(__pyx_k__ignore_xsi), 0, 0, 1, 1},
  {&__pyx_n_u__int, __pyx_k__int, sizeof(__pyx_k__int), 0, 1, 0, 1},
  {&__pyx_n_u__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 1, 0, 1},
  {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
  {&__pyx_n_s__iterchildren, __pyx_k__iterchildren, sizeof(__pyx_k__iterchildren), 0, 0, 1, 1},
  {&__pyx_n_s__known, __pyx_k__known, sizeof(__pyx_k__known), 0, 0, 1, 1},
  {&__pyx_n_s__kw, __pyx_k__kw, sizeof(__pyx_k__kw), 0, 0, 1, 1},
  {&__pyx_n_u__language, __pyx_k__language, sizeof(__pyx_k__language), 0, 1, 0, 1},
  {&__pyx_n_u__long, __pyx_k__long, sizeof(__pyx_k__long), 0, 1, 0, 1},
  {&__pyx_n_s__lxml, __pyx_k__lxml, sizeof(__pyx_k__lxml), 0, 0, 1, 1},
  {&__pyx_n_s__makeelement, __pyx_k__makeelement, sizeof(__pyx_k__makeelement), 0, 0, 1, 1},
  {&__pyx_n_s__makeparser, __pyx_k__makeparser, sizeof(__pyx_k__makeparser), 0, 0, 1, 1},
  {&__pyx_n_u__makeparser, __pyx_k__makeparser, sizeof(__pyx_k__makeparser), 0, 1, 0, 1},
  {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1},
  {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1},
  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
  {&__pyx_n_s__namespace, __pyx_k__namespace, sizeof(__pyx_k__namespace), 0, 0, 1, 1},
  {&__pyx_n_u__negativeInteger, __pyx_k__negativeInteger, sizeof(__pyx_k__negativeInteger), 0, 1, 0, 1},
  {&__pyx_n_s__new_parser, __pyx_k__new_parser, sizeof(__pyx_k__new_parser), 0, 0, 1, 1},
  {&__pyx_n_u__nonNegativeInteger, __pyx_k__nonNegativeInteger, sizeof(__pyx_k__nonNegativeInteger), 0, 1, 0, 1},
  {&__pyx_n_u__nonPositiveInteger, __pyx_k__nonPositiveInteger, sizeof(__pyx_k__nonPositiveInteger), 0, 1, 0, 1},
  {&__pyx_n_u__none, __pyx_k__none, sizeof(__pyx_k__none), 0, 1, 0, 1},
  {&__pyx_n_u__normalizedString, __pyx_k__normalizedString, sizeof(__pyx_k__normalizedString), 0, 1, 0, 1},
  {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1},
  {&__pyx_n_s__nsmap, __pyx_k__nsmap, sizeof(__pyx_k__nsmap), 0, 0, 1, 1},
  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
  {&__pyx_n_s__oct, __pyx_k__oct, sizeof(__pyx_k__oct), 0, 0, 1, 1},
  {&__pyx_n_s__on, __pyx_k__on, sizeof(__pyx_k__on), 0, 0, 1, 1},
  {&__pyx_n_s__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 0, 1, 1},
  {&__pyx_n_u__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 1, 0, 1},
  {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
  {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
  {&__pyx_n_s__pickle, __pyx_k__pickle, sizeof(__pyx_k__pickle), 0, 0, 1, 1},
  {&__pyx_n_u__positiveInteger, __pyx_k__positiveInteger, sizeof(__pyx_k__positiveInteger), 0, 1, 0, 1},
  {&__pyx_n_s__prefix, __pyx_k__prefix, sizeof(__pyx_k__prefix), 0, 0, 1, 1},
  {&__pyx_n_u__py, __pyx_k__py, sizeof(__pyx_k__py), 0, 1, 0, 1},
  {&__pyx_n_s__pyannotate, __pyx_k__pyannotate, sizeof(__pyx_k__pyannotate), 0, 0, 1, 1},
  {&__pyx_n_u__pyannotate, __pyx_k__pyannotate, sizeof(__pyx_k__pyannotate), 0, 1, 0, 1},
  {&__pyx_n_s__pytype, __pyx_k__pytype, sizeof(__pyx_k__pytype), 0, 0, 1, 1},
  {&__pyx_n_u__pytype, __pyx_k__pytype, sizeof(__pyx_k__pytype), 0, 1, 0, 1},
  {&__pyx_n_s__pytypename, __pyx_k__pytypename, sizeof(__pyx_k__pytypename), 0, 0, 1, 1},
  {&__pyx_n_u__pytypename, __pyx_k__pytypename, sizeof(__pyx_k__pytypename), 0, 1, 0, 1},
  {&__pyx_n_s__pyval, __pyx_k__pyval, sizeof(__pyx_k__pyval), 0, 0, 1, 1},
  {&__pyx_n_u__pyval, __pyx_k__pyval, sizeof(__pyx_k__pyval), 0, 1, 0, 1},
  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
  {&__pyx_n_s__register, __pyx_k__register, sizeof(__pyx_k__register), 0, 0, 1, 1},
  {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1},
  {&__pyx_n_s__remove_blank_text, __pyx_k__remove_blank_text, sizeof(__pyx_k__remove_blank_text), 0, 0, 1, 1},
  {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1},
  {&__pyx_n_s__root, __pyx_k__root, sizeof(__pyx_k__root), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__set_default_parser, __pyx_k__set_default_parser, sizeof(__pyx_k__set_default_parser), 0, 0, 1, 1},
  {&__pyx_n_u__set_default_parser, __pyx_k__set_default_parser, sizeof(__pyx_k__set_default_parser), 0, 1, 0, 1},
  {&__pyx_n_u__short, __pyx_k__short, sizeof(__pyx_k__short), 0, 1, 0, 1},
  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
  {&__pyx_n_u__str, __pyx_k__str, sizeof(__pyx_k__str), 0, 1, 0, 1},
  {&__pyx_n_u__string, __pyx_k__string, sizeof(__pyx_k__string), 0, 1, 0, 1},
  {&__pyx_n_s__stringify, __pyx_k__stringify, sizeof(__pyx_k__stringify), 0, 0, 1, 1},
  {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
  {&__pyx_n_s__strip_attributes, __pyx_k__strip_attributes, sizeof(__pyx_k__strip_attributes), 0, 0, 1, 1},
  {&__pyx_n_s__strval, __pyx_k__strval, sizeof(__pyx_k__strval), 0, 0, 1, 1},
  {&__pyx_n_s__tag, __pyx_k__tag, sizeof(__pyx_k__tag), 0, 0, 1, 1},
  {&__pyx_n_u__tag, __pyx_k__tag, sizeof(__pyx_k__tag), 0, 1, 0, 1},
  {&__pyx_n_u__tail, __pyx_k__tail, sizeof(__pyx_k__tail), 0, 1, 0, 1},
  {&__pyx_n_s__temp, __pyx_k__temp, sizeof(__pyx_k__temp), 0, 0, 1, 1},
  {&__pyx_n_u__text, __pyx_k__text, sizeof(__pyx_k__text), 0, 1, 0, 1},
  {&__pyx_n_u__token, __pyx_k__token, sizeof(__pyx_k__token), 0, 1, 0, 1},
  {&__pyx_n_s__tostring, __pyx_k__tostring, sizeof(__pyx_k__tostring), 0, 0, 1, 1},
  {&__pyx_n_s__tree_class, __pyx_k__tree_class, sizeof(__pyx_k__tree_class), 0, 0, 1, 1},
  {&__pyx_n_u__true, __pyx_k__true, sizeof(__pyx_k__true), 0, 1, 0, 1},
  {&__pyx_n_s__type_check, __pyx_k__type_check, sizeof(__pyx_k__type_check), 0, 0, 1, 1},
  {&__pyx_n_s__type_class, __pyx_k__type_class, sizeof(__pyx_k__type_class), 0, 0, 1, 1},
  {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1},
  {&__pyx_n_u__unsignedByte, __pyx_k__unsignedByte, sizeof(__pyx_k__unsignedByte), 0, 1, 0, 1},
  {&__pyx_n_u__unsignedInt, __pyx_k__unsignedInt, sizeof(__pyx_k__unsignedInt), 0, 1, 0, 1},
  {&__pyx_n_u__unsignedLong, __pyx_k__unsignedLong, sizeof(__pyx_k__unsignedLong), 0, 1, 0, 1},
  {&__pyx_n_u__unsignedShort, __pyx_k__unsignedShort, sizeof(__pyx_k__unsignedShort), 0, 1, 0, 1},
  {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_u__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 1, 0, 1},
  {&__pyx_n_s__xml, __pyx_k__xml, sizeof(__pyx_k__xml), 0, 0, 1, 1},
  {&__pyx_n_s__xmlSchemaTypes, __pyx_k__xmlSchemaTypes, sizeof(__pyx_k__xmlSchemaTypes), 0, 0, 1, 1},
  {&__pyx_n_u__xsd, __pyx_k__xsd, sizeof(__pyx_k__xsd), 0, 1, 0, 1},
  {&__pyx_n_s__xsi, __pyx_k__xsi, sizeof(__pyx_k__xsi), 0, 0, 1, 1},
  {&__pyx_n_u__xsi, __pyx_k__xsi, sizeof(__pyx_k__xsi), 0, 1, 0, 1},
  {&__pyx_n_s__xsi_nil, __pyx_k__xsi_nil, sizeof(__pyx_k__xsi_nil), 0, 0, 1, 1},
  {&__pyx_n_s__xsiannotate, __pyx_k__xsiannotate, sizeof(__pyx_k__xsiannotate), 0, 0, 1, 1},
  {&__pyx_n_u__xsiannotate, __pyx_k__xsiannotate, sizeof(__pyx_k__xsiannotate), 0, 1, 0, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_oct = __Pyx_GetName(__pyx_b, __pyx_n_s__oct); if (!__pyx_builtin_oct) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_hex = __Pyx_GetName(__pyx_b, __pyx_n_s__hex); if (!__pyx_builtin_hex) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "src/lxml/lxml.objectify.pyx":1029
 * cdef _registerPyTypes():
 *     pytype = PyType(u'int', int, IntElement)
 *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
 *                              u"unsignedByte", u"nonPositiveInteger",
 *                              u"negativeInteger", u"long", u"nonNegativeInteger",
 */
  __pyx_k_tuple_21 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__integer));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_n_u__integer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__integer));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__int));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 1, ((PyObject *)__pyx_n_u__int));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__int));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__short));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 2, ((PyObject *)__pyx_n_u__short));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__short));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__byte));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 3, ((PyObject *)__pyx_n_u__byte));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__byte));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__unsignedShort));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 4, ((PyObject *)__pyx_n_u__unsignedShort));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__unsignedShort));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__unsignedByte));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 5, ((PyObject *)__pyx_n_u__unsignedByte));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__unsignedByte));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__nonPositiveInteger));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 6, ((PyObject *)__pyx_n_u__nonPositiveInteger));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__nonPositiveInteger));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__negativeInteger));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 7, ((PyObject *)__pyx_n_u__negativeInteger));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__negativeInteger));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__long));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 8, ((PyObject *)__pyx_n_u__long));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__long));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__nonNegativeInteger));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 9, ((PyObject *)__pyx_n_u__nonNegativeInteger));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__nonNegativeInteger));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__unsignedLong));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 10, ((PyObject *)__pyx_n_u__unsignedLong));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__unsignedLong));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__unsignedInt));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 11, ((PyObject *)__pyx_n_u__unsignedInt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__unsignedInt));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__positiveInteger));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 12, ((PyObject *)__pyx_n_u__positiveInteger));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__positiveInteger));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "src/lxml/lxml.objectify.pyx":1040
 * 
 *     pytype = PyType(u'float', float, FloatElement)
 *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_k_tuple_22 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__double));
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_n_u__double));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__double));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__float));
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 1, ((PyObject *)__pyx_n_u__float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__float));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "src/lxml/lxml.objectify.pyx":1044
 * 
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__boolean));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_n_u__boolean));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__boolean));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "src/lxml/lxml.objectify.pyx":1048
 * 
 *     pytype = PyType(u'str', None, StringElement)
 *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
 *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
 *                              u"NMTOKEN", )
 */
  __pyx_k_tuple_24 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_24);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__string));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_n_u__string));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__string));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__normalizedString));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 1, ((PyObject *)__pyx_n_u__normalizedString));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__normalizedString));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__token));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 2, ((PyObject *)__pyx_n_u__token));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__token));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__language));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 3, ((PyObject *)__pyx_n_u__language));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__language));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__Name));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 4, ((PyObject *)__pyx_n_u__Name));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__Name));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__NCName));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 5, ((PyObject *)__pyx_n_u__NCName));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__NCName));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__ID));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 6, ((PyObject *)__pyx_n_u__ID));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__ID));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__IDREF));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 7, ((PyObject *)__pyx_n_u__IDREF));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__IDREF));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__ENTITY));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 8, ((PyObject *)__pyx_n_u__ENTITY));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__ENTITY));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__NMTOKEN));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 9, ((PyObject *)__pyx_n_u__NMTOKEN));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__NMTOKEN));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));

  /* "src/lxml/lxml.objectify.pyx":1391
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and u':' in value:
 *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
  __pyx_k_tuple_36 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_36);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_35));
  PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_u_35));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_35));
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_36, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));

  /* "src/lxml/lxml.objectify.pyx":1529
 *     if empty_type_name is not None:
 *         if isinstance(empty_type_name, bytes):
 *             empty_type_name = (<bytes>empty_type_name).decode("ascii")             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 */
  __pyx_k_tuple_43 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_43);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));

  /* "src/lxml/lxml.objectify.pyx":1533
 *     elif empty_pytype_name is not None:
 *         if isinstance(empty_pytype_name, bytes):
 *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 *     else:
 */
  __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_44);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));

  /* "src/lxml/lxml.objectify.pyx":1564
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and u':' in typename:
 *                     prefix, typename = typename.split(u':', 1)             # <<<<<<<<<<<<<<
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
  __pyx_k_tuple_45 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_35));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_u_35));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_35));
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "src/lxml/lxml.objectify.pyx":1639
 *                 if c_ns is not NULL:
 *                     if b':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(b':', 1)             # <<<<<<<<<<<<<<
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name
 */
  __pyx_k_tuple_46 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_46);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_35));
  PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_b_35));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_35));
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_46, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));

  /* "src/lxml/lxml.objectify.pyx":1887
 *     if _xsi is not None:
 *         if u':' in _xsi:
 *             prefix, name = _xsi.split(u':', 1)             # <<<<<<<<<<<<<<
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
  __pyx_k_tuple_49 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_49);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_35));
  PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_u_35));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_35));
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_49, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));

  /* "src/lxml/lxml.objectify.pyx":37
 * 
 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
 * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
 * 
 * cdef object _typename(object t):
 */
  __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_69);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_68));
  PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_kp_u_68));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_68));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));

  /* "src/lxml/lxml.objectify.pyx":64
 *     return (s, python.PyUnicode_AsUTF8String(s))
 * 
 * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
 *     u"""set_pytype_attribute_tag(attribute_tag=None)
 *     Change name and namespace of the XML attribute that holds Python type
 */
  __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_70);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__attribute_tag));
  PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, ((PyObject *)__pyx_n_s__attribute_tag));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__attribute_tag));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70));
  __pyx_k_codeobj_71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s_67, 64, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":830
 *             return __parseBool(textOf(self._c_node))
 * 
 * def __checkBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value = -1
 *     if s is not None:
 */
  __pyx_k_tuple_78 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_78);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_78, 1, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
  __pyx_k_codeobj_79 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s____checkBool, 830, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1011
 *         return u"false"
 * 
 * def __lower_bool(b):             # <<<<<<<<<<<<<<
 *     return _lower_bool(b)
 * 
 */
  __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__b));
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_n_s__b));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
  __pyx_k_codeobj_81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s____lower_bool, 1011, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1020
 *         return _typename(obj)
 * 
 * def pytypename(obj):             # <<<<<<<<<<<<<<
 *     u"""pytypename(obj)
 * 
 */
  __pyx_k_tuple_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_82);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
  __pyx_k_codeobj_83 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__pytypename, 1020, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1067
 * _registerPyTypes()
 * 
 * def getRegisteredTypes():             # <<<<<<<<<<<<<<
 *     u"""getRegisteredTypes()
 * 
 */
  __pyx_k_tuple_84 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_84);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__types));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_n_s__types));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__types));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__known));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 1, ((PyObject *)__pyx_n_s__known));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__known));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__check));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 2, ((PyObject *)__pyx_n_s__check));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 3, ((PyObject *)__pyx_n_s__pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__name));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 4, ((PyObject *)__pyx_n_s__name));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
  __pyx_k_codeobj_85 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__getRegisteredTypes, 1067, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1264
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
 *     u"""enable_recursive_str(on=True)
 * 
 */
  __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_86);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__on));
  PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_n_s__on));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__on));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
  __pyx_k_codeobj_87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s_66, 1264, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1273
 *     __RECURSIVE_STR = on
 * 
 * def dump(_Element element not None):             # <<<<<<<<<<<<<<
 *     u"""dump(_Element element not None)
 * 
 */
  __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_88);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element));
  PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));
  __pyx_k_codeobj_89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__dump, 1273, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1317
 * # Pickle support for objectified ElementTree
 * 
 * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
 *     return etree.ElementTree(fromstring(data))
 * 
 */
  __pyx_k_tuple_90 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_90);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));
  __pyx_k_codeobj_91 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s_34, 1317, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1328
 *                    elementTreeReduceFunction, __unpickleElementTree)
 * 
 * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
 *     return (__unpickleElementTree, (etree.tostring(obj),))
 * 
 */
  __pyx_k_tuple_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_92);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));
  __pyx_k_codeobj_93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s_94, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1423
 *     return None
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
 *              empty_pytype=None):
 *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
 */
  __pyx_k_tuple_95 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_95);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element_or_tree));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore_old));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 1, ((PyObject *)__pyx_n_s__ignore_old));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore_old));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore_xsi));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 2, ((PyObject *)__pyx_n_s__ignore_xsi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore_xsi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__empty_pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 3, ((PyObject *)__pyx_n_s__empty_pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__empty_pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 4, ((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
  __pyx_k_codeobj_96 = (PyObject*)__Pyx_PyCode_New(4, 3, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__pyannotate, 1423, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1446
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
 *                 empty_type=None):
 *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
 */
  __pyx_k_tuple_97 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_97);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element_or_tree));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore_old));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 1, ((PyObject *)__pyx_n_s__ignore_old));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore_old));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore_pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 2, ((PyObject *)__pyx_n_s__ignore_pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore_pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__empty_type));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 3, ((PyObject *)__pyx_n_s__empty_type));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__empty_type));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 4, ((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
  __pyx_k_codeobj_98 = (PyObject*)__Pyx_PyCode_New(4, 3, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__xsiannotate, 1446, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1474
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):
 */
  __pyx_k_tuple_99 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_99);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element_or_tree));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore_old));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 1, ((PyObject *)__pyx_n_s__ignore_old));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore_old));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore_xsi));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 2, ((PyObject *)__pyx_n_s__ignore_xsi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore_xsi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__empty_pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 3, ((PyObject *)__pyx_n_s__empty_pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__empty_pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__empty_type));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 4, ((PyObject *)__pyx_n_s__empty_type));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__empty_type));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__annotate_xsi));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 5, ((PyObject *)__pyx_n_s__annotate_xsi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__annotate_xsi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__annotate_pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 6, ((PyObject *)__pyx_n_s__annotate_pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__annotate_pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 7, ((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
  __pyx_k_codeobj_100 = (PyObject*)__Pyx_PyCode_New(7, 6, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__annotate, 1474, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1671
 * cdef object _cleanup_namespaces = etree.cleanup_namespaces
 * 
 * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
 *                bint xsi_nil=False, bint cleanup_namespaces=False):
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
 */
  __pyx_k_tuple_101 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_101);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__element_or_tree));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__element_or_tree));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 1, ((PyObject *)__pyx_n_s__pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xsi));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 2, ((PyObject *)__pyx_n_s__xsi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xsi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xsi_nil));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 3, ((PyObject *)__pyx_n_s__xsi_nil));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xsi_nil));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cleanup_namespaces));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 4, ((PyObject *)__pyx_n_s__cleanup_namespaces));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cleanup_namespaces));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__attribute_names));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 5, ((PyObject *)__pyx_n_s__attribute_names));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__attribute_names));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101));
  __pyx_k_codeobj_102 = (PyObject*)__Pyx_PyCode_New(5, 4, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__deannotate, 1671, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1711
 * objectify_parser = __DEFAULT_PARSER
 * 
 * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
 *     u"""set_default_parser(new_parser = None)
 * 
 */
  __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_103);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__new_parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_n_s__new_parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__new_parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
  __pyx_k_codeobj_104 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__set_default_parser, 1711, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1729
 *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
 * 
 * def makeparser(**kw):             # <<<<<<<<<<<<<<
 *     u"""makeparser(remove_blank_text=True, **kw)
 * 
 */
  __pyx_k_tuple_105 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_105);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kw));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_n_s__kw));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kw));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kw));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 1, ((PyObject *)__pyx_n_s__kw));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kw));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 2, ((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));
  __pyx_k_codeobj_106 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__makeparser, 1729, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1756
 * SubElement = etree.SubElement
 * 
 * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""fromstring(xml, parser=None, base_url=None)
 * 
 */
  __pyx_k_tuple_107 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_107);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xml));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_n_s__xml));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xml));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 1, ((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base_url));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 2, ((PyObject *)__pyx_n_s__base_url));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base_url));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
  __pyx_k_codeobj_108 = (PyObject*)__Pyx_PyCode_New(3, 1, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__fromstring, 1756, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1772
 *     return _fromstring(xml, parser, base_url=base_url)
 * 
 * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""XML(xml, parser=None, base_url=None)
 * 
 */
  __pyx_k_tuple_109 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_109);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xml));
  PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_n_s__xml));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xml));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_109, 1, ((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base_url));
  PyTuple_SET_ITEM(__pyx_k_tuple_109, 2, ((PyObject *)__pyx_n_s__base_url));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base_url));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
  __pyx_k_codeobj_110 = (PyObject*)__Pyx_PyCode_New(3, 1, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__XML, 1772, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1791
 * _parse = etree.parse
 * 
 * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""parse(f, parser=None, base_url=None)
 * 
 */
  __pyx_k_tuple_111 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_111);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 1, ((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base_url));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 2, ((PyObject *)__pyx_n_s__base_url));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base_url));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
  __pyx_k_codeobj_112 = (PyObject*)__Pyx_PyCode_New(3, 1, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__parse, 1791, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1814
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
 *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
 * 
 */
  __pyx_k_tuple_113 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_INCREF(((PyObject *)__pyx_n_s___tag));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_n_s___tag));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___tag));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__attrib));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 1, ((PyObject *)__pyx_n_s__attrib));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__attrib));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nsmap));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 2, ((PyObject *)__pyx_n_s__nsmap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nsmap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 3, ((PyObject *)__pyx_n_s___pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___attributes));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 4, ((PyObject *)__pyx_n_s___attributes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___attributes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___attributes));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 5, ((PyObject *)__pyx_n_s___attributes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___attributes));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
  __pyx_k_codeobj_114 = (PyObject*)__Pyx_PyCode_New(4, 1, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__Element, 1814, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1833
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
 *                 **_attributes):
 *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
 */
  __pyx_k_tuple_115 = PyTuple_New(15); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_115);
  __Pyx_INCREF(((PyObject *)__pyx_n_s___value));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_n_s___value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__attrib));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 1, ((PyObject *)__pyx_n_s__attrib));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__attrib));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nsmap));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 2, ((PyObject *)__pyx_n_s__nsmap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nsmap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___pytype));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 3, ((PyObject *)__pyx_n_s___pytype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___pytype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___xsi));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 4, ((PyObject *)__pyx_n_s___xsi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___xsi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___attributes));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 5, ((PyObject *)__pyx_n_s___attributes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___attributes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___attributes));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 6, ((PyObject *)__pyx_n_s___attributes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___attributes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dict_result));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 7, ((PyObject *)__pyx_n_s__dict_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dict_result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__temp));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 8, ((PyObject *)__pyx_n_s__temp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__temp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prefix));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 9, ((PyObject *)__pyx_n_s__prefix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prefix));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__name));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 10, ((PyObject *)__pyx_n_s__name));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ns));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 11, ((PyObject *)__pyx_n_s__ns));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ns));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__strval));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 12, ((PyObject *)__pyx_n_s__strval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__strval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stringify));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 13, ((PyObject *)__pyx_n_s__stringify));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stringify));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__type_check));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 14, ((PyObject *)__pyx_n_s__type_check));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__type_check));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));
  __pyx_k_codeobj_116 = (PyObject*)__Pyx_PyCode_New(5, 2, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_72, __pyx_n_s__DataElement, 1833, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":89
 * 
 * cdef object _RELATIVE_PATH_SEGMENT
 * _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
 * 
 * cdef _parseObjectPathString(path):
 */
  __pyx_k_tuple_118 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_118);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 2, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initobjectify(void); /*proto*/
PyMODINIT_FUNC initobjectify(void)
#else
PyMODINIT_FUNC PyInit_objectify(void); /*proto*/
PyMODINIT_FUNC PyInit_objectify(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  __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_objectify(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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(__Pyx_NAMESTR("objectify"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_63), 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_lxml__objectify) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  __pyx_v_4lxml_9objectify_etree = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_re = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_is_special_method = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__PYTYPE_DICT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__TYPE_CHECKS = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__strip_attributes = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__cleanup_namespaces = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify___DEFAULT_PARSER = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify_objectify_parser = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__fromstring = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__parse = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
  __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "PyType", (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
  __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase = __Pyx_ImportType("lxml.etree", "ElementBase", sizeof(struct LxmlElementBase), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__iter__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__len__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_6__len__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
    }
  }
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_ObjectifiedElement = &__pyx_type_4lxml_9objectify_ObjectifiedElement;
  __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedDataElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = &__pyx_type_4lxml_9objectify_ObjectifiedDataElement;
  __pyx_type_4lxml_9objectify_NumberElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "NumberElement", (PyObject *)&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_NumberElement = &__pyx_type_4lxml_9objectify_NumberElement;
  __pyx_type_4lxml_9objectify_IntElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "IntElement", (PyObject *)&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_IntElement = &__pyx_type_4lxml_9objectify_IntElement;
  __pyx_type_4lxml_9objectify_LongElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "LongElement", (PyObject *)&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_LongElement = &__pyx_type_4lxml_9objectify_LongElement;
  __pyx_type_4lxml_9objectify_FloatElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "FloatElement", (PyObject *)&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_FloatElement = &__pyx_type_4lxml_9objectify_FloatElement;
  __pyx_type_4lxml_9objectify_StringElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "StringElement", (PyObject *)&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_StringElement = &__pyx_type_4lxml_9objectify_StringElement;
  __pyx_type_4lxml_9objectify_NoneElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "NoneElement", (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement;
  __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_IntElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "BoolElement", (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__.doc = __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
    }
  }
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "_ObjectifyElementMakerCaller", (PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ElementMaker", (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
  __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = __Pyx_ImportType("lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__.doc = __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
    }
  }
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "ObjectifyElementClassLookup", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__.doc = __pyx_doc_4lxml_9objectify_10ObjectPath_6__call__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__;
    }
  }
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "ObjectPath", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_ObjectPath = &__pyx_type_4lxml_9objectify_ObjectPath;
  /*--- Type import code ---*/
  __pyx_ptype_4lxml_8includes_11etreepublic__Document = __Pyx_ImportType("lxml.etree", "_Document", sizeof(struct LxmlDocument), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic__Document)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_8includes_11etreepublic__Element = __Pyx_ImportType("lxml.etree", "_Element", sizeof(struct LxmlElement), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic__Element)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_8includes_11etreepublic__ElementTree = __Pyx_ImportType("lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType("lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher = __Pyx_ImportType("lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator = __Pyx_ImportType("lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator), 0); if (unlikely(!__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "src/lxml/lxml.objectify.pyx":16
 * from libc.string cimport const_char
 * 
 * __all__ = [u'BoolElement', u'DataElement', u'E', u'Element', u'ElementMaker',             # <<<<<<<<<<<<<<
 *            u'FloatElement', u'IntElement', u'LongElement', u'NoneElement',
 *            u'NumberElement', u'ObjectPath', u'ObjectifiedDataElement',
 */
  __pyx_t_1 = PyList_New(32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_u__BoolElement));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u__BoolElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__BoolElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__DataElement));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_u__DataElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__DataElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__E));
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_u__E));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__E));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__Element));
  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_u__Element));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__Element));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__ElementMaker));
  PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_u__ElementMaker));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__ElementMaker));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__FloatElement));
  PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_u__FloatElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__FloatElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__IntElement));
  PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_u__IntElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__IntElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__LongElement));
  PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_u__LongElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__LongElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__NoneElement));
  PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_u__NoneElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__NoneElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__NumberElement));
  PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_u__NumberElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__NumberElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__ObjectPath));
  PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_n_u__ObjectPath));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__ObjectPath));
  __Pyx_INCREF(((PyObject *)__pyx_n_u_64));
  PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_n_u_64));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u_64));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__ObjectifiedElement));
  PyList_SET_ITEM(__pyx_t_1, 12, ((PyObject *)__pyx_n_u__ObjectifiedElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__ObjectifiedElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u_65));
  PyList_SET_ITEM(__pyx_t_1, 13, ((PyObject *)__pyx_n_u_65));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u_65));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__PYTYPE_ATTRIBUTE));
  PyList_SET_ITEM(__pyx_t_1, 14, ((PyObject *)__pyx_n_u__PYTYPE_ATTRIBUTE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__PYTYPE_ATTRIBUTE));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__PyType));
  PyList_SET_ITEM(__pyx_t_1, 15, ((PyObject *)__pyx_n_u__PyType));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__PyType));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__StringElement));
  PyList_SET_ITEM(__pyx_t_1, 16, ((PyObject *)__pyx_n_u__StringElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__StringElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__SubElement));
  PyList_SET_ITEM(__pyx_t_1, 17, ((PyObject *)__pyx_n_u__SubElement));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__SubElement));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__XML));
  PyList_SET_ITEM(__pyx_t_1, 18, ((PyObject *)__pyx_n_u__XML));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__XML));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__annotate));
  PyList_SET_ITEM(__pyx_t_1, 19, ((PyObject *)__pyx_n_u__annotate));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__annotate));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__deannotate));
  PyList_SET_ITEM(__pyx_t_1, 20, ((PyObject *)__pyx_n_u__deannotate));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__deannotate));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__dump));
  PyList_SET_ITEM(__pyx_t_1, 21, ((PyObject *)__pyx_n_u__dump));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__dump));
  __Pyx_INCREF(((PyObject *)__pyx_n_u_66));
  PyList_SET_ITEM(__pyx_t_1, 22, ((PyObject *)__pyx_n_u_66));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u_66));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__fromstring));
  PyList_SET_ITEM(__pyx_t_1, 23, ((PyObject *)__pyx_n_u__fromstring));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__fromstring));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__getRegisteredTypes));
  PyList_SET_ITEM(__pyx_t_1, 24, ((PyObject *)__pyx_n_u__getRegisteredTypes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__getRegisteredTypes));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__makeparser));
  PyList_SET_ITEM(__pyx_t_1, 25, ((PyObject *)__pyx_n_u__makeparser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__makeparser));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__parse));
  PyList_SET_ITEM(__pyx_t_1, 26, ((PyObject *)__pyx_n_u__parse));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__parse));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__pyannotate));
  PyList_SET_ITEM(__pyx_t_1, 27, ((PyObject *)__pyx_n_u__pyannotate));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__pyannotate));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__pytypename));
  PyList_SET_ITEM(__pyx_t_1, 28, ((PyObject *)__pyx_n_u__pytypename));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__pytypename));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__set_default_parser));
  PyList_SET_ITEM(__pyx_t_1, 29, ((PyObject *)__pyx_n_u__set_default_parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__set_default_parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_u_67));
  PyList_SET_ITEM(__pyx_t_1, 30, ((PyObject *)__pyx_n_u_67));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u_67));
  __Pyx_INCREF(((PyObject *)__pyx_n_u__xsiannotate));
  PyList_SET_ITEM(__pyx_t_1, 31, ((PyObject *)__pyx_n_u__xsiannotate));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__xsiannotate));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":27
 * 
 * cdef object etree
 * from lxml import etree             # <<<<<<<<<<<<<<
 * # initialize C-API of lxml.etree
 * import_lxml__etree()
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__etree));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__etree));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__etree));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__lxml), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__etree);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__etree);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_etree);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_etree);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify_etree = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":29
 * from lxml import etree
 * # initialize C-API of lxml.etree
 * import_lxml__etree()             # <<<<<<<<<<<<<<
 * 
 * __version__ = etree.__version__
 */
  __pyx_t_3 = import_lxml__etree(); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":31
 * import_lxml__etree()
 * 
 * __version__ = etree.__version__             # <<<<<<<<<<<<<<
 * 
 * cdef object re
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s____version__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____version__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":34
 * 
 * cdef object re
 * import re             # <<<<<<<<<<<<<<
 * 
 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_re);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_re);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_v_4lxml_9objectify_re = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":36
 * import re
 * 
 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
 * cdef object is_special_method = re.compile(u'__.*__$').match
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_ValueError);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_ValueError);
  __Pyx_GIVEREF(__pyx_builtin_ValueError);
  __Pyx_INCREF(__pyx_builtin_TypeError);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_TypeError);
  __Pyx_GIVEREF(__pyx_builtin_TypeError);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":37
 * 
 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
 * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
 * 
 * cdef object _typename(object t):
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_is_special_method);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_is_special_method);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_v_4lxml_9objectify_is_special_method = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":56
 * cdef const_xmlChar* _PYTYPE_ATTRIBUTE_NAME
 * 
 * PYTYPE_ATTRIBUTE = None             # <<<<<<<<<<<<<<
 * 
 * cdef object TREE_PYTYPE_NAME
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PYTYPE_ATTRIBUTE, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":59
 * 
 * cdef object TREE_PYTYPE_NAME
 * TREE_PYTYPE_NAME = u"TREE"             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unicodeAndUtf8(s):
 */
  __Pyx_INCREF(((PyObject *)__pyx_n_u__TREE));
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  __Pyx_GIVEREF(((PyObject *)__pyx_n_u__TREE));
  __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = ((PyObject *)__pyx_n_u__TREE);

  /* "src/lxml/lxml.objectify.pyx":64
 *     return (s, python.PyUnicode_AsUTF8String(s))
 * 
 * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
 *     u"""set_pytype_attribute_tag(attribute_tag=None)
 *     Change name and namespace of the XML attribute that holds Python type
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_1set_pytype_attribute_tag, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_67, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":96
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 * 
 * set_pytype_attribute_tag()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_67); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __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;

  /* "src/lxml/lxml.objectify.pyx":102
 * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
 * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")             # <<<<<<<<<<<<<<
 * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_kp_u_74);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyTuple_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else if (1) {
    __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L2_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L2_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L3_unpacking_done;
    __pyx_L2_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L3_unpacking_done:;
  }

  /* "src/lxml/lxml.objectify.pyx":101
 * # namespaces for XML Schema
 * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
 * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \             # <<<<<<<<<<<<<<
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
 * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)
 */
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":103
 * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
 * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)             # <<<<<<<<<<<<<<
 * 
 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
 */
  __pyx_t_2 = __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":107
 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
 * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")             # <<<<<<<<<<<<<<
 * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_kp_u_75);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyTuple_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else if (1) {
    __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  } else
  {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L5_unpacking_done:;
  }

  /* "src/lxml/lxml.objectify.pyx":106
 * 
 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
 * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \             # <<<<<<<<<<<<<<
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
 * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
 */
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":108
 * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
 * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)             # <<<<<<<<<<<<<<
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
 */
  __pyx_t_4 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":110
 * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS
 * 
 */
  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_76), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":111
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_77), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":830
 *             return __parseBool(textOf(self._c_node))
 * 
 * def __checkBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value = -1
 *     if s is not None:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_3__checkBool, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____checkBool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":997
 * 
 * cdef dict _PYTYPE_DICT
 * _PYTYPE_DICT = {}             # <<<<<<<<<<<<<<
 * 
 * cdef dict _SCHEMA_TYPE_DICT
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_v_4lxml_9objectify__PYTYPE_DICT = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1000
 * 
 * cdef dict _SCHEMA_TYPE_DICT
 * _SCHEMA_TYPE_DICT = {}             # <<<<<<<<<<<<<<
 * 
 * cdef list _TYPE_CHECKS
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1003
 * 
 * cdef list _TYPE_CHECKS
 * _TYPE_CHECKS = []             # <<<<<<<<<<<<<<
 * 
 * cdef _lower_bool(b):
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_v_4lxml_9objectify__TYPE_CHECKS = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1011
 *         return u"false"
 * 
 * def __lower_bool(b):             # <<<<<<<<<<<<<<
 *     return _lower_bool(b)
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_7__lower_bool, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____lower_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1020
 *         return _typename(obj)
 * 
 * def pytypename(obj):             # <<<<<<<<<<<<<<
 *     u"""pytypename(obj)
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_9pytypename, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pytypename, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1063
 * # non-registered PyType for inner tree elements
 * cdef PyType TREE_PYTYPE
 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)             # <<<<<<<<<<<<<<
 * 
 * _registerPyTypes()
 */
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  __Pyx_GIVEREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1065
 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
 * 
 * _registerPyTypes()             # <<<<<<<<<<<<<<
 * 
 * def getRegisteredTypes():
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1067
 * _registerPyTypes()
 * 
 * def getRegisteredTypes():             # <<<<<<<<<<<<<<
 *     u"""getRegisteredTypes()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_11getRegisteredTypes, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__getRegisteredTypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1226
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
 *                  makeelement=None):
 *         if nsmap is None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k_25 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1262
 * 
 * cdef bint __RECURSIVE_STR
 * __RECURSIVE_STR = 0 # default: off             # <<<<<<<<<<<<<<
 * 
 * def enable_recursive_str(on=True):
 */
  __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;

  /* "src/lxml/lxml.objectify.pyx":1264
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
 *     u"""enable_recursive_str(on=True)
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k_28 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_13enable_recursive_str, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_66, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1273
 *     __RECURSIVE_STR = on
 * 
 * def dump(_Element element not None):             # <<<<<<<<<<<<<<
 *     u"""dump(_Element element not None)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_15dump, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__dump, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1317
 * # Pickle support for objectified ElementTree
 * 
 * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
 *     return etree.ElementTree(fromstring(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_17__unpickleElementTree, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_34, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1328
 *                    elementTreeReduceFunction, __unpickleElementTree)
 * 
 * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
 *     return (__unpickleElementTree, (etree.tostring(obj),))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_19pickleReduceElementTree, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_94, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1331
 *     return (__unpickleElementTree, (etree.tostring(obj),))
 * 
 * _setupPickle(pickleReduceElementTree)             # <<<<<<<<<<<<<<
 * del pickleReduceElementTree
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_94); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1332
 * 
 * _setupPickle(pickleReduceElementTree)
 * del pickleReduceElementTree             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElementTree") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1423
 *     return None
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
 *              empty_pytype=None):
 *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_37 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_38 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_21pyannotate, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pyannotate, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1446
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
 *                 empty_type=None):
 *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_39 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_40 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_23xsiannotate, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__xsiannotate, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1474
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_41 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_42 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_25annotate, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__annotate, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1668
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 * cdef object _strip_attributes = etree.strip_attributes             # <<<<<<<<<<<<<<
 * cdef object _cleanup_namespaces = etree.cleanup_namespaces
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__strip_attributes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__strip_attributes);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__strip_attributes);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_v_4lxml_9objectify__strip_attributes = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1669
 * 
 * cdef object _strip_attributes = etree.strip_attributes
 * cdef object _cleanup_namespaces = etree.cleanup_namespaces             # <<<<<<<<<<<<<<
 * 
 * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__cleanup_namespaces); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__cleanup_namespaces);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__cleanup_namespaces);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_v_4lxml_9objectify__cleanup_namespaces = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1671
 * cdef object _cleanup_namespaces = etree.cleanup_namespaces
 * 
 * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
 *                bint xsi_nil=False, bint cleanup_namespaces=False):
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_27deannotate, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__deannotate, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/lxml/lxml.objectify.pyx":1705
 * 
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<<
 * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__XMLParser); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__remove_blank_text), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_v_4lxml_9objectify___DEFAULT_PARSER = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/lxml/lxml.objectify.pyx":1706
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
 * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
 * 
 * cdef object objectify_parser
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_s_48); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1709
 * 
 * cdef object objectify_parser
 * objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
 * 
 * def set_default_parser(new_parser = None):
 */
  __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
  __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;

  /* "src/lxml/lxml.objectify.pyx":1711
 * objectify_parser = __DEFAULT_PARSER
 * 
 * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
 *     u"""set_default_parser(new_parser = None)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_29set_default_parser, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__set_default_parser, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1729
 *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
 * 
 * def makeparser(**kw):             # <<<<<<<<<<<<<<
 *     u"""makeparser(remove_blank_text=True, **kw)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_31makeparser, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__makeparser, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1752
 * 
 * cdef object _fromstring
 * _fromstring = etree.fromstring             # <<<<<<<<<<<<<<
 * 
 * SubElement = etree.SubElement
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__fromstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__fromstring);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__fromstring);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify__fromstring = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1754
 * _fromstring = etree.fromstring
 * 
 * SubElement = etree.SubElement             # <<<<<<<<<<<<<<
 * 
 * def fromstring(xml, parser=None, *, base_url=None):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__SubElement); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SubElement, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1756
 * SubElement = etree.SubElement
 * 
 * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""fromstring(xml, parser=None, base_url=None)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_33fromstring, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fromstring, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1772
 *     return _fromstring(xml, parser, base_url=base_url)
 * 
 * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""XML(xml, parser=None, base_url=None)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_35XML, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XML, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1789
 * 
 * cdef object _parse
 * _parse = etree.parse             # <<<<<<<<<<<<<<
 * 
 * def parse(f, parser=None, *, base_url=None):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s__parse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__parse);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__parse);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify__parse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1791
 * _parse = etree.parse
 * 
 * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""parse(f, parser=None, base_url=None)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_37parse, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1806
 *     return _parse(f, parser, base_url=base_url)
 * 
 * cdef dict _DEFAULT_NSMAP = {             # <<<<<<<<<<<<<<
 *     u"py"  : PYTYPE_NAMESPACE,
 *     u"xsi" : XML_SCHEMA_INSTANCE_NS,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "src/lxml/lxml.objectify.pyx":1807
 * 
 * cdef dict _DEFAULT_NSMAP = {
 *     u"py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<<
 *     u"xsi" : XML_SCHEMA_INSTANCE_NS,
 *     u"xsd" : XML_SCHEMA_NS
 */
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u__py), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1808
 * cdef dict _DEFAULT_NSMAP = {
 *     u"py"  : PYTYPE_NAMESPACE,
 *     u"xsi" : XML_SCHEMA_INSTANCE_NS,             # <<<<<<<<<<<<<<
 *     u"xsd" : XML_SCHEMA_NS
 * }
 */
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u__xsi), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "src/lxml/lxml.objectify.pyx":1810
 *     u"xsi" : XML_SCHEMA_INSTANCE_NS,
 *     u"xsd" : XML_SCHEMA_NS
 * }             # <<<<<<<<<<<<<<
 * 
 * E = ElementMaker()
 */
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u__xsd), __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1812
 * }
 * 
 * E = ElementMaker()             # <<<<<<<<<<<<<<
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
 */
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ElementMaker)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__E, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1814
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
 *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_39Element, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Element, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/lxml/lxml.objectify.pyx":1833
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
 *                 **_attributes):
 *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_9objectify_41DataElement, NULL, __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DataElement, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":84
 * 
 * cdef object __MATCH_PATH_SEGMENT
 * __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<<
 *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
 *     re.U).match
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_s__compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":86
 * __MATCH_PATH_SEGMENT = re.compile(
 *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
 *     re.U).match             # <<<<<<<<<<<<<<
 * 
 * cdef object _RELATIVE_PATH_SEGMENT
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_s__U); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_117));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_117));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_117));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/objectpath.pxi":89
 * 
 * cdef object _RELATIVE_PATH_SEGMENT
 * _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
 * 
 * cdef _parseObjectPathString(path):
 */
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_118));
  __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
  __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = ((PyObject *)__pyx_k_tuple_118);

  /* "src/lxml/lxml.objectify.pyx":1
 * u"""The ``lxml.objectify`` module implements a Python object API for             # <<<<<<<<<<<<<<
 * XML.  It is based on `lxml.etree`.
 * """
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (__Pyx_RegisterCleanup()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  if (__pyx_m) {
    __Pyx_AddTraceback("init lxml.objectify", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init lxml.objectify");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

static void __Pyx_CleanupGlobals(void) {
  Py_CLEAR(__pyx_k_tuple_21);
  Py_CLEAR(__pyx_k_tuple_22);
  Py_CLEAR(__pyx_k_tuple_23);
  Py_CLEAR(__pyx_k_tuple_24);
  Py_CLEAR(__pyx_k_tuple_36);
  Py_CLEAR(__pyx_k_tuple_43);
  Py_CLEAR(__pyx_k_tuple_44);
  Py_CLEAR(__pyx_k_tuple_45);
  Py_CLEAR(__pyx_k_tuple_46);
  Py_CLEAR(__pyx_k_tuple_49);
  Py_CLEAR(__pyx_k_tuple_69);
  Py_CLEAR(__pyx_k_tuple_70);
  Py_CLEAR(__pyx_k_codeobj_71);
  Py_CLEAR(__pyx_k_tuple_78);
  Py_CLEAR(__pyx_k_codeobj_79);
  Py_CLEAR(__pyx_k_tuple_80);
  Py_CLEAR(__pyx_k_codeobj_81);
  Py_CLEAR(__pyx_k_tuple_82);
  Py_CLEAR(__pyx_k_codeobj_83);
  Py_CLEAR(__pyx_k_tuple_84);
  Py_CLEAR(__pyx_k_codeobj_85);
  Py_CLEAR(__pyx_k_tuple_86);
  Py_CLEAR(__pyx_k_codeobj_87);
  Py_CLEAR(__pyx_k_tuple_88);
  Py_CLEAR(__pyx_k_codeobj_89);
  Py_CLEAR(__pyx_k_tuple_90);
  Py_CLEAR(__pyx_k_codeobj_91);
  Py_CLEAR(__pyx_k_tuple_92);
  Py_CLEAR(__pyx_k_codeobj_93);
  Py_CLEAR(__pyx_k_tuple_95);
  Py_CLEAR(__pyx_k_codeobj_96);
  Py_CLEAR(__pyx_k_tuple_97);
  Py_CLEAR(__pyx_k_codeobj_98);
  Py_CLEAR(__pyx_k_tuple_99);
  Py_CLEAR(__pyx_k_codeobj_100);
  Py_CLEAR(__pyx_k_tuple_101);
  Py_CLEAR(__pyx_k_codeobj_102);
  Py_CLEAR(__pyx_k_tuple_103);
  Py_CLEAR(__pyx_k_codeobj_104);
  Py_CLEAR(__pyx_k_tuple_105);
  Py_CLEAR(__pyx_k_codeobj_106);
  Py_CLEAR(__pyx_k_tuple_107);
  Py_CLEAR(__pyx_k_codeobj_108);
  Py_CLEAR(__pyx_k_tuple_109);
  Py_CLEAR(__pyx_k_codeobj_110);
  Py_CLEAR(__pyx_k_tuple_111);
  Py_CLEAR(__pyx_k_codeobj_112);
  Py_CLEAR(__pyx_k_tuple_113);
  Py_CLEAR(__pyx_k_codeobj_114);
  Py_CLEAR(__pyx_k_tuple_115);
  Py_CLEAR(__pyx_k_codeobj_116);
  Py_CLEAR(__pyx_k_tuple_118);
  if (__pyx_code_cache.entries) {
      __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
      int i, count = __pyx_code_cache.count;
      __pyx_code_cache.count = 0;
      __pyx_code_cache.max_count = 0;
      __pyx_code_cache.entries = NULL;
      for (i=0; i<count; i++) {
          Py_DECREF(entries[i].code_object);
      }
      PyMem_Free(entries);
  }

}
static PyObject *__pyx_module_cleanup(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *unused) {
  /*--- Global cleanup code ---*/
  Py_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT); __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT); __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP); __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__parse); __pyx_v_4lxml_9objectify__parse = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__fromstring); __pyx_v_4lxml_9objectify__fromstring = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_objectify_parser); __pyx_v_4lxml_9objectify_objectify_parser = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER); __pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__cleanup_namespaces); __pyx_v_4lxml_9objectify__cleanup_namespaces = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__strip_attributes); __pyx_v_4lxml_9objectify__strip_attributes = 0;
  Py_DECREF((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE); __pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS); __pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify__PYTYPE_DICT); __pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8); __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS); __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME); __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8); __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME); __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8); __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_is_special_method); __pyx_v_4lxml_9objectify_is_special_method = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS); __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_re); __pyx_v_4lxml_9objectify_re = 0;
  Py_DECREF(__pyx_v_4lxml_9objectify_etree); __pyx_v_4lxml_9objectify_etree = 0;
  __Pyx_CleanupGlobals();
  /*--- Builtin cleanup code ---*/
  Py_DECREF(__pyx_builtin_ValueError); __pyx_builtin_ValueError = 0;
  Py_DECREF(__pyx_builtin_TypeError); __pyx_builtin_TypeError = 0;
  Py_DECREF(__pyx_builtin_object); __pyx_builtin_object = 0;
  Py_DECREF(__pyx_builtin_IndexError); __pyx_builtin_IndexError = 0;
  Py_DECREF(__pyx_builtin_AttributeError); __pyx_builtin_AttributeError = 0;
  Py_DECREF(__pyx_builtin_oct); __pyx_builtin_oct = 0;
  Py_DECREF(__pyx_builtin_hex); __pyx_builtin_hex = 0;
  Py_DECREF(__pyx_builtin_enumerate); __pyx_builtin_enumerate = 0;
  Py_DECREF(__pyx_builtin_map); __pyx_builtin_map = 0;
  Py_DECREF(__pyx_builtin_MemoryError); __pyx_builtin_MemoryError = 0;
  /*--- Intern cleanup code ---*/
  Py_DECREF(__pyx_empty_tuple); __pyx_empty_tuple = 0;
  #if CYTHON_COMPILING_IN_PYPY
  Py_CLEAR(__pyx_b);
  #endif
  Py_INCREF(Py_None); return Py_None;
}

/* Runtime support code */
#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 /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

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_AS_STRING(kw_name));
        #endif
}

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;
        } else {
            #if PY_MAJOR_VERSION < 3
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
            #else
            if (unlikely(!PyUnicode_Check(key))) {
            #endif
                goto invalid_keyword_type;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        _PyString_Eq(**name, key)) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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,
                 "%s() takes %s %" PY_FORMAT_SIZE_T "d positional argument%s (%" PY_FORMAT_SIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" PY_FORMAT_SIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" PY_FORMAT_SIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

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;
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    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);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            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;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    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)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        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;
        }
        if (!value) {
            value = PyObject_CallObject(type, NULL);
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        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);
        }
    }
bad:
    return;
}
#endif

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = PyObject_GetAttr(o, n);
    if (!r) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #else
        if (unlikely(!PyUnicode_Check(key)))
        #endif
            goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    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_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    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;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (DECREF may run arbitrary code). */
    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;
}

static int __Pyx_RegisterCleanup(void) {
    /* Don't use Py_AtExit because that has a 32-call limit
     * and is called after python finalization.
     */
    PyObject *cleanup_func = 0;
    PyObject *atexit = 0;
    PyObject *reg = 0;
    PyObject *args = 0;
    PyObject *res = 0;
    int ret = -1;
    cleanup_func = PyCFunction_New(&cleanup_def, 0);
    args = PyTuple_New(1);
    if (!cleanup_func || !args)
        goto bad;
    PyTuple_SET_ITEM(args, 0, cleanup_func);
    cleanup_func = 0;
    atexit = __Pyx_ImportModule("atexit");
    if (!atexit)
        goto bad;
    reg = __Pyx_GetAttrString(atexit, "register");
    if (!reg)
        goto bad;
    res = PyObject_CallObject(reg, args);
    if (!res)
        goto bad;
    ret = 0;
bad:
    Py_XDECREF(cleanup_func);
    Py_XDECREF(atexit);
    Py_XDECREF(reg);
    Py_XDECREF(args);
    Py_XDECREF(res);
    return ret;
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    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);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    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_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                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);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            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
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
#if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
                 PyString_AsString(name));
#else
    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
#endif
}

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 (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
        #if CYTHON_PEP393_ENABLED
        if ((PyUnicode_READY(s1) < 0) || (PyUnicode_READY(s2) < 0))
            return -1;
        if (PyUnicode_GET_LENGTH(s1) != PyUnicode_GET_LENGTH(s2)) {
            return (equals == Py_NE);
        } else if (PyUnicode_GET_LENGTH(s1) == 1) {
            Py_UCS4 ch1 = PyUnicode_READ_CHAR(s1, 0);
            Py_UCS4 ch2 = PyUnicode_READ_CHAR(s2, 0);
            return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2);
        #else
        if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyUnicode_GET_SIZE(s1) == 1) {
            Py_UNICODE ch1 = PyUnicode_AS_UNICODE(s1)[0];
            Py_UNICODE ch2 = PyUnicode_AS_UNICODE(s2)[0];
            return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2);
        #endif
        } else {
            int result = PyUnicode_Compare(s1, s2);
            if ((result == -1) && unlikely(PyErr_Occurred()))
                return -1;
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyUnicode_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
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #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);
    }
}

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);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

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

#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,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __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,      /*int firstlineno,*/
        __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;
    PyObject *py_globals = 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_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

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  /* Python 3+ has unicode identifiers */
        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;
}


/* Type Conversion Functions */

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_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (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 = 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) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
