/* Generated by Cython 0.11.2 on Sun Jun 21 09:39:15 2009 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#else
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
#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)   PyInt_AsLong(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
#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)

#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#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_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyString_Type                PyBytes_Type
  #define PyString_CheckExact          PyBytes_CheckExact
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define PyBytes_Type                 PyString_Type
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#else
  #define _USE_MATH_DEFINES
#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
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#include <math.h>
#define __PYX_HAVE_API__lxml__objectify
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "stdarg.h"
#include "etree_defs.h"
#include "lxml-version.h"
#include "libxml/xmlversion.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/xmlstring.h"
#include "libxml/xmlmemory.h"
#include "pythread.h"
#include "lxml.etree_api.h"
#define __PYX_USE_C99_COMPLEX defined(_Complex_I)


#ifdef __GNUC__
#define INLINE __inline__
#elif _WIN32
#define INLINE __inline
#else
#define INLINE 
#endif

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



static int __pyx_skip_dispatch = 0;


/* Type Conversion Predeclarations */

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyBytes_FromString          PyString_FromString
#define __Pyx_PyBytes_FromStringAndSize   PyString_FromStringAndSize
#define __Pyx_PyBytes_AsString            PyString_AsString
#else
#define __Pyx_PyBytes_FromString          PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize   PyBytes_FromStringAndSize
#define __Pyx_PyBytes_AsString            PyBytes_AsString
#endif

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

#if !defined(T_PYSSIZET)
#if PY_VERSION_HEX < 0x02050000
#define T_PYSSIZET T_INT
#elif !defined(T_LONGLONG)
#define T_PYSSIZET \
        ((sizeof(Py_ssize_t) == sizeof(int))  ? T_INT  : \
        ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
#else
#define T_PYSSIZET \
        ((sizeof(Py_ssize_t) == sizeof(int))          ? T_INT      : \
        ((sizeof(Py_ssize_t) == sizeof(long))         ? T_LONG     : \
        ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
#endif
#endif

#if !defined(T_SIZET)
#if !defined(T_ULONGLONG)
#define T_SIZET \
        ((sizeof(size_t) == sizeof(unsigned int))  ? T_UINT  : \
        ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
#else
#define T_SIZET \
        ((sizeof(size_t) == sizeof(unsigned int))          ? T_UINT      : \
        ((sizeof(size_t) == sizeof(unsigned long))         ? T_ULONG     : \
        ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
#endif
#endif

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

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : 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 int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
static const char **__pyx_f;

static char __pyx_mdoc[] = "The ``lxml.objectify`` module implements a Python object API for\nXML.  It is based on `lxml.etree`.\n";


#ifdef 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* (*NewContext)(const char*, int, const char*);
  void (*FinishContext)(void**);
} __Pyx_RefnannyAPIStruct;
static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
#define __Pyx_ImportRefcountAPI(name)   (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
#define __Pyx_SetupRefcountContext(name)   void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
#define __Pyx_FinishRefcountContext()   __Pyx_Refnanny->FinishContext(&__pyx_refchk)
#else
#define __Pyx_INCREF(r) Py_INCREF(r)
#define __Pyx_DECREF(r) Py_DECREF(r)
#define __Pyx_GOTREF(r)
#define __Pyx_GIVEREF(r)
#define __Pyx_XDECREF(r) Py_XDECREF(r)
#define __Pyx_SetupRefcountContext(name)
#define __Pyx_FinishRefcountContext()
#endif /* CYTHON_REFNANNY */
#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)

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

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


static 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, size <= sizeof(long)) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
    if (likely(o != Py_None)) {
        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, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
}

#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
    if (likely(o != Py_None)) {
        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, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
}


#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
    PyObject *r;
    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
        r = PySequence_GetItem(o, i);
    }
    else {
        r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
    }
    return r;
}

#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 INLINE int PySet_Clear(PyObject *set) {
    PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}

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

#if PY_VERSION_HEX < 0x02040000
#ifndef Py_SETOBJECT_H
#define Py_SETOBJECT_H

static PyTypeObject *__Pyx_PySet_Type = NULL;
static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL;

#define PySet_Type (*__Pyx_PySet_Type)
#define PyFrozenSet_Type (*__Pyx_PyFrozenSet_Type)

#define PyAnySet_Check(ob) \
    (PyAnySet_CheckExact(ob) || \
     PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \
     PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))

#define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)

static int __Pyx_Py23SetsImport(void) {
    PyObject *sets=0, *Set=0, *ImmutableSet=0;

    sets = PyImport_ImportModule((char *)"sets");
    if (!sets) goto bad;
    Set = PyObject_GetAttrString(sets, (char *)"Set");
    if (!Set) goto bad;
    ImmutableSet = PyObject_GetAttrString(sets, (char *)"ImmutableSet");
    if (!ImmutableSet) goto bad;
    Py_DECREF(sets);

    __Pyx_PySet_Type       = (PyTypeObject*) Set;
    __Pyx_PyFrozenSet_Type = (PyTypeObject*) ImmutableSet;

    return 0;

 bad:
    Py_XDECREF(sets);
    Py_XDECREF(Set);
    Py_XDECREF(ImmutableSet);
    return -1;
}

#else
static int __Pyx_Py23SetsImport(void) { return 0; }
#endif /* !Py_SETOBJECT_H */
#endif /* < Py2.4  */
#endif /* < Py2.5  */

static INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
    const char* function_name, int kw_allowed); /*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, size <= sizeof(long)) : \
                                                    __Pyx_DelItem_Generic(o, to_py_func(i)))

static 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 INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
    if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && likely(i >= 0))
        return PySequence_DelItem(o, i);
    else {
        PyObject *j = fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i);
        return __Pyx_DelItem_Generic(o, j);
    }
}

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

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

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

static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static INLINE void __Pyx_RaiseTooManyValuesError(void);

static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
static int __Pyx_EndUnpack(PyObject *); /*proto*/

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

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

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

static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/

static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static INLINE char __Pyx_PyInt_AsChar(PyObject *);

static INLINE short __Pyx_PyInt_AsShort(PyObject *);

static INLINE int __Pyx_PyInt_AsInt(PyObject *);

static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static INLINE long __Pyx_PyInt_AsLong(PyObject *);

static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static void __Pyx_WriteUnraisable(const char *name); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/

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

static void __Pyx_AddTraceback(const char *funcname); /*proto*/

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

/* Type declarations */

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":4
 * # ObjectPath
 * 
 * ctypedef struct _ObjectPath:             # <<<<<<<<<<<<<<
 *     char* href
 *     char* name
 */

typedef struct {
  char *href;
  char *name;
  Py_ssize_t index;
} __pyx_t_4lxml_9objectify__ObjectPath;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":121
 * 
 * # 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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1164
 * # adapted ElementMaker supports registered PyTypes
 * 
 * cdef class _ObjectifyElementMakerCaller # forward declaration             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "etree_defs.h":
 */

struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
  PyObject_HEAD
  PyObject *_tag;
  PyObject *_nsmap;
  PyObject *_element_factory;
  int _annotate;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":126
 * # 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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":633
 * # 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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":653
 *         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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":755
 *         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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":747
 *         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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":843
 *             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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":751
 *         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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1170
 *     cdef _ObjectifyElementMakerCaller NEW_ELEMENT_MAKER "PY_NEW" (object t)
 * 
 * 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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1368
 * # 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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":821
 *         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-HEAD/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;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":759
 *         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;
};
/* Module declarations from lxml.cstd */

/* Module declarations from lxml.tree */

/* Module declarations from __builtin__ */

/* Module declarations from lxml.python */

static PyTypeObject *__pyx_ptype_4lxml_6python_slice = 0;
static PyTypeObject *__pyx_ptype_4lxml_6python_unicode = 0;
/* Module declarations from lxml.etree */

/* Module declarations from lxml.etreepublic */

static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__Document = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__Element = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_ElementBase = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementTree = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_ElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementTagMatcher = 0;
static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementIterator = 0;
/* 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_islice = 0;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
static char *__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 char *__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 char *__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 char *__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___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_k_714 = 0;
static PyObject *__pyx_k_715 = 0;
static PyObject *__pyx_k_717 = 0;
static PyObject *__pyx_k_718 = 0;
static PyObject *__pyx_k_719 = 0;
static PyObject *__pyx_k_720 = 0;
static PyObject *__pyx_k_721 = 0;
static PyObject *__pyx_k_722 = 0;
static PyObject *__pyx_k_723 = 0;
static PyObject *__pyx_k_724 = 0;
static PyObject *__pyx_k_725 = 0;
static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *); /*proto*/
static INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *, char *, char *); /*proto*/
static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *, char *, char *, 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 INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *); /*proto*/
static INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *); /*proto*/
static INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
static INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
static 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 *, 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 char __pyx_k_675[] = "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_676[] = "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_710[] = "http://www.w3.org/2001/XMLSchema";
static char __pyx_k_711[] = "http://www.w3.org/2001/XMLSchema-instance";
static char __pyx_k_712[] = "{%s}nil";
static char __pyx_k_713[] = "{%s}type";
static char __pyx_k_730[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_neg_1;
static char __pyx_k___main__[] = "__main__";
static PyObject *__pyx_kp___main__;
static char __pyx_k___iter__[] = "__iter__";
static PyObject *__pyx_kp___iter__;
static char __pyx_k___str__[] = "__str__";
static PyObject *__pyx_kp___str__;
static char __pyx_k___len__[] = "__len__";
static PyObject *__pyx_kp___len__;
static char __pyx_k_countchildren[] = "countchildren";
static PyObject *__pyx_kp_countchildren;
static char __pyx_k_getchildren[] = "getchildren";
static PyObject *__pyx_kp_getchildren;
static char __pyx_k___getattr__[] = "__getattr__";
static PyObject *__pyx_kp___getattr__;
static char __pyx_k___setattr__[] = "__setattr__";
static PyObject *__pyx_kp___setattr__;
static char __pyx_k___delattr__[] = "__delattr__";
static PyObject *__pyx_kp___delattr__;
static char __pyx_k_addattr[] = "addattr";
static PyObject *__pyx_kp_addattr;
static char __pyx_k___getitem__[] = "__getitem__";
static PyObject *__pyx_kp___getitem__;
static char __pyx_k___setitem__[] = "__setitem__";
static PyObject *__pyx_kp___setitem__;
static char __pyx_k___delitem__[] = "__delitem__";
static PyObject *__pyx_kp___delitem__;
static char __pyx_k_iterfind[] = "iterfind";
static PyObject *__pyx_kp_iterfind;
static char __pyx_k_findall[] = "findall";
static PyObject *__pyx_kp_findall;
static char __pyx_k_find[] = "find";
static PyObject *__pyx_kp_find;
static char __pyx_k_findtext[] = "findtext";
static PyObject *__pyx_kp_findtext;
static char __pyx_k_descendantpaths[] = "descendantpaths";
static PyObject *__pyx_kp_descendantpaths;
static char __pyx_k___repr__[] = "__repr__";
static PyObject *__pyx_kp___repr__;
static char __pyx_k__setText[] = "_setText";
static PyObject *__pyx_kp__setText;
static char __pyx_k__setValueParser[] = "_setValueParser";
static PyObject *__pyx_kp__setValueParser;
static char __pyx_k___int__[] = "__int__";
static PyObject *__pyx_kp___int__;
static char __pyx_k___long__[] = "__long__";
static PyObject *__pyx_kp___long__;
static char __pyx_k___float__[] = "__float__";
static PyObject *__pyx_kp___float__;
static char __pyx_k___complex__[] = "__complex__";
static PyObject *__pyx_kp___complex__;
static char __pyx_k___oct__[] = "__oct__";
static PyObject *__pyx_kp___oct__;
static char __pyx_k___hex__[] = "__hex__";
static PyObject *__pyx_kp___hex__;
static char __pyx_k___richcmp__[] = "__richcmp__";
static PyObject *__pyx_kp___richcmp__;
static char __pyx_k___add__[] = "__add__";
static PyObject *__pyx_kp___add__;
static char __pyx_k___sub__[] = "__sub__";
static PyObject *__pyx_kp___sub__;
static char __pyx_k___mul__[] = "__mul__";
static PyObject *__pyx_kp___mul__;
static char __pyx_k___div__[] = "__div__";
static PyObject *__pyx_kp___div__;
static char __pyx_k___truediv__[] = "__truediv__";
static PyObject *__pyx_kp___truediv__;
static char __pyx_k___mod__[] = "__mod__";
static PyObject *__pyx_kp___mod__;
static char __pyx_k___pow__[] = "__pow__";
static PyObject *__pyx_kp___pow__;
static char __pyx_k___neg__[] = "__neg__";
static PyObject *__pyx_kp___neg__;
static char __pyx_k___pos__[] = "__pos__";
static PyObject *__pyx_kp___pos__;
static char __pyx_k___abs__[] = "__abs__";
static PyObject *__pyx_kp___abs__;
static char __pyx_k___nonzero__[] = "__nonzero__";
static PyObject *__pyx_kp___nonzero__;
static char __pyx_k___invert__[] = "__invert__";
static PyObject *__pyx_kp___invert__;
static char __pyx_k___lshift__[] = "__lshift__";
static PyObject *__pyx_kp___lshift__;
static char __pyx_k___rshift__[] = "__rshift__";
static PyObject *__pyx_kp___rshift__;
static char __pyx_k___and__[] = "__and__";
static PyObject *__pyx_kp___and__;
static char __pyx_k___or__[] = "__or__";
static PyObject *__pyx_kp___or__;
static char __pyx_k___xor__[] = "__xor__";
static PyObject *__pyx_kp___xor__;
static char __pyx_k__init[] = "_init";
static PyObject *__pyx_kp__init;
static char __pyx_k_strlen[] = "strlen";
static PyObject *__pyx_kp_strlen;
static char __pyx_k___parseBool[] = "__parseBool";
static PyObject *__pyx_kp___parseBool;
static char __pyx_k___init__[] = "__init__";
static PyObject *__pyx_kp___init__;
static char __pyx_k_register[] = "register";
static PyObject *__pyx_kp_register;
static char __pyx_k_unregister[] = "unregister";
static PyObject *__pyx_kp_unregister;
static char __pyx_k___call__[] = "__call__";
static PyObject *__pyx_kp___call__;
static char __pyx_k___dealloc__[] = "__dealloc__";
static PyObject *__pyx_kp___dealloc__;
static char __pyx_k_hasattr[] = "hasattr";
static PyObject *__pyx_kp_hasattr;
static char __pyx_k_setattr[] = "setattr";
static PyObject *__pyx_kp_setattr;
static char __pyx_k_attribute_tag[] = "attribute_tag";
static PyObject *__pyx_kp_attribute_tag;
static char __pyx_k_tag[] = "tag";
static PyObject *__pyx_kp_tag;
static char __pyx_k_value[] = "value";
static PyObject *__pyx_kp_value;
static char __pyx_k_key[] = "key";
static PyObject *__pyx_kp_key;
static char __pyx_k_path[] = "path";
static PyObject *__pyx_kp_path;
static char __pyx_k_default[] = "default";
static PyObject *__pyx_kp_default;
static char __pyx_k_prefix[] = "prefix";
static PyObject *__pyx_kp_prefix;
static char __pyx_k_s[] = "s";
static PyObject *__pyx_kp_s;
static char __pyx_k_function[] = "function";
static PyObject *__pyx_kp_function;
static char __pyx_k_self[] = "self";
static PyObject *__pyx_kp_self;
static char __pyx_k_other[] = "other";
static PyObject *__pyx_kp_other;
static char __pyx_k_op[] = "op";
static PyObject *__pyx_kp_op;
static char __pyx_k_modulo[] = "modulo";
static PyObject *__pyx_kp_modulo;
static char __pyx_k_name[] = "name";
static PyObject *__pyx_kp_name;
static char __pyx_k_type_check[] = "type_check";
static PyObject *__pyx_kp_type_check;
static char __pyx_k_type_class[] = "type_class";
static PyObject *__pyx_kp_type_class;
static char __pyx_k_stringify[] = "stringify";
static PyObject *__pyx_kp_stringify;
static char __pyx_k_before[] = "before";
static PyObject *__pyx_kp_before;
static char __pyx_k_after[] = "after";
static PyObject *__pyx_kp_after;
static char __pyx_k_types[] = "types";
static PyObject *__pyx_kp_types;
static char __pyx_k_b[] = "b";
static PyObject *__pyx_kp_b;
static char __pyx_k_obj[] = "obj";
static PyObject *__pyx_kp_obj;
static char __pyx_k_namespace[] = "namespace";
static PyObject *__pyx_kp_namespace;
static char __pyx_k_nsmap[] = "nsmap";
static PyObject *__pyx_kp_nsmap;
static char __pyx_k_annotate[] = "annotate";
static PyObject *__pyx_kp_annotate;
static char __pyx_k_makeelement[] = "makeelement";
static PyObject *__pyx_kp_makeelement;
static char __pyx_k_on[] = "on";
static PyObject *__pyx_kp_on;
static char __pyx_k_element[] = "element";
static PyObject *__pyx_kp_element;
static char __pyx_k_data[] = "data";
static PyObject *__pyx_kp_data;
static char __pyx_k_tree_class[] = "tree_class";
static PyObject *__pyx_kp_tree_class;
static char __pyx_k_empty_data_class[] = "empty_data_class";
static PyObject *__pyx_kp_empty_data_class;
static char __pyx_k_element_or_tree[] = "element_or_tree";
static PyObject *__pyx_kp_element_or_tree;
static char __pyx_k_ignore_old[] = "ignore_old";
static PyObject *__pyx_kp_ignore_old;
static char __pyx_k_ignore_xsi[] = "ignore_xsi";
static PyObject *__pyx_kp_ignore_xsi;
static char __pyx_k_empty_pytype[] = "empty_pytype";
static PyObject *__pyx_kp_empty_pytype;
static char __pyx_k_ignore_pytype[] = "ignore_pytype";
static PyObject *__pyx_kp_ignore_pytype;
static char __pyx_k_empty_type[] = "empty_type";
static PyObject *__pyx_kp_empty_type;
static char __pyx_k_annotate_xsi[] = "annotate_xsi";
static PyObject *__pyx_kp_annotate_xsi;
static char __pyx_k_annotate_pytype[] = "annotate_pytype";
static PyObject *__pyx_kp_annotate_pytype;
static char __pyx_k_pytype[] = "pytype";
static PyObject *__pyx_kp_pytype;
static char __pyx_k_xsi[] = "xsi";
static PyObject *__pyx_kp_xsi;
static char __pyx_k_xsi_nil[] = "xsi_nil";
static PyObject *__pyx_kp_xsi_nil;
static char __pyx_k_new_parser[] = "new_parser";
static PyObject *__pyx_kp_new_parser;
static char __pyx_k_xml[] = "xml";
static PyObject *__pyx_kp_xml;
static char __pyx_k_parser[] = "parser";
static PyObject *__pyx_kp_parser;
static char __pyx_k_base_url[] = "base_url";
static PyObject *__pyx_kp_base_url;
static char __pyx_k_f[] = "f";
static PyObject *__pyx_kp_f;
static char __pyx_k__tag[] = "_tag";
static PyObject *__pyx_kp__tag;
static char __pyx_k_attrib[] = "attrib";
static PyObject *__pyx_kp_attrib;
static char __pyx_k__pytype[] = "_pytype";
static PyObject *__pyx_kp__pytype;
static char __pyx_k__value[] = "_value";
static PyObject *__pyx_kp__value;
static char __pyx_k__xsi[] = "_xsi";
static PyObject *__pyx_kp__xsi;
static char __pyx_k_root[] = "root";
static PyObject *__pyx_kp_root;
static char __pyx_k_677[] = "BoolElement";
static PyObject *__pyx_kp_677;
static char __pyx_k_678[] = "DataElement";
static PyObject *__pyx_kp_678;
static char __pyx_k_679[] = "E";
static PyObject *__pyx_kp_679;
static char __pyx_k_680[] = "Element";
static PyObject *__pyx_kp_680;
static char __pyx_k_681[] = "ElementMaker";
static PyObject *__pyx_kp_681;
static char __pyx_k_682[] = "FloatElement";
static PyObject *__pyx_kp_682;
static char __pyx_k_683[] = "IntElement";
static PyObject *__pyx_kp_683;
static char __pyx_k_684[] = "LongElement";
static PyObject *__pyx_kp_684;
static char __pyx_k_685[] = "NoneElement";
static PyObject *__pyx_kp_685;
static char __pyx_k_686[] = "NumberElement";
static PyObject *__pyx_kp_686;
static char __pyx_k_687[] = "ObjectPath";
static PyObject *__pyx_kp_687;
static char __pyx_k_688[] = "ObjectifiedDataElement";
static PyObject *__pyx_kp_688;
static char __pyx_k_689[] = "ObjectifiedElement";
static PyObject *__pyx_kp_689;
static char __pyx_k_690[] = "ObjectifyElementClassLookup";
static PyObject *__pyx_kp_690;
static char __pyx_k_691[] = "PYTYPE_ATTRIBUTE";
static PyObject *__pyx_kp_691;
static char __pyx_k_692[] = "PyType";
static PyObject *__pyx_kp_692;
static char __pyx_k_693[] = "StringElement";
static PyObject *__pyx_kp_693;
static char __pyx_k_694[] = "XML";
static PyObject *__pyx_kp_694;
static char __pyx_k_695[] = "annotate";
static PyObject *__pyx_kp_695;
static char __pyx_k_696[] = "deannotate";
static PyObject *__pyx_kp_696;
static char __pyx_k_697[] = "dump";
static PyObject *__pyx_kp_697;
static char __pyx_k_698[] = "enable_recursive_str";
static PyObject *__pyx_kp_698;
static char __pyx_k_699[] = "fromstring";
static PyObject *__pyx_kp_699;
static char __pyx_k_700[] = "getRegisteredTypes";
static PyObject *__pyx_kp_700;
static char __pyx_k_701[] = "makeparser";
static PyObject *__pyx_kp_701;
static char __pyx_k_702[] = "parse";
static PyObject *__pyx_kp_702;
static char __pyx_k_703[] = "pyannotate";
static PyObject *__pyx_kp_703;
static char __pyx_k_704[] = "pytypename";
static PyObject *__pyx_kp_704;
static char __pyx_k_705[] = "set_default_parser";
static PyObject *__pyx_kp_705;
static char __pyx_k_706[] = "set_pytype_attribute_tag";
static PyObject *__pyx_kp_706;
static char __pyx_k_707[] = "xsiannotate";
static PyObject *__pyx_kp_707;
static char __pyx_k___all__[] = "__all__";
static PyObject *__pyx_kp___all__;
static char __pyx_k_lxml[] = "lxml";
static PyObject *__pyx_kp_lxml;
static char __pyx_k_etree[] = "etree";
static PyObject *__pyx_kp_etree;
static char __pyx_k___version__[] = "__version__";
static PyObject *__pyx_kp___version__;
static char __pyx_k_re[] = "re";
static PyObject *__pyx_kp_re;
static char __pyx_k_ValueError[] = "ValueError";
static PyObject *__pyx_kp_ValueError;
static char __pyx_k_TypeError[] = "TypeError";
static PyObject *__pyx_kp_TypeError;
static char __pyx_k_itertools[] = "itertools";
static PyObject *__pyx_kp_itertools;
static char __pyx_k_islice[] = "islice";
static PyObject *__pyx_kp_islice;
static char __pyx_k_PYTYPE_ATTRIBUTE[] = "PYTYPE_ATTRIBUTE";
static PyObject *__pyx_kp_PYTYPE_ATTRIBUTE;
static char __pyx_k_708[] = "TREE";
static PyObject *__pyx_kp_708;
static char __pyx_k_709[] = "set_pytype_attribute_tag";
static PyObject *__pyx_kp_709;
static char __pyx_k_pickleReduceElement[] = "pickleReduceElement";
static PyObject *__pyx_kp_pickleReduceElement;
static char __pyx_k_716[] = "pickleReduceElementTree";
static PyObject *__pyx_kp_716;
static char __pyx_k_strip_attributes[] = "strip_attributes";
static PyObject *__pyx_kp_strip_attributes;
static char __pyx_k_XMLParser[] = "XMLParser";
static PyObject *__pyx_kp_XMLParser;
static char __pyx_k_remove_blank_text[] = "remove_blank_text";
static PyObject *__pyx_kp_remove_blank_text;
static char __pyx_k_726[] = "set_element_class_lookup";
static PyObject *__pyx_kp_726;
static char __pyx_k_fromstring[] = "fromstring";
static PyObject *__pyx_kp_fromstring;
static char __pyx_k_parse[] = "parse";
static PyObject *__pyx_kp_parse;
static char __pyx_k_727[] = "py";
static PyObject *__pyx_kp_727;
static char __pyx_k_728[] = "xsi";
static PyObject *__pyx_kp_728;
static char __pyx_k_729[] = "xsd";
static PyObject *__pyx_kp_729;
static char __pyx_k_E[] = "E";
static PyObject *__pyx_kp_E;
static char __pyx_k_compile[] = "compile";
static PyObject *__pyx_kp_compile;
static char __pyx_k_U[] = "U";
static PyObject *__pyx_kp_U;
static char __pyx_k_match[] = "match";
static PyObject *__pyx_kp_match;
static char __pyx_k_732[] = "pytype";
static PyObject *__pyx_kp_732;
static char __pyx_k_getparent[] = "getparent";
static PyObject *__pyx_kp_getparent;
static char __pyx_k_735[] = "ElementChildIterator";
static PyObject *__pyx_kp_735;
static char __pyx_k_738[] = "text";
static PyObject *__pyx_kp_738;
static char __pyx_k_739[] = "pyval";
static PyObject *__pyx_kp_739;
static char __pyx_k_741[] = "tail";
static PyObject *__pyx_kp_741;
static char __pyx_k_742[] = "tag";
static PyObject *__pyx_kp_742;
static char __pyx_k___set__[] = "__set__";
static PyObject *__pyx_kp___set__;
static char __pyx_k_743[] = "base";
static PyObject *__pyx_kp_743;
static char __pyx_k_base[] = "base";
static PyObject *__pyx_kp_base;
static char __pyx_k_remove[] = "remove";
static PyObject *__pyx_kp_remove;
static char __pyx_k_IndexError[] = "IndexError";
static PyObject *__pyx_kp_IndexError;
static char __pyx_k_ETXPath[] = "ETXPath";
static PyObject *__pyx_kp_ETXPath;
static char __pyx_k_text[] = "text";
static PyObject *__pyx_kp_text;
static char __pyx_k_join[] = "join";
static PyObject *__pyx_kp_join;
static char __pyx_k_AttributeError[] = "AttributeError";
static PyObject *__pyx_kp_AttributeError;
static char __pyx_k_replace[] = "replace";
static PyObject *__pyx_kp_replace;
static char __pyx_k_749[] = "true";
static PyObject *__pyx_kp_749;
static char __pyx_k_751[] = "str";
static PyObject *__pyx_kp_751;
static char __pyx_k_addnext[] = "addnext";
static PyObject *__pyx_kp_addnext;
static char __pyx_k_oct[] = "oct";
static PyObject *__pyx_kp_oct;
static char __pyx_k_hex[] = "hex";
static PyObject *__pyx_kp_hex;
static char __pyx_k_759[] = "None";
static PyObject *__pyx_kp_759;
static char __pyx_k_760[] = "None";
static PyObject *__pyx_kp_760;
static char __pyx_k_762[] = "false";
static PyObject *__pyx_kp_762;
static char __pyx_k_763[] = "true";
static PyObject *__pyx_kp_763;
static char __pyx_k_768[] = "pyval";
static PyObject *__pyx_kp_768;
static char __pyx_k_pyval[] = "pyval";
static PyObject *__pyx_kp_pyval;
static char __pyx_k_769[] = "pyval";
static PyObject *__pyx_kp_769;
static char __pyx_k_770[] = "pyval";
static PyObject *__pyx_kp_770;
static char __pyx_k___name__[] = "__name__";
static PyObject *__pyx_kp___name__;
static char __pyx_k_enumerate[] = "enumerate";
static PyObject *__pyx_kp_enumerate;
static char __pyx_k_get[] = "get";
static PyObject *__pyx_kp_get;
static char __pyx_k_map[] = "map";
static PyObject *__pyx_kp_map;
static char __pyx_k_778[] = "true";
static PyObject *__pyx_kp_778;
static char __pyx_k_779[] = "false";
static PyObject *__pyx_kp_779;
static char __pyx_k_780[] = "str";
static PyObject *__pyx_kp_780;
static char __pyx_k_781[] = "int";
static PyObject *__pyx_kp_781;
static char __pyx_k_782[] = "integer";
static PyObject *__pyx_kp_782;
static char __pyx_k_783[] = "int";
static PyObject *__pyx_kp_783;
static char __pyx_k_784[] = "short";
static PyObject *__pyx_kp_784;
static char __pyx_k_785[] = "byte";
static PyObject *__pyx_kp_785;
static char __pyx_k_786[] = "unsignedShort";
static PyObject *__pyx_kp_786;
static char __pyx_k_787[] = "unsignedByte";
static PyObject *__pyx_kp_787;
static char __pyx_k_788[] = "nonPositiveInteger";
static PyObject *__pyx_kp_788;
static char __pyx_k_789[] = "negativeInteger";
static PyObject *__pyx_kp_789;
static char __pyx_k_790[] = "long";
static PyObject *__pyx_kp_790;
static char __pyx_k_791[] = "nonNegativeInteger";
static PyObject *__pyx_kp_791;
static char __pyx_k_792[] = "unsignedLong";
static PyObject *__pyx_kp_792;
static char __pyx_k_793[] = "unsignedInt";
static PyObject *__pyx_kp_793;
static char __pyx_k_794[] = "positiveInteger";
static PyObject *__pyx_kp_794;
static char __pyx_k_xmlSchemaTypes[] = "xmlSchemaTypes";
static PyObject *__pyx_kp_xmlSchemaTypes;
static char __pyx_k_795[] = "long";
static PyObject *__pyx_kp_795;
static char __pyx_k_796[] = "float";
static PyObject *__pyx_kp_796;
static char __pyx_k_797[] = "double";
static PyObject *__pyx_kp_797;
static char __pyx_k_798[] = "float";
static PyObject *__pyx_kp_798;
static char __pyx_k_799[] = "bool";
static PyObject *__pyx_kp_799;
static char __pyx_k___checkBool[] = "__checkBool";
static PyObject *__pyx_kp___checkBool;
static char __pyx_k___lower_bool[] = "__lower_bool";
static PyObject *__pyx_kp___lower_bool;
static char __pyx_k_800[] = "boolean";
static PyObject *__pyx_kp_800;
static char __pyx_k_801[] = "str";
static PyObject *__pyx_kp_801;
static char __pyx_k_802[] = "string";
static PyObject *__pyx_kp_802;
static char __pyx_k_803[] = "normalizedString";
static PyObject *__pyx_kp_803;
static char __pyx_k_804[] = "token";
static PyObject *__pyx_kp_804;
static char __pyx_k_805[] = "language";
static PyObject *__pyx_kp_805;
static char __pyx_k_806[] = "Name";
static PyObject *__pyx_kp_806;
static char __pyx_k_807[] = "NCName";
static PyObject *__pyx_kp_807;
static char __pyx_k_808[] = "ID";
static PyObject *__pyx_kp_808;
static char __pyx_k_809[] = "IDREF";
static PyObject *__pyx_kp_809;
static char __pyx_k_810[] = "ENTITY";
static PyObject *__pyx_kp_810;
static char __pyx_k_811[] = "NMTOKEN";
static PyObject *__pyx_kp_811;
static char __pyx_k_812[] = "NoneType";
static PyObject *__pyx_kp_812;
static char __pyx_k_813[] = "none";
static PyObject *__pyx_kp_813;
static char __pyx_k_817[] = "true";
static PyObject *__pyx_kp_817;
static char __pyx_k_818[] = "str";
static PyObject *__pyx_kp_818;
static char __pyx_k_strip[] = "strip";
static PyObject *__pyx_kp_strip;
static char __pyx_k_iterchildren[] = "iterchildren";
static PyObject *__pyx_kp_iterchildren;
static char __pyx_k_ElementTree[] = "ElementTree";
static PyObject *__pyx_kp_ElementTree;
static char __pyx_k_copyreg[] = "copyreg";
static PyObject *__pyx_kp_copyreg;
static char __pyx_k_copy_reg[] = "copy_reg";
static PyObject *__pyx_kp_copy_reg;
static char __pyx_k_constructor[] = "constructor";
static PyObject *__pyx_kp_constructor;
static char __pyx_k_827[] = "__unpickleElementTree";
static PyObject *__pyx_kp_827;
static char __pyx_k_pickle[] = "pickle";
static PyObject *__pyx_kp_pickle;
static char __pyx_k__ElementTree[] = "_ElementTree";
static PyObject *__pyx_kp__ElementTree;
static char __pyx_k_tostring[] = "tostring";
static PyObject *__pyx_kp_tostring;
static char __pyx_k_828[] = "true";
static PyObject *__pyx_kp_828;
static char __pyx_k_split[] = "split";
static PyObject *__pyx_kp_split;
static char __pyx_k_835[] = "str";
static PyObject *__pyx_kp_835;
static char __pyx_k_836[] = "NoneType";
static PyObject *__pyx_kp_836;
static char __pyx_k_838[] = "true";
static PyObject *__pyx_kp_838;
static char __pyx_k_842[] = "none";
static PyObject *__pyx_kp_842;
static char __pyx_k_843[] = "NoneType";
static PyObject *__pyx_kp_843;
static char __pyx_k_857[] = "remove_blank_text";
static PyObject *__pyx_kp_857;
static char __pyx_k_858[] = "remove_blank_text";
static PyObject *__pyx_kp_858;
static char __pyx_k_update[] = "update";
static PyObject *__pyx_kp_update;
static char __pyx_k___copy__[] = "__copy__";
static PyObject *__pyx_kp___copy__;
static char __pyx_k_items[] = "items";
static PyObject *__pyx_kp_items;
static char __pyx_k_865[] = "str";
static PyObject *__pyx_kp_865;
static char __pyx_k_866[] = "NoneType";
static PyObject *__pyx_kp_866;
static char __pyx_k_867[] = "true";
static PyObject *__pyx_kp_867;
static char __pyx_k_868[] = "false";
static PyObject *__pyx_kp_868;
static char __pyx_k_869[] = "NoneType";
static PyObject *__pyx_kp_869;
static char __pyx_k_870[] = "none";
static PyObject *__pyx_kp_870;
static char __pyx_k_871[] = "true";
static PyObject *__pyx_kp_871;
static char __pyx_k_872[] = "value";
static PyObject *__pyx_kp_872;
static char __pyx_k_groups[] = "groups";
static PyObject *__pyx_kp_groups;
static char __pyx_k_end[] = "end";
static PyObject *__pyx_kp_end;
static PyObject *__pyx_kp_710;
static PyObject *__pyx_kp_711;
static PyObject *__pyx_kp_712;
static PyObject *__pyx_kp_713;
static PyObject *__pyx_kp_730;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
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_kp_731;
static char __pyx_k_731[] = "http://codespeak.net/lxml/objectify/pytype";
static char __pyx_k_733[] = "UTF-8";
static char __pyx_k_734[] = "UTF-8";
static PyObject *__pyx_kp_736;
static char __pyx_k_736[] = "";
static PyObject *__pyx_kp_737;
static char __pyx_k_737[] = "{%s}*";
static PyObject *__pyx_kp_740;
static char __pyx_k_740[] = "attribute '%s' of '%s' objects is not writable";
static PyObject *__pyx_kp_744;
static char __pyx_k_744[] = "assignment to root element is invalid";
static PyObject *__pyx_kp_745;
static char __pyx_k_745[] = "deleting items not supported by root element";
static PyObject *__pyx_kp_746;
static char __pyx_k_746[] = "";
static PyObject *__pyx_kp_747;
static char __pyx_k_747[] = ".";
static PyObject *__pyx_kp_748;
static char __pyx_k_748[] = "no such child: ";
static char __pyx_k_750[] = "nil";
static PyObject *__pyx_kp_752;
static PyObject *__pyx_kp_753;
static char __pyx_k_752[] = "Invalid slice";
static char __pyx_k_753[] = "attempt to assign sequence of size %d to extended slice of size %d";
static PyObject *__pyx_kp_754;
static char __pyx_k_754[] = "";
static PyObject *__pyx_kp_755;
static char __pyx_k_755[] = "";
static PyObject *__pyx_kp_756;
static char __pyx_k_756[] = "";
static PyObject *__pyx_kp_757;
static char __pyx_k_757[] = "";
static PyObject *__pyx_kp_758;
static char __pyx_k_758[] = "invalid types for * operator";
static PyObject *__pyx_kp_761;
static char __pyx_k_761[] = "Invalid boolean value: '%s'";
static PyObject *__pyx_kp_764;
static PyObject *__pyx_kp_765;
static char __pyx_k_764[] = "0";
static char __pyx_k_765[] = "1";
static PyObject *__pyx_kp_766;
static PyObject *__pyx_kp_767;
static char __pyx_k_766[] = "";
static char __pyx_k_767[] = "";
static PyObject *__pyx_kp_772;
static PyObject *__pyx_kp_773;
static PyObject *__pyx_kp_774;
static char __pyx_k_771[] = "ASCII";
static char __pyx_k_772[] = "Type name must be a string";
static char __pyx_k_773[] = "Type check function must be callable (or None)";
static char __pyx_k_774[] = "Data classes must inherit from ObjectifiedDataElement";
static PyObject *__pyx_kp_775;
static char __pyx_k_775[] = "PyType(%s, %s)";
static PyObject *__pyx_kp_776;
static PyObject *__pyx_kp_777;
static char __pyx_k_776[] = "Cannot register tree type";
static char __pyx_k_777[] = "inconsistent before/after dependencies";
static PyObject *__pyx_kp_814;
static char __pyx_k_814[] = "";
static PyObject *__pyx_kp_815;
static char __pyx_k_815[] = "{%s}";
static PyObject *__pyx_kp_816;
static char __pyx_k_816[] = "{";
static PyObject *__pyx_kp_819;
static PyObject *__pyx_kp_820;
static PyObject *__pyx_kp_821;
static PyObject *__pyx_kp_822;
static PyObject *__pyx_kp_823;
static PyObject *__pyx_kp_824;
static PyObject *__pyx_kp_825;
static PyObject *__pyx_kp_826;
static char __pyx_k_819[] = "    ";
static char __pyx_k_820[] = "%s%s = %s [%s]\n";
static char __pyx_k_821[] = "{%s}";
static char __pyx_k_822[] = "{%s}";
static char __pyx_k_823[] = "{";
static char __pyx_k_824[] = "py:";
static char __pyx_k_825[] = "xsi:";
static char __pyx_k_826[] = "%s  * %s = %r\n";
static PyObject *__pyx_kp_831;
static PyObject *__pyx_kp_832;
static char __pyx_k_829[] = "nil";
static char __pyx_k_830[] = "type";
static char __pyx_k_831[] = ":";
static char __pyx_k_832[] = ":";
static PyObject *__pyx_kp_840;
static PyObject *__pyx_kp_841;
static PyObject *__pyx_kp_846;
static PyObject *__pyx_kp_847;
static PyObject *__pyx_kp_848;
static PyObject *__pyx_kp_849;
static char __pyx_k_833[] = "ASCII";
static char __pyx_k_834[] = "ASCII";
static char __pyx_k_837[] = "nil";
static char __pyx_k_839[] = "type";
static char __pyx_k_840[] = ":";
static char __pyx_k_841[] = ":";
static char __pyx_k_844[] = "type";
static char __pyx_k_845[] = "xsd";
static char __pyx_k_846[] = ":";
static char __pyx_k_847[] = ":";
static char __pyx_k_848[] = ":";
static char __pyx_k_849[] = ":";
static char __pyx_k_850[] = "xsi";
static char __pyx_k_851[] = "type";
static char __pyx_k_852[] = "py";
static char __pyx_k_853[] = "xsi";
static char __pyx_k_854[] = "nil";
static char __pyx_k_855[] = "true";
static PyObject *__pyx_kp_856;
static char __pyx_k_856[] = "parser must inherit from lxml.etree.XMLParser";
static PyObject *__pyx_kp_859;
static PyObject *__pyx_kp_860;
static PyObject *__pyx_kp_861;
static PyObject *__pyx_kp_862;
static PyObject *__pyx_kp_863;
static PyObject *__pyx_kp_864;
static char __pyx_k_859[] = ":";
static char __pyx_k_860[] = ":";
static char __pyx_k_861[] = "XSD types require the XSD namespace";
static char __pyx_k_862[] = "xsd:";
static char __pyx_k_863[] = ":";
static char __pyx_k_864[] = "XSD types require the XSD namespace";
static PyObject *__pyx_kp_873;
static char __pyx_k_873[] = ".";
static PyObject *__pyx_kp_874;
static char __pyx_k_874[] = "invalid number of arguments: needs one or two";
static PyObject *__pyx_kp_876;
static PyObject *__pyx_kp_877;
static PyObject *__pyx_kp_878;
static PyObject *__pyx_kp_879;
static PyObject *__pyx_kp_880;
static char __pyx_k_875[] = "ASCII";
static char __pyx_k_876[] = ".";
static char __pyx_k_877[] = ".";
static char __pyx_k_878[] = "index not allowed on root node";
static char __pyx_k_879[] = "invalid path";
static char __pyx_k_880[] = "invalid path";
static PyObject *__pyx_kp_881;
static PyObject *__pyx_kp_882;
static PyObject *__pyx_kp_883;
static PyObject *__pyx_kp_884;
static char __pyx_k_881[] = "";
static char __pyx_k_882[] = "index must be enclosed in []";
static char __pyx_k_883[] = "index not allowed on root node";
static char __pyx_k_884[] = "invalid path";
static PyObject *__pyx_kp_885;
static PyObject *__pyx_kp_886;
static char __pyx_k_885[] = "root element does not match: need %s, got %s";
static char __pyx_k_886[] = "no such child: ";
static PyObject *__pyx_kp_887;
static PyObject *__pyx_kp_888;
static PyObject *__pyx_kp_889;
static char __pyx_k_887[] = "cannot update root node";
static char __pyx_k_888[] = "root element does not match: need %s, got %s";
static char __pyx_k_889[] = "creating indexed path attributes is not supported";
static PyObject *__pyx_kp_890;
static PyObject *__pyx_kp_891;
static char __pyx_k_890[] = ".";
static char __pyx_k_891[] = ".";
static PyObject *__pyx_kp_892;
static PyObject *__pyx_kp_893;
static PyObject *__pyx_kp_894;
static char __pyx_k_892[] = ".";
static char __pyx_k_893[] = "{}";
static char __pyx_k_894[] = "[%d]";

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":40
 * from itertools import islice
 * 
 * cdef object _typename(object t):             # <<<<<<<<<<<<<<
 *     cdef char* c_name
 *     cdef char* s
 */

static  PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
  char *__pyx_v_c_name;
  char *__pyx_v_s;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("_typename");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":43
 *     cdef char* c_name
 *     cdef char* s
 *     c_name = python._fqtypename(t)             # <<<<<<<<<<<<<<
 *     s = cstd.strrchr(c_name, c'.')
 *     if s is not NULL:
 */
  __pyx_v_c_name = _fqtypename(__pyx_v_t);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":44
 *     cdef char* s
 *     c_name = python._fqtypename(t)
 *     s = cstd.strrchr(c_name, c'.')             # <<<<<<<<<<<<<<
 *     if s is not NULL:
 *         c_name = s + 1
 */
  __pyx_v_s = strrchr(__pyx_v_c_name, '.');

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":45
 *     c_name = python._fqtypename(t)
 *     s = cstd.strrchr(c_name, c'.')
 *     if s is not NULL:             # <<<<<<<<<<<<<<
 *         c_name = s + 1
 *     return pyunicode(c_name)
 */
  __pyx_t_1 = (__pyx_v_s != NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":46
 *     s = cstd.strrchr(c_name, c'.')
 *     if s is not NULL:
 *         c_name = s + 1             # <<<<<<<<<<<<<<
 *     return pyunicode(c_name)
 * 
 */
    __pyx_v_c_name = (__pyx_v_s + 1);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":47
 *     if s is not NULL:
 *         c_name = s + 1
 *     return pyunicode(c_name)             # <<<<<<<<<<<<<<
 * 
 * # namespace/name for "pytype" hint attribute
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = pyunicode(__pyx_v_c_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":63
 * TREE_PYTYPE_NAME = u"TREE"
 * 
 * cdef _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
 *     return (s, python.PyUnicode_AsUTF8String(s))
 * 
 */

static  PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("_unicodeAndUtf8");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":64
 * 
 * cdef _unicodeAndUtf8(s):
 *     return (s, python.PyUnicode_AsUTF8String(s))             # <<<<<<<<<<<<<<
 * 
 * def set_pytype_attribute_tag(attribute_tag=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = ((PyObject *)__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._unicodeAndUtf8");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":66
 *     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
 */

static PyObject *__pyx_pf_4lxml_9objectify_set_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 PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_tag = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_attribute_tag,0};
  __Pyx_SetupRefcountContext("set_pytype_attribute_tag");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_attribute_tag);
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_pytype_attribute_tag") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_attribute_tag = values[0];
  } else {
    __pyx_v_attribute_tag = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_attribute_tag = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":80
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":82
 *     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 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_731)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
      PyObject* tuple = __pyx_t_2;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":81
 *     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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
      __Pyx_GIVEREF(__pyx_2);
      __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_2;
      __pyx_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_GIVEREF(__pyx_3);
      __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
      __Pyx_GIVEREF(__pyx_2);
      __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_2;
      __pyx_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_GIVEREF(__pyx_3);
      __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":84
 *             _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_2 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_732)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
      PyObject* tuple = __pyx_t_2;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":83
 *         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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
      __Pyx_GIVEREF(__pyx_2);
      __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_2;
      __pyx_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_GIVEREF(__pyx_3);
      __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
      __Pyx_GIVEREF(__pyx_2);
      __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_2;
      __pyx_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_GIVEREF(__pyx_3);
      __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_3;
      __pyx_3 = 0;
    }
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":87
 *     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_2 = getNsTag(__pyx_v_attribute_tag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
      PyObject* tuple = __pyx_t_2;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":86
 *             _unicodeAndUtf8(u"pytype")
 *     else:
 *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
 *             cetree.getNsTag(attribute_tag)
 *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
 */
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_GIVEREF(__pyx_2);
      __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_2;
      __pyx_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_GIVEREF(__pyx_3);
      __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
      __Pyx_GIVEREF(__pyx_2);
      __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_2;
      __pyx_2 = 0;
      __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
      __Pyx_GIVEREF(__pyx_3);
      __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":89
 *             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_2 = PyUnicode_FromEncodedObject(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, __pyx_k_733, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":91
 *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
 *         PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
 *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)             # <<<<<<<<<<<<<<
 * 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE_UTF8)
 */
    __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, __pyx_k_734, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":93
 *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
 * 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE_UTF8)             # <<<<<<<<<<<<<<
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 */
  __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = PyString_AS_STRING(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":94
 * 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE_UTF8)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)             # <<<<<<<<<<<<<<
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 */
  __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = PyString_AS_STRING(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":96
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
 * 
 * set_pytype_attribute_tag()
 */
  __pyx_t_2 = namespacedNameFromNsName(__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 = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":138
 *     subclasses.
 *     """
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         u"""Iterate over self and all siblings with the same tag.
 *         """
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___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        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_v_parent;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("__iter__");
  __pyx_v_parent = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":141
 *         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(__pyx_v_self, __pyx_kp_getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __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 = 141; __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_parent);
  __pyx_v_parent = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":142
 *         """
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":143
 *         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 = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_self);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __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_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":144
 *         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_kp_735); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_1, __pyx_kp_tag, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __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_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 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_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_parent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":146
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if __RECURSIVE_STR:
 *             return _dump(self, 0)
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__str__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":147
 * 
 *     def __str__(self):
 *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
 *             return _dump(self, 0)
 *         else:
 */
  __pyx_t_1 = __pyx_v_4lxml_9objectify___RECURSIVE_STR;
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":148
 *     def __str__(self):
 *         if __RECURSIVE_STR:
 *             return _dump(self, 0)             # <<<<<<<<<<<<<<
 *         else:
 *             return textOf(self._c_node) or u''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __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_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":150
 *             return _dump(self, 0)
 *         else:
 *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     property text:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); 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_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __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_736));
      __pyx_t_3 = __pyx_kp_736;
    } else {
      __pyx_t_3 = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L5:;

  __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.__str__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":161
 *         Note that this only considers the first child with a given name.
 *         """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char* c_ns
 *             cdef char* c_child_ns
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self) {
  char *__pyx_v_c_ns;
  struct LxmlElement *__pyx_v_child;
  PyObject *__pyx_v_children;
  PyObject *__pyx_v_tag;
  PyObject *__pyx_v_name;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_SetupRefcountContext("__get__");
  __pyx_v_child = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_children = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":166
 *             cdef _Element child
 *             cdef dict children
 *             c_ns = tree._getNs(self._c_node)             # <<<<<<<<<<<<<<
 *             if c_ns is NULL:
 *                 tag = None
 */
  __pyx_v_c_ns = _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":167
 *             cdef dict children
 *             c_ns = tree._getNs(self._c_node)
 *             if c_ns is NULL:             # <<<<<<<<<<<<<<
 *                 tag = None
 *             else:
 */
  __pyx_t_1 = (__pyx_v_c_ns == NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":168
 *             c_ns = tree._getNs(self._c_node)
 *             if c_ns is NULL:
 *                 tag = None             # <<<<<<<<<<<<<<
 *             else:
 *                 tag = u"{%s}*" % pyunicode(c_ns)
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = Py_None;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":170
 *                 tag = None
 *             else:
 *                 tag = u"{%s}*" % pyunicode(c_ns)             # <<<<<<<<<<<<<<
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):
 */
    __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_737), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

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

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":172
 *                 tag = u"{%s}*" % pyunicode(c_ns)
 *             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_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_735); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __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 = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  if (PyDict_SetItem(__pyx_1, __pyx_kp_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __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_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2);
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_2))) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++;
    } else {
      __pyx_t_5 = PyIter_Next(__pyx_t_2);
      if (!__pyx_t_5) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((struct LxmlElement *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":173
 *             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)
 */
    if ((__pyx_v_c_ns == NULL)) {
      __pyx_t_1 = (_getNs(__pyx_v_child->_c_node) != NULL);
    } else {
      __pyx_t_1 = (__pyx_v_c_ns == NULL);
    }
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":174
 *             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_L6_continue;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":175
 *                 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_5 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":176
 *                     continue
 *                 name = pyunicode(child._c_node.name)
 *                 if python.PyDict_GetItem(children, name) is NULL:             # <<<<<<<<<<<<<<
 *                     children[name] = child
 *             return children
 */
    __pyx_t_1 = (PyDict_GetItem(((PyObject *)__pyx_v_children), __pyx_v_name) == NULL);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":177
 *                 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 = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    __pyx_L9:;
    __pyx_L6_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":178
 *                 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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__dict__.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_child);
  __Pyx_DECREF(__pyx_v_children);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":180
 *             return children
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         u"""Count self and siblings with the same tag.
 *         """
 */

static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___len__[] = "Count self and siblings with the same tag.\n        ";
static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_SetupRefcountContext("__len__");

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

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":185
 *         return _countSiblings(self._c_node)
 * 
 *     def countchildren(self):             # <<<<<<<<<<<<<<
 *         u"""countchildren(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren[] = "countchildren(self)\n\n        Return the number of children of this element, regardless of their\n        name.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused) {
  Py_ssize_t __pyx_v_c;
  xmlNode *__pyx_v_c_node;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("countchildren");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":194
 *         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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":195
 *         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 = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":196
 *         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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":197
 *         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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":198
 *         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_L7;
    }
    __pyx_L7:;

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

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":200
 *                 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 = 200; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":202
 *         return c
 * 
 *     def getchildren(self):             # <<<<<<<<<<<<<<
 *         u"""getchildren(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren[] = "getchildren(self)\n\n        Returns a sequence of all direct children.  The elements are\n        returned in document order.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused) {
  xmlNode *__pyx_v_c_node;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_SetupRefcountContext("getchildren");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":209
 *         """
 *         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 = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":210
 *         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 = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":211
 *         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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":212
 *         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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":213
 *         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 *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_result), __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":214
 *             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;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":215
 *                 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_AddTraceback("lxml.objectify.ObjectifiedElement.getchildren");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":217
 *         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___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___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        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__getattr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":221
 *         is provided, the child will be looked up in the same one as self.
 *         """
 *         return _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, tag, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __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 = 221; __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.__getattr__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":223
 *         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___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___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        ";
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_element;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_SetupRefcountContext("__setattr__");
  __Pyx_INCREF(__pyx_v_tag);
  __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":230
 *         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 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_kp_738), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __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 = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_2) {
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_kp_739), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":233
 *             # 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_1 = __pyx_f_4lxml_9objectify__typename(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_740), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_1, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":234
 *             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_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_kp_741), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __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 = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":235
 *                             (tag, _typename(self))
 *         elif tag == u'tail':
 *             cetree.setTailText(self._c_node, value)             # <<<<<<<<<<<<<<
 *             return
 *         elif tag == u'tag':
 */
    __pyx_t_6 = setTailText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__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 = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":236
 *         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_L5;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":237
 *             cetree.setTailText(self._c_node, value)
 *             return
 *         elif tag == u'tag':             # <<<<<<<<<<<<<<
 *             ElementBase.tag.__set__(self, value)
 *             return
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_kp_742), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __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 = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":238
 *             return
 *         elif tag == u'tag':
 *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<<
 *             return
 *         elif tag == u'base':
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic_ElementBase)), __pyx_kp_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_kp___set__); 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_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":239
 *         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_L5;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":240
 *             ElementBase.tag.__set__(self, value)
 *             return
 *         elif tag == u'base':             # <<<<<<<<<<<<<<
 *             ElementBase.base.__set__(self, value)
 *             return
 */
  __pyx_t_7 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_kp_743), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":241
 *             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_11etreepublic_ElementBase)), __pyx_kp_base); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_kp___set__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
    __Pyx_GIVEREF(__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_1, ((PyObject *)__pyx_t_7), NULL); 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);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":242
 *         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_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":243
 *             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 = 243; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":244
 *             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 = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_element));
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":245
 *         tag = _buildChildTag(self, tag)
 *         element = _lookupChild(self, tag)
 *         if element is None:             # <<<<<<<<<<<<<<
 *             _appendValue(self, tag, value)
 *         else:
 */
  __pyx_t_4 = (((PyObject *)__pyx_v_element) == Py_None);
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":246
 *         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 = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":248
 *             _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 = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_element);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":250
 *             _replaceElement(element, value)
 * 
 *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)
 */

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_v_child;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__delattr__");
  __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":251
 * 
 *     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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_child);
  __pyx_v_child = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":252
 *     def __delattr__(self, tag):
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)             # <<<<<<<<<<<<<<
 * 
 *     def addattr(self, tag, value):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __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 = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 252; __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_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_child);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":254
 *         self.remove(child)
 * 
 *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
 *         u"""addattr(self, tag, value)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr[] = "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_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tag = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_tag,&__pyx_kp_value,0};
  __Pyx_SetupRefcountContext("addattr");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_tag);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_value);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "addattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_tag = values[0];
    __pyx_v_value = values[1];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_tag = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 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 = 254; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":261
 *         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 = 261; __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 = 261; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":263
 *         _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___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___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        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  xmlNode *__pyx_v_c_self_node;
  xmlNode *__pyx_v_c_parent;
  xmlNode *__pyx_v_c_node;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  __Pyx_SetupRefcountContext("__getitem__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":279
 *         cdef tree.xmlNode* c_node
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python._isString(key):             # <<<<<<<<<<<<<<
 *             return _lookupChildOrRaise(self, key)
 *         elif python.PySlice_Check(key):
 */
  __pyx_t_1 = _isString(__pyx_v_key);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":280
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python._isString(key):
 *             return _lookupChildOrRaise(self, key)             # <<<<<<<<<<<<<<
 *         elif python.PySlice_Check(key):
 *             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 = 280; __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_L5;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":281
 *         if python._isString(key):
 *             return _lookupChildOrRaise(self, key)
 *         elif python.PySlice_Check(key):             # <<<<<<<<<<<<<<
 *             return list(self)[key]
 *         # normal item access
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_key);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":282
 *             return _lookupChildOrRaise(self, key)
 *         elif python.PySlice_Check(key):
 *             return list(self)[key]             # <<<<<<<<<<<<<<
 *         # normal item access
 *         c_self_node = self._c_node
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
    __Pyx_GIVEREF(__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 = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_1 = PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":284
 *             return list(self)[key]
 *         # normal item access
 *         c_self_node = self._c_node             # <<<<<<<<<<<<<<
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 */
  __pyx_v_c_self_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":285
 *         # normal item access
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<<
 *         if c_parent is NULL:
 *             if key == 0:
 */
  __pyx_v_c_parent = __pyx_v_c_self_node->parent;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":286
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:             # <<<<<<<<<<<<<<
 *             if key == 0:
 *                 return self
 */
  __pyx_t_1 = (__pyx_v_c_parent == NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":287
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 *             if key == 0:             # <<<<<<<<<<<<<<
 *                 return self
 *             else:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":288
 *         if c_parent is NULL:
 *             if key == 0:
 *                 return self             # <<<<<<<<<<<<<<
 *             else:
 *                 raise IndexError, unicode(key)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":290
 *                 return self
 *             else:
 *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
 *         if key < 0:
 *             c_node = c_parent.last
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 290; __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);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L7:;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":291
 *             else:
 *                 raise IndexError, unicode(key)
 *         if key < 0:             # <<<<<<<<<<<<<<
 *             c_node = c_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 = 291; __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 = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":292
 *                 raise IndexError, unicode(key)
 *         if key < 0:
 *             c_node = c_parent.last             # <<<<<<<<<<<<<<
 *         else:
 *             c_node = c_parent.children
 */
    __pyx_v_c_node = __pyx_v_c_parent->last;
    goto __pyx_L8;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":294
 *             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, key)
 */
    __pyx_v_c_node = __pyx_v_c_parent->children;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":296
 *             c_node = c_parent.children
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)             # <<<<<<<<<<<<<<
 *         if c_node is NULL:
 *             raise IndexError, unicode(key)
 */
  __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 = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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_t_4);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":297
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":298
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
 *         if c_node is NULL:
 *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
 *         return elementFactory(self._doc, c_node)
 * 
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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 = 298; __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);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":299
 *         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_3 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":301
 *         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___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___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        ";
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  struct LxmlElement *__pyx_v_element;
  xmlNode *__pyx_v_c_node;
  int __pyx_r;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("__setitem__");
  __Pyx_INCREF(__pyx_v_key);
  __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":316
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":317
 *         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 = 317; __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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":318
 *         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 = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":319
 *             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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":320
 *             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 = 320; __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*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":322
 *                 _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 = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L6:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":323
 *             else:
 *                 _replaceElement(element, value)
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if self._c_node.parent is NULL:
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

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

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":327
 *         if self._c_node.parent is NULL:
 *             # the 'root[i] = ...' case
 *             raise TypeError, u"assignment to root element is invalid"             # <<<<<<<<<<<<<<
 * 
 *         if python.PySlice_Check(key):
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_744), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":329
 *             raise TypeError, u"assignment to root element is invalid"
 * 
 *         if python.PySlice_Check(key):             # <<<<<<<<<<<<<<
 *             # slice assignment
 *             _setSlice(key, self, value)
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_key);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":331
 *         if python.PySlice_Check(key):
 *             # 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 = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L8;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":334
 *         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 = 334; __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 = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":335
 *             # 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 = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent->last;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":337
 *                 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 = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent->children;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":339
 *                 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 = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node), ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->name, __pyx_t_3);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":340
 *             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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":341
 *                 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 = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 341; __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);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L10;
    }
    __pyx_L10:;

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

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

  __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_r = -1;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_element);
  __Pyx_DECREF(__pyx_v_key);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":345
 *             _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___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_v_parent;
  PyObject *__pyx_v_del_items;
  PyObject *__pyx_v_remove;
  PyObject *__pyx_v_el;
  PyObject *__pyx_v_sibling;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_SetupRefcountContext("__delitem__");
  __pyx_v_parent = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_del_items = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_remove = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_el = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_sibling = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":347
 *     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(__pyx_v_self, __pyx_kp_getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __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 = 347; __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_parent);
  __pyx_v_parent = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":348
 *         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 python.PySlice_Check(key):
 */
  __pyx_t_3 = (__pyx_v_parent == Py_None);
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":349
 *         parent = self.getparent()
 *         if parent is None:
 *             raise TypeError, u"deleting items not supported by root element"             # <<<<<<<<<<<<<<
 *         if python.PySlice_Check(key):
 *             # slice deletion
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_745), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":350
 *         if parent is None:
 *             raise TypeError, u"deleting items not supported by root element"
 *         if python.PySlice_Check(key):             # <<<<<<<<<<<<<<
 *             # slice deletion
 *             del_items = list(self)[key]
 */
  __pyx_t_3 = PySlice_Check(__pyx_v_key);
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":352
 *         if python.PySlice_Check(key):
 *             # 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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
    __Pyx_GIVEREF(__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 = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_1 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_del_items);
    __pyx_v_del_items = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":353
 *             # slice deletion
 *             del_items = list(self)[key]
 *             remove = parent.remove             # <<<<<<<<<<<<<<
 *             for el in del_items:
 *                 remove(el)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_parent, __pyx_kp_remove); 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_DECREF(__pyx_v_remove);
    __pyx_v_remove = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":354
 *             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_4 = 0; __pyx_t_1 = __pyx_v_del_items; __Pyx_INCREF(__pyx_t_1);
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
    }
    for (;;) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
      } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
      } else {
        __pyx_t_2 = PyIter_Next(__pyx_t_1);
        if (!__pyx_t_2) {
          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_v_el);
      __pyx_v_el = __pyx_t_2;
      __pyx_t_2 = 0;

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

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":358
 *         else:
 *             # normal index deletion
 *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<<
 *             parent.remove(sibling)
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___getitem__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_v_sibling);
    __pyx_v_sibling = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":359
 *             # normal index deletion
 *             sibling = self.__getitem__(key)
 *             parent.remove(sibling)             # <<<<<<<<<<<<<<
 * 
 *     def iterfind(self, path):
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_parent, __pyx_kp_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_INCREF(__pyx_v_sibling);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_sibling);
    __Pyx_GIVEREF(__pyx_v_sibling);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __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_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_parent);
  __Pyx_DECREF(__pyx_v_del_items);
  __Pyx_DECREF(__pyx_v_remove);
  __Pyx_DECREF(__pyx_v_el);
  __Pyx_DECREF(__pyx_v_sibling);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":361
 *             parent.remove(sibling)
 * 
 *     def iterfind(self, path):             # <<<<<<<<<<<<<<
 *         u"iterfind(self, path)"
 *         # Reimplementation of Element.iterfind() to make it work without child
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_iterfind[] = "iterfind(self, path)";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_xpath;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("iterfind");
  __pyx_v_xpath = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":365
 *         # Reimplementation of Element.iterfind() to make it work without child
 *         # iteration.
 *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<<
 *         return iter(xpath(self))
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_ETXPath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __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 = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __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 = 365; __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_v_xpath);
  __pyx_v_xpath = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":366
 *         # iteration.
 *         xpath = etree.ETXPath(path)
 *         return iter(xpath(self))             # <<<<<<<<<<<<<<
 * 
 *     def findall(self, path):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_2 = PyObject_Call(__pyx_v_xpath, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.iterfind");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_xpath);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":368
 *         return iter(xpath(self))
 * 
 *     def findall(self, path):             # <<<<<<<<<<<<<<
 *         u"findall(self, path)"
 *         # Reimplementation of Element.findall() to make it work without child
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_findall[] = "findall(self, path)";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_xpath;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("findall");
  __pyx_v_xpath = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":372
 *         # Reimplementation of Element.findall() to make it work without child
 *         # iteration.
 *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<<
 *         return xpath(self)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_ETXPath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __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 = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __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 = 372; __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_v_xpath);
  __pyx_v_xpath = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":373
 *         # iteration.
 *         xpath = etree.ETXPath(path)
 *         return xpath(self)             # <<<<<<<<<<<<<<
 * 
 *     def find(self, path):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_2 = PyObject_Call(__pyx_v_xpath, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findall");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_xpath);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":375
 *         return xpath(self)
 * 
 *     def find(self, path):             # <<<<<<<<<<<<<<
 *         u"find(self, path)"
 *         # Reimplementation of Element.find() to make it work without child
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_find[] = "find(self, path)";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_result;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  __Pyx_SetupRefcountContext("find");
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":379
 *         # Reimplementation of Element.find() to make it work without child
 *         # iteration.
 *         result = self.findall(path)             # <<<<<<<<<<<<<<
 *         if isinstance(result, list) and len(result):
 *             return result[0]
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_findall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __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 = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __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 = 379; __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_v_result);
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":380
 *         # iteration.
 *         result = self.findall(path)
 *         if isinstance(result, list) and len(result):             # <<<<<<<<<<<<<<
 *             return result[0]
 *         elif isinstance(result, _Element):
 */
  __pyx_t_4 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)&PyList_Type))); 
  if (__pyx_t_4) {
    __pyx_t_5 = PyObject_Length(__pyx_v_result); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  if (__pyx_t_6) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":381
 *         result = self.findall(path)
 *         if isinstance(result, list) and len(result):
 *             return result[0]             # <<<<<<<<<<<<<<
 *         elif isinstance(result, _Element):
 *             return result
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __pyx_r = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":382
 *         if isinstance(result, list) and len(result):
 *             return result[0]
 *         elif isinstance(result, _Element):             # <<<<<<<<<<<<<<
 *             return result
 *         else:
 */
  __pyx_t_6 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
  if (__pyx_t_6) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":383
 *             return result[0]
 *         elif isinstance(result, _Element):
 *             return result             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":385
 *             return result
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def findtext(self, path, default=None):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
  }
  __pyx_L5:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.find");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":387
 *             return None
 * 
 *     def findtext(self, path, default=None):             # <<<<<<<<<<<<<<
 *         u"findtext(self, path, default=None)"
 *         # Reimplementation of Element.findtext() to make it work without child
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_findtext[] = "findtext(self, path, default=None)";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_path,&__pyx_kp_default,0};
  __Pyx_SetupRefcountContext("findtext");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[1] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_path);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_default);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "findtext") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_path = values[0];
    __pyx_v_default = values[1];
  } else {
    __pyx_v_default = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_default = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":391
 *         # Reimplementation of Element.findtext() to make it work without child
 *         # iteration.
 *         result = self.find(path)             # <<<<<<<<<<<<<<
 *         if isinstance(result, _Element):
 *             return result.text or u""
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __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 = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __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 = 391; __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_v_result);
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":392
 *         # iteration.
 *         result = self.find(path)
 *         if isinstance(result, _Element):             # <<<<<<<<<<<<<<
 *             return result.text or u""
 *         else:
 */
  __pyx_t_4 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":393
 *         result = self.find(path)
 *         if isinstance(result, _Element):
 *             return result.text or u""             # <<<<<<<<<<<<<<
 *         else:
 *             return default
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_result, __pyx_kp_text); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_4) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_INCREF(((PyObject *)__pyx_kp_746));
      __pyx_t_2 = __pyx_kp_746;
    } else {
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":395
 *             return result.text or u""
 *         else:
 *             return default             # <<<<<<<<<<<<<<
 * 
 *     def descendantpaths(self, prefix=None):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_default);
    __pyx_r = __pyx_v_default;
    goto __pyx_L0;
  }
  __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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":397
 *             return default
 * 
 *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
 *         u"""descendantpaths(self, prefix=None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths[] = "descendantpaths(self, prefix=None)\n\n        Returns a list of object path expressions for all descendants.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_prefix,0};
  __Pyx_SetupRefcountContext("descendantpaths");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_prefix);
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "descendantpaths") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_prefix = values[0];
  } else {
    __pyx_v_prefix = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_prefix = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_prefix);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":402
 *         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));
  } else {
    __pyx_t_2 = __pyx_t_1;
  }
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":403
 *         """
 *         if prefix is not None and not python._isString(prefix):
 *             prefix = u'.'.join(prefix)             # <<<<<<<<<<<<<<
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 */
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_747), __pyx_kp_join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __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 = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__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_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __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_v_prefix);
    __pyx_v_prefix = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":404
 *         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, char* c_href, char* c_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__buildDescendantPaths(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node, __pyx_v_prefix)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":406
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):             # <<<<<<<<<<<<<<
 *     cdef char* c_node_href
 *     if c_node.name != c_name:
 */

static INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *__pyx_v_c_node, char *__pyx_v_c_href, char *__pyx_v_c_name) {
  char *__pyx_v_c_node_href;
  int __pyx_r;
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("_tagMatches");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":408
 * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):
 *     cdef char* c_node_href
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":409
 *     cdef char* c_node_href
 *     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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":410
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":411
 *         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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":412
 *     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);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":413
 *         return 1
 *     c_node_href = tree._getNs(c_node)
 *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
 *         return c_href[0] == c'\0'
 *     return cstd.strcmp(c_node_href, c_href) == 0
 */
  __pyx_t_1 = (__pyx_v_c_node_href == NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":414
 *     c_node_href = tree._getNs(c_node)
 *     if c_node_href == NULL:
 *         return c_href[0] == c'\0'             # <<<<<<<<<<<<<<
 *     return cstd.strcmp(c_node_href, c_href) == 0
 * 
 */
    __pyx_r = ((__pyx_v_c_href[0]) == '\x00');
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":415
 *     if c_node_href == NULL:
 *         return c_href[0] == c'\0'
 *     return cstd.strcmp(c_node_href, c_href) == 0             # <<<<<<<<<<<<<<
 * 
 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):
 */
  __pyx_r = (strcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0);
  goto __pyx_L0;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":417
 *     return cstd.strcmp(c_node_href, c_href) == 0
 * 
 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
 *     cdef tree.xmlNode* c_node
 *     cdef char* c_href
 */

static  Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
  xmlNode *__pyx_v_c_node;
  char *__pyx_v_c_href;
  char *__pyx_v_c_tag;
  Py_ssize_t __pyx_v_count;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("_countSiblings");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":422
 *     cdef char* c_tag
 *     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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":423
 *     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);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":424
 *     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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":425
 *     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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":426
 *     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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":427
 *     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 = count + 1
 */
    if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":428
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
 *             count = count + 1
 *         c_node = c_node.next
 */
      __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
    } else {
      __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    }
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":429
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):
 *             count = 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:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":430
 *                _tagMatches(c_node, c_href, c_tag):
 *             count = 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;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":431
 *             count = 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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":432
 *         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_1 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_1) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":433
 *     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 = count + 1
 */
    if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":434
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
 *             count = 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);
    } else {
      __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    }
    if (__pyx_t_1) {

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

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

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":437
 *             count = 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_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":439
 *     return count
 * 
 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
 *                                          char* href, char* name,
 *                                          Py_ssize_t index):
 */

static  xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *__pyx_v_c_node, char *__pyx_v_href, char *__pyx_v_name, Py_ssize_t __pyx_v_index) {
  xmlNode *(*__pyx_v_next)(xmlNode *);
  xmlNode *__pyx_r;
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("_findFollowingSibling");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":443
 *                                          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) {

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

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

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":447
 *     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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":448
 *         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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":449
 *         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
 */
    if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":450
 *     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_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_href, __pyx_v_name);
    } else {
      __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    }
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":451
 *         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);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":452
 *                _tagMatches(c_node, href, name):
 *             index = index - 1
 *             if index < 0:             # <<<<<<<<<<<<<<
 *                 return c_node
 *         c_node = next(c_node)
 */
      __pyx_t_1 = (__pyx_v_index < 0);
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":453
 *             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:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":454
 *             if index < 0:
 *                 return c_node
 *         c_node = next(c_node)             # <<<<<<<<<<<<<<
 *     return NULL
 * 
 */
    __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":455
 *                 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_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":457
 *     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;
  char *__pyx_v_c_href;
  char *__pyx_v_c_tag;
  PyObject *__pyx_v_ns;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_SetupRefcountContext("_lookupChild");
  __Pyx_INCREF(__pyx_v_tag);
  __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":462
 *     cdef char* c_href
 *     cdef char* c_tag
 *     c_node = parent._c_node             # <<<<<<<<<<<<<<
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = tree.xmlDictExists(
 */
  __pyx_v_c_node = __pyx_v_parent->_c_node;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":463
 *     cdef char* c_tag
 *     c_node = parent._c_node
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
 *     c_tag = tree.xmlDictExists(
 *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
 */
  __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
    __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_ns);
    __pyx_v_ns = __pyx_2;
    __pyx_2 = 0;
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_3;
    __pyx_3 = 0;
  } else {
    __pyx_1 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_2);
    __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_3);
    if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    __Pyx_DECREF(__pyx_v_ns);
    __pyx_v_ns = __pyx_2;
    __pyx_2 = 0;
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_3;
    __pyx_3 = 0;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":465
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = tree.xmlDictExists(
 *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))             # <<<<<<<<<<<<<<
 *     if c_tag is NULL:
 *         return None
 */
  __pyx_v_c_tag = xmlDictExists(__pyx_v_c_node->doc->dict, PyString_AS_STRING(__pyx_v_tag), PyString_GET_SIZE(__pyx_v_tag));

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":466
 *     c_tag = tree.xmlDictExists(
 *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
 *     if c_tag is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     if ns is None:
 */
  __pyx_t_2 = (__pyx_v_c_tag == NULL);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":467
 *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
 *     if c_tag is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     if ns is None:
 *         c_href = tree._getNs(c_node)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":468
 *     if c_tag is NULL:
 *         return None
 *     if ns is None:             # <<<<<<<<<<<<<<
 *         c_href = tree._getNs(c_node)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_ns == Py_None);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":469
 *         return None
 *     if ns is None:
 *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
 *     else:
 *         c_href = _cstr(ns)
 */
    __pyx_v_c_href = _getNs(__pyx_v_c_node);
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":471
 *         c_href = tree._getNs(c_node)
 *     else:
 *         c_href = _cstr(ns)             # <<<<<<<<<<<<<<
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:
 */
    __pyx_v_c_href = PyString_AS_STRING(__pyx_v_ns);
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":472
 *     else:
 *         c_href = _cstr(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);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":473
 *         c_href = _cstr(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_2 = (__pyx_v_c_result == NULL);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":474
 *     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_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":475
 *     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 *)elementFactory(__pyx_v_parent->_doc, __pyx_v_c_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify._lookupChild");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_ns);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":477
 *     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;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("_lookupChildOrRaise");
  __pyx_v_element = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":478
 * 
 * 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 = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_element);
  __pyx_v_element = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":479
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":481
 *     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 = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_kp_748), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __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);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":482
 *         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_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":484
 *     return element
 * 
 * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
 *     cdef char* c_href
 *     cdef char* c_tag
 */

static  PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
  char *__pyx_v_c_href;
  char *__pyx_v_c_tag;
  PyObject *__pyx_v_ns;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_SetupRefcountContext("_buildChildTag");
  __Pyx_INCREF(__pyx_v_tag);
  __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":487
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
 *     c_tag = _cstr(tag)
 *     if ns is None:
 */
  __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
    __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_ns);
    __pyx_v_ns = __pyx_2;
    __pyx_2 = 0;
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_3;
    __pyx_3 = 0;
  } else {
    __pyx_1 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_2);
    __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_3);
    if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    __Pyx_DECREF(__pyx_v_ns);
    __pyx_v_ns = __pyx_2;
    __pyx_2 = 0;
    __Pyx_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_3;
    __pyx_3 = 0;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":488
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _cstr(tag)             # <<<<<<<<<<<<<<
 *     if ns is None:
 *         c_href = tree._getNs(parent._c_node)
 */
  __pyx_v_c_tag = PyString_AS_STRING(__pyx_v_tag);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":489
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _cstr(tag)
 *     if ns is None:             # <<<<<<<<<<<<<<
 *         c_href = tree._getNs(parent._c_node)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_ns == Py_None);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":490
 *     c_tag = _cstr(tag)
 *     if ns is None:
 *         c_href = tree._getNs(parent._c_node)             # <<<<<<<<<<<<<<
 *     else:
 *         c_href = _cstr(ns)
 */
    __pyx_v_c_href = _getNs(__pyx_v_parent->_c_node);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":492
 *         c_href = tree._getNs(parent._c_node)
 *     else:
 *         c_href = _cstr(ns)             # <<<<<<<<<<<<<<
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)
 * 
 */
    __pyx_v_c_href = PyString_AS_STRING(__pyx_v_ns);
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":493
 *     else:
 *         c_href = _cstr(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 = 493; __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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify._buildChildTag");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_ns);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":495
 *     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;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("_replaceElement");
  __pyx_v_new_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":497
 * 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_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":500
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 */
    __pyx_t_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_element->_doc, ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":501
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag             # <<<<<<<<<<<<<<
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         element[:] = value
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_kp_tag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_kp_tag, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":502
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<<
 *         element[:] = value
 *         return
 */
  if (!PyList_Check(__pyx_v_value)) {
    __pyx_t_1 = PyTuple_Check(__pyx_v_value);
  } else {
    __pyx_t_1 = PyList_Check(__pyx_v_value);
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":503
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         element[:] = value             # <<<<<<<<<<<<<<
 *         return
 *     else:
 */
    if (PySequence_SetSlice(((PyObject *)__pyx_v_element), 0, PY_SSIZE_T_MAX, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":504
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         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*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":506
 *         return
 *     else:
 *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<<
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_kp_makeelement); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_kp_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __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 = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
    __pyx_t_3 = 0;

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

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":508
 *         new_element = element.makeelement(element.tag)
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<<
 * 
 * cdef _appendValue(_Element parent, tag, value):
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_kp_getparent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_kp_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __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 = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_INCREF(((PyObject *)__pyx_v_element));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_element));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_element));
  __Pyx_INCREF(((PyObject *)__pyx_v_new_element));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_new_element));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_new_element));
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify._replaceElement");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_new_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":510
 *     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;
  PyObject *__pyx_v_item;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("_appendValue");
  __pyx_v_new_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":512
 * 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_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":515
 *         # 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_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_parent->_doc, ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":516
 *         new_element = cetree.deepcopyNodeToDocument(
 *             parent._doc, (<_Element>value)._c_node)
 *         new_element.tag = tag             # <<<<<<<<<<<<<<
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 */
    if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_kp_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":517
 *             parent._doc, (<_Element>value)._c_node)
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)             # <<<<<<<<<<<<<<
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:
 */
    appendChild(__pyx_v_parent, __pyx_v_new_element);
    goto __pyx_L3;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":518
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<<
 *         for item in value:
 *             _appendValue(parent, tag, item)
 */
  if (!PyList_Check(__pyx_v_value)) {
    __pyx_t_1 = PyTuple_Check(__pyx_v_value);
  } else {
    __pyx_t_1 = PyList_Check(__pyx_v_value);
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":519
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:             # <<<<<<<<<<<<<<
 *             _appendValue(parent, tag, item)
 *     else:
 */
    if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) {
      __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2);
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
    }
    for (;;) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
      } else {
        __pyx_t_4 = PyIter_Next(__pyx_t_2);
        if (!__pyx_t_4) {
          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":520
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:
 *             _appendValue(parent, tag, item)             # <<<<<<<<<<<<<<
 *     else:
 *         new_element = cetree.makeSubElement(
 */
      __pyx_t_4 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent, __pyx_v_tag, __pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":523
 *     else:
 *         new_element = cetree.makeSubElement(
 *             parent, tag, None, None, None, None)             # <<<<<<<<<<<<<<
 *         _setElementValue(new_element, value)
 * 
 */
    __pyx_t_2 = ((PyObject *)makeSubElement(__pyx_v_parent, __pyx_v_tag, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
    __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":524
 *         new_element = cetree.makeSubElement(
 *             parent, tag, None, None, None, None)
 *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
 * 
 * cdef _setElementValue(_Element element, value):
 */
    __pyx_t_2 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __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_4);
  __Pyx_AddTraceback("lxml.objectify._appendValue");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_new_element);
  __Pyx_DECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":526
 *         _setElementValue(new_element, value)
 * 
 * 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;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("_setElementValue");
  __Pyx_INCREF(__pyx_v_value);
  __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":528
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":530
 *     if value is None:
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
 *     elif isinstance(value, _Element):
 *         _replaceElement(element, value)
 */
    __pyx_t_2 = setAttributeValue(__pyx_v_element, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_kp_749)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":531
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
 *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
 *         _replaceElement(element, value)
 *         return
 */
  __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":532
 *             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 = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":533
 *     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*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":536
 *     else:
 *         cetree.delAttributeFromNsName(
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")             # <<<<<<<<<<<<<<
 *         if python._isString(value):
 *             pytype_name = u"str"
 */
    delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_750);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":537
 *         cetree.delAttributeFromNsName(
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":538
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
 *         if python._isString(value):
 *             pytype_name = u"str"             # <<<<<<<<<<<<<<
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         else:
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_751));
      __Pyx_DECREF(__pyx_v_pytype_name);
      __pyx_v_pytype_name = ((PyObject *)__pyx_kp_751);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":539
 *         if python._isString(value):
 *             pytype_name = u"str"
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
 *         else:
 *             pytype_name = _typename(value)
 */
      __pyx_v__pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
      goto __pyx_L4;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":541
 *             _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 = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_v_pytype_name);
      __pyx_v_pytype_name = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":542
 *         else:
 *             pytype_name = _typename(value)
 *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
 *             if _pytype is not NULL:
 *                 value = (<PyType>_pytype).stringify(value)
 */
      __pyx_v__pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":543
 *             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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":544
 *             _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 = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__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_4 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v__pytype)->stringify, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __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_v_value);
        __pyx_v_value = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L5;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":546
 *                 value = (<PyType>_pytype).stringify(value)
 *             else:
 *                 value = unicode(value)             # <<<<<<<<<<<<<<
 *         if _pytype is not NULL:
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__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_3 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __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_v_value);
        __pyx_v_value = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L5:;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":547
 *             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) {

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

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":551
 *         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:;

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify._setElementValue");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_pytype_name);
  __Pyx_DECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":554
 *     cetree.setNodeText(element._c_node, value)
 * 
 * cdef _setSlice(slice, _Element target, items):             # <<<<<<<<<<<<<<
 *     cdef _Element parent
 *     cdef tree.xmlNode* c_node
 */

static  PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_slice, struct LxmlElement *__pyx_v_target, PyObject *__pyx_v_items) {
  struct LxmlElement *__pyx_v_parent;
  xmlNode *__pyx_v_c_node;
  Py_ssize_t __pyx_v_c_step;
  Py_ssize_t __pyx_v_pos;
  PyObject *__pyx_v_new_items;
  PyObject *__pyx_v_del_items;
  PyObject *__pyx_v_tag;
  PyObject *__pyx_v_item;
  PyObject *__pyx_v_new_element;
  PyObject *__pyx_v_replace;
  PyObject *__pyx_v_remove;
  PyObject *__pyx_v_add;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_SetupRefcountContext("_setSlice");
  __pyx_v_parent = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_new_items = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_del_items = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_new_element = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_replace = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_remove = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_add = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":560
 *     cdef list new_items
 *     # collect existing slice
 *     if (<python.slice>slice).step is None:             # <<<<<<<<<<<<<<
 *         c_step = 1
 *     else:
 */
  __pyx_t_1 = (((PySliceObject *)__pyx_v_slice)->step == Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":561
 *     # collect existing slice
 *     if (<python.slice>slice).step is None:
 *         c_step = 1             # <<<<<<<<<<<<<<
 *     else:
 *         c_step = (<python.slice>slice).step
 */
    __pyx_v_c_step = 1;
    goto __pyx_L3;
  }
  /*else*/ {

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

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":564
 *     else:
 *         c_step = (<python.slice>slice).step
 *     if c_step == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError, u"Invalid slice"
 *     del_items = target[slice]
 */
  __pyx_t_1 = (__pyx_v_c_step == 0);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":565
 *         c_step = (<python.slice>slice).step
 *     if c_step == 0:
 *         raise ValueError, u"Invalid slice"             # <<<<<<<<<<<<<<
 *     del_items = target[slice]
 * 
 */
    __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_752), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":566
 *     if c_step == 0:
 *         raise ValueError, u"Invalid slice"
 *     del_items = target[slice]             # <<<<<<<<<<<<<<
 * 
 *     # collect new values
 */
  __pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_target), __pyx_v_slice); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(__pyx_v_del_items);
  __pyx_v_del_items = __pyx_1;
  __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":569
 * 
 *     # 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 = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_DECREF(((PyObject *)__pyx_v_new_items));
  __pyx_v_new_items = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":570
 *     # 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_kp_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":571
 *     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_2 = 0; __pyx_t_3 = __pyx_v_items; __Pyx_INCREF(__pyx_t_3);
  } 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 = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_3))) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
    } else {
      __pyx_t_4 = PyIter_Next(__pyx_t_3);
      if (!__pyx_t_4) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":572
 *     tag = target.tag
 *     for item in items:
 *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
 *             # deep copy the new element
 *             new_element = cetree.deepcopyNodeToDocument(
 */
    __pyx_t_1 = PyObject_TypeCheck(__pyx_v_item, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":575
 *             # deep copy the new element
 *             new_element = cetree.deepcopyNodeToDocument(
 *                 target._doc, (<_Element>item)._c_node)             # <<<<<<<<<<<<<<
 *             new_element.tag = tag
 *         else:
 */
      __pyx_t_4 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_target->_doc, ((struct LxmlElement *)__pyx_v_item)->_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_v_new_element);
      __pyx_v_new_element = __pyx_t_4;
      __pyx_t_4 = 0;

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

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":579
 *         else:
 *             new_element = cetree.makeElement(
 *                 tag, target._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
 *             _setElementValue(new_element, item)
 *         new_items.append(new_element)
 */
      __pyx_t_4 = ((PyObject *)makeElement(__pyx_v_tag, __pyx_v_target->_doc, Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_v_new_element);
      __pyx_v_new_element = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":580
 *             new_element = cetree.makeElement(
 *                 tag, target._doc, None, None, None, None, None)
 *             _setElementValue(new_element, item)             # <<<<<<<<<<<<<<
 *         new_items.append(new_element)
 * 
 */
      if (!(__Pyx_TypeTest(__pyx_v_new_element, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __pyx_f_4lxml_9objectify__setElementValue(((struct LxmlElement *)__pyx_v_new_element), __pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L7:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":581
 *                 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_5 = PyList_Append(((PyObject *)__pyx_v_new_items), __pyx_v_new_element); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":584
 * 
 *     # 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, \
 */
  if ((__pyx_v_c_step != 1)) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":585
 *     # 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_1 = (PyList_GET_SIZE(__pyx_v_del_items) != PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
  } else {
    __pyx_t_1 = (__pyx_v_c_step != 1);
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":588
 *         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 = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":589
 *             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_4 = PyInt_FromSsize_t(PyList_GET_SIZE(__pyx_v_del_items)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_753), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":592
 * 
 *     # replace existing items
 *     pos = 0             # <<<<<<<<<<<<<<
 *     parent = target.getparent()
 *     replace = parent.replace
 */
  __pyx_v_pos = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":593
 *     # replace existing items
 *     pos = 0
 *     parent = target.getparent()             # <<<<<<<<<<<<<<
 *     replace = parent.replace
 *     while pos < python.PyList_GET_SIZE(new_items) and \
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_kp_getparent); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_parent));
  __pyx_v_parent = ((struct LxmlElement *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":594
 *     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_6 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_kp_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_v_replace);
  __pyx_v_replace = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":595
 *     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) {
    if ((__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)))) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":596
 *     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));
    } else {
      __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
    }
    if (!__pyx_t_1) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":597
 *     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_1 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __pyx_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_2);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_1);
    __Pyx_GIVEREF(__pyx_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_2);
    __Pyx_GIVEREF(__pyx_2);
    __pyx_1 = 0;
    __pyx_2 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_v_replace, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":598
 *             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 += 1;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":600
 *         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_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":601
 *     # 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_4 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_kp_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v_remove);
    __pyx_v_remove = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":602
 *     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_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
      if (!__pyx_t_1) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":603
 *         remove = parent.remove
 *         while pos < python.PyList_GET_SIZE(del_items):
 *             remove(del_items[pos])             # <<<<<<<<<<<<<<
 *             pos += 1
 *     # append remaining new items
 */
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_1);
      __Pyx_GIVEREF(__pyx_1);
      __pyx_1 = 0;
      __pyx_t_6 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __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_t_6); __pyx_t_6 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":604
 *         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 += 1;
    }
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":606
 *             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_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":608
 *     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_1 = (__pyx_v_pos > 0);
    if (__pyx_t_1) {

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

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":611
 *             item = new_items[pos-1]
 *         else:
 *             if (<python.slice>slice).start > 0:             # <<<<<<<<<<<<<<
 *                 c_node = parent._c_node.children
 *             else:
 */
      __pyx_t_6 = PyObject_RichCompare(((PySliceObject *)__pyx_v_slice)->start, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":612
 *         else:
 *             if (<python.slice>slice).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*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":614
 *                 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:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":617
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(target._c_node), target._c_node.name,
 *                 (<python.slice>slice).start - 1)             # <<<<<<<<<<<<<<
 *             if c_node is NULL:
 *                 while pos < python.PyList_GET_SIZE(new_items):
 */
      __pyx_t_6 = PyNumber_Subtract(((PySliceObject *)__pyx_v_slice)->start, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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);

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

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":619
 *                 (<python.slice>slice).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_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
          if (!__pyx_t_1) break;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":620
 *             if c_node is NULL:
 *                 while pos < python.PyList_GET_SIZE(new_items):
 *                     cetree.appendChild(parent, new_items[pos])             # <<<<<<<<<<<<<<
 *                     pos += 1
 *                 return
 */
          __pyx_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_1);
          if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          appendChild(__pyx_v_parent, ((struct LxmlElement *)__pyx_1));
          __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":621
 *                 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 += 1;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":622
 *                     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:;

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

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":624
 *                 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_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
      if (!__pyx_t_1) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":625
 *             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_6 = PyObject_GetAttr(__pyx_v_item, __pyx_kp_addnext); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_v_add);
      __pyx_v_add = __pyx_t_6;
      __pyx_t_6 = 0;

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

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

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":628
 *             item = new_items[pos]
 *             add(item)
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
      __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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify._setSlice");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_parent);
  __Pyx_DECREF(__pyx_v_new_items);
  __Pyx_DECREF(__pyx_v_del_items);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_DECREF(__pyx_v_item);
  __Pyx_DECREF(__pyx_v_new_element);
  __Pyx_DECREF(__pyx_v_replace);
  __Pyx_DECREF(__pyx_v_remove);
  __Pyx_DECREF(__pyx_v_add);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":638
 *     """
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return textOf(self._c_node)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":639
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":641
 *             return textOf(self._c_node)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return textOf(self._c_node) or u''
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__str__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":642
 * 
 *     def __str__(self):
 *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __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 = 642; __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_754));
    __pyx_t_3 = __pyx_kp_754;
  } 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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":644
 *         return textOf(self._c_node) or u''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return textOf(self._c_node) or u''
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__repr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":645
 * 
 *     def __repr__(self):
 *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     def _setText(self, s):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __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 = 645; __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_755));
    __pyx_t_3 = __pyx_kp_755;
  } 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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":647
 *         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__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
static char __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__setText[] = "For use in subclasses only. Don't use unless you know what you are\n        doing.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("_setText");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":651
 *         doing.
 *         """
 *         cetree.setNodeText(self._c_node, s)             # <<<<<<<<<<<<<<
 * 
 * cdef class NumberElement(ObjectifiedDataElement):
 */
  __pyx_t_1 = setNodeText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__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 = 651; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":655
 * 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(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_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("_setValueParser");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":660
 *         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(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value);
  ((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value = __pyx_v_function;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":663
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _parseNumber(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":664
 *     property pyval:
 *         def __get__(self):
 *             return _parseNumber(self)             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":666
 *             return _parseNumber(self)
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__int__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":667
 * 
 *     def __int__(self):
 *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __long__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __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 = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 667; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":669
 *         return int(_parseNumber(self))
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return long(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__long__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":670
 * 
 *     def __long__(self):
 *         return long(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __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 = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 670; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":672
 *         return long(_parseNumber(self))
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return float(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__float__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":673
 * 
 *     def __float__(self):
 *         return float(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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 = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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*)&PyFloat_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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.__float__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":675
 *         return float(_parseNumber(self))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___complex__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___complex__(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__complex__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":676
 * 
 *     def __complex__(self):
 *         return complex(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __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 = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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*)&PyComplex_Type), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":678
 *         return complex(_parseNumber(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return unicode(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__str__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":679
 * 
 *     def __str__(self):
 *         return unicode(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __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 = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 679; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":681
 *         return unicode(_parseNumber(self))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__repr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":682
 * 
 *     def __repr__(self):
 *         return repr(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __oct__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __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 = 682; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":684
 *         return repr(_parseNumber(self))
 * 
 *     def __oct__(self):             # <<<<<<<<<<<<<<
 *         return oct(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___oct__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___oct__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__oct__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":685
 * 
 *     def __oct__(self):
 *         return oct(_parseNumber(self))             # <<<<<<<<<<<<<<
 * 
 *     def __hex__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __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 = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 685; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":687
 *         return oct(_parseNumber(self))
 * 
 *     def __hex__(self):             # <<<<<<<<<<<<<<
 *         return hex(_parseNumber(self))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___hex__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___hex__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__hex__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":688
 * 
 *     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(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __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 = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 688; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":690
 *         return hex(_parseNumber(self))
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         return _richcmpPyvals(self, other, op)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__richcmp__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":691
 * 
 *     def __richcmp__(self, other, int op):
 *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __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 = 691; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":693
 *         return _richcmpPyvals(self, other, op)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) + _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__add__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":694
 * 
 *     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 = 694; __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 = 694; __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 = 694; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":696
 *         return _numericValueOf(self) + _numericValueOf(other)
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) - _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__sub__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":697
 * 
 *     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 = 697; __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 = 697; __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 = 697; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":699
 *         return _numericValueOf(self) - _numericValueOf(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) * _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__mul__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":700
 * 
 *     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 = 700; __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 = 700; __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 = 700; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":702
 *         return _numericValueOf(self) * _numericValueOf(other)
 * 
 *     def __div__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__div__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":703
 * 
 *     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 = 703; __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 = 703; __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 = 703; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":705
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__truediv__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":706
 * 
 *     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 = 706; __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 = 706; __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 = 706; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":708
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 *     def __mod__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) % _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__mod__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":709
 * 
 *     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 = 709; __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 = 709; __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 = 709; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":711
 *         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___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("__pow__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":712
 * 
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":713
 *     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 = 713; __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 = 713; __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 = 713; __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_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":715
 *             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 = 715; __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 = 715; __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 = 715; __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_L5:;

  __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":717
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<<
 *         return - _numericValueOf(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__neg__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":718
 * 
 *     def __neg__(self):
 *         return - _numericValueOf(self)             # <<<<<<<<<<<<<<
 * 
 *     def __pos__(self):
 */
  __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 = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_1 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__neg__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":720
 *         return - _numericValueOf(self)
 * 
 *     def __pos__(self):             # <<<<<<<<<<<<<<
 *         return + _numericValueOf(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__pos__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":721
 * 
 *     def __pos__(self):
 *         return + _numericValueOf(self)             # <<<<<<<<<<<<<<
 * 
 *     def __abs__(self):
 */
  __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 = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_1 = PyNumber_Positive(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__pos__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":723
 *         return + _numericValueOf(self)
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<<
 *         return abs( _numericValueOf(self) )
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__abs__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":724
 * 
 *     def __abs__(self):
 *         return abs( _numericValueOf(self) )             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __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 = 724; __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 = 724; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":726
 *         return abs( _numericValueOf(self) )
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) != 0
 * 
 */

static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_SetupRefcountContext("__nonzero__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":727
 * 
 *     def __nonzero__(self):
 *         return _numericValueOf(self) != 0             # <<<<<<<<<<<<<<
 * 
 *     def __invert__(self):
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); 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_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __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 = 727; __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_r = -1;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":729
 *         return _numericValueOf(self) != 0
 * 
 *     def __invert__(self):             # <<<<<<<<<<<<<<
 *         return ~ _numericValueOf(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__invert__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":730
 * 
 *     def __invert__(self):
 *         return ~ _numericValueOf(self)             # <<<<<<<<<<<<<<
 * 
 *     def __lshift__(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 = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_1 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify.NumberElement.__invert__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":732
 *         return ~ _numericValueOf(self)
 * 
 *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) << _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__lshift__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":733
 * 
 *     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 = 733; __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 = 733; __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 = 733; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":735
 *         return _numericValueOf(self) << _numericValueOf(other)
 * 
 *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) >> _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__rshift__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":736
 * 
 *     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 = 736; __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 = 736; __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 = 736; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":738
 *         return _numericValueOf(self) >> _numericValueOf(other)
 * 
 *     def __and__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) & _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__and__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":739
 * 
 *     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 = 739; __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 = 739; __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 = 739; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":741
 *         return _numericValueOf(self) & _numericValueOf(other)
 * 
 *     def __or__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) | _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__or__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":742
 * 
 *     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 = 742; __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 = 742; __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 = 742; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":744
 *         return _numericValueOf(self) | _numericValueOf(other)
 * 
 *     def __xor__(self, other):             # <<<<<<<<<<<<<<
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__xor__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":745
 * 
 *     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 = 745; __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 = 745; __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 = 745; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":748
 * 
 * cdef class IntElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = int
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("_init");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":749
 * 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(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value);
  ((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyInt_Type));

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":752
 * 
 * cdef class LongElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = long
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("_init");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":753
 * 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(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value);
  ((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyLong_Type));

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":756
 * 
 * cdef class FloatElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = float
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("_init");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":757
 * 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(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value);
  ((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyFloat_Type));

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":767
 *     """
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return textOf(self._c_node) or u''
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":768
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __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 = 768; __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 = 768; __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_756));
    __pyx_t_3 = __pyx_kp_756;
  } 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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":770
 *             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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__repr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":771
 * 
 *     def __repr__(self):
 *         return repr(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
 * 
 *     def strlen(self):
 */
  __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 = 771; __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 = 771; __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_757));
    __pyx_t_3 = __pyx_kp_757;
  } 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 = 771; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":773
 *         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_strlen(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_v_text;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  __Pyx_SetupRefcountContext("strlen");
  __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":774
 * 
 *     def strlen(self):
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
 *         if text is None:
 *             return 0
 */
  __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 = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_text);
  __pyx_v_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":775
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":776
 *         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_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":778
 *             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 = 778; __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 = 778; __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_L5:;

  __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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_text);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":780
 *             return len(text)
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         text = textOf(self._c_node)
 *         if text is None:
 */

static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self) {
  PyObject *__pyx_v_text;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  __Pyx_SetupRefcountContext("__nonzero__");
  __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":781
 * 
 *     def __nonzero__(self):
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
 *         if text is None:
 *             return False
 */
  __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 = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_text);
  __pyx_v_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":782
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":783
 *         text = textOf(self._c_node)
 *         if text is None:
 *             return False             # <<<<<<<<<<<<<<
 *         return len(text) > 0
 * 
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":784
 *         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 = 784; __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_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_text);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":786
 *         return len(text) > 0
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         return _richcmpPyvals(self, other, op)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__richcmp__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":787
 * 
 *     def __richcmp__(self, other, int op):
 *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __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 = 787; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":789
 *         return _richcmpPyvals(self, other, op)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_text;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_SetupRefcountContext("__add__");
  __Pyx_INCREF(__pyx_v_other);
  __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":790
 * 
 *     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 = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_text);
  __pyx_v_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":791
 *     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 = 791; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":792
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":793
 *         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_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":794
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":795
 *             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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":796
 *         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 = 796; __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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_text);
  __Pyx_DECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":798
 *         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___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("__mul__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":799
 * 
 *     def __mul__(self, other):
 *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):
 */
  __pyx_t_1 = PyObject_TypeCheck(__pyx_v_self, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":800
 *     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_2 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __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 = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __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_L5;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":801
 *         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_1 = PyObject_TypeCheck(__pyx_v_other, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":802
 *             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 = 802; __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 = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __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;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":804
 *             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_758), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L5:;

  __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.StringElement.__mul__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":806
 *             raise TypeError, u"invalid types for * operator"
 * 
 *     def __mod__(self, other):             # <<<<<<<<<<<<<<
 *         return _strValueOf(self) % other
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__mod__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":807
 * 
 *     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 = 807; __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 = 807; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":809
 *         return _strValueOf(self) % other
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__int__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":810
 * 
 *     def __int__(self):
 *         return int(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __long__(self):
 */
  __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 = 810; __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 = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 810; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":812
 *         return int(textOf(self._c_node))
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return long(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___long__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___long__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__long__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":813
 * 
 *     def __long__(self):
 *         return long(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
 */
  __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 = 813; __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 = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 813; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":815
 *         return long(textOf(self._c_node))
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return float(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___float__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___float__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__float__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":816
 * 
 *     def __float__(self):
 *         return float(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(self):
 */
  __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 = 816; __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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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*)&PyFloat_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __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.__float__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":818
 *         return float(textOf(self._c_node))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___complex__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___complex__(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__complex__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":819
 * 
 *     def __complex__(self):
 *         return complex(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 */
  __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 = 819; __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 = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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*)&PyComplex_Type), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":822
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return u"None"
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("__str__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":823
 * cdef class NoneElement(ObjectifiedDataElement):
 *     def __str__(self):
 *         return u"None"             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_kp_759));
  __pyx_r = ((PyObject *)__pyx_kp_759);
  goto __pyx_L0;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":825
 *         return u"None"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return u"None"
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("__repr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":826
 * 
 *     def __repr__(self):
 *         return u"None"             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_kp_760));
  __pyx_r = ((PyObject *)__pyx_kp_760);
  goto __pyx_L0;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":828
 *         return u"None"
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_SetupRefcountContext("__nonzero__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":829
 * 
 *     def __nonzero__(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __pyx_r = 0;
  goto __pyx_L0;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":831
 *         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___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("__richcmp__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":832
 * 
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":833
 *     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 = PyObject_RichCompare(Py_None, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":834
 *         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_3 = PyObject_TypeCheck(__pyx_v_self, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement))); 
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":835
 *             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_4 = PyObject_RichCompare(Py_None, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":837
 *             return python.PyObject_RichCompare(None, other, op)
 *         else:
 *             return python.PyObject_RichCompare(self, None, op)             # <<<<<<<<<<<<<<
 * 
 *     property pyval:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_self, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __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_L6:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":840
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":841
 *     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_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":849
 *     Python's bool type.
 *     """
 *     def _init(self):             # <<<<<<<<<<<<<<
 *         self._parse_value = __parseBool
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  __Pyx_SetupRefcountContext("_init");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":850
 *     """
 *     def _init(self):
 *         self._parse_value = __parseBool             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp___parseBool); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value);
  ((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value = __pyx_1;
  __pyx_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_AddTraceback("lxml.objectify.BoolElement._init");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":852
 *         self._parse_value = __parseBool
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return __parseBool(textOf(self._c_node))
 * 
 */

static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_SetupRefcountContext("__nonzero__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":853
 * 
 *     def __nonzero__(self):
 *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self, other, int op):
 */
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__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 = 853; __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 = 853; __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 = 853; __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_r = -1;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":855
 *         return __parseBool(textOf(self._c_node))
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
 *         return _richcmpPyvals(self, other, op)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__richcmp__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":856
 * 
 *     def __richcmp__(self, other, int op):
 *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(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 = 856; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":858
 *         return _richcmpPyvals(self, other, op)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return unicode(__parseBool(textOf(self._c_node)))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__str__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":859
 * 
 *     def __str__(self):
 *         return unicode(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__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 = 859; __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 = 859; __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 = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 859; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":861
 *         return unicode(__parseBool(textOf(self._c_node)))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(__parseBool(textOf(self._c_node)))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__repr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":862
 * 
 *     def __repr__(self):
 *         return repr(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
 * 
 *     property pyval:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__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 = 862; __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 = 862; __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 = 862; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":865
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return __parseBool(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":866
 *     property pyval:
 *         def __get__(self):
 *             return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
 * 
 * def __checkBool(s):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__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 = 866; __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 = 866; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  int __pyx_v_value;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("__checkBool");
  __pyx_self = __pyx_self;

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

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":870
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":871
 *     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_L5;
  }
  __pyx_L5:;

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

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

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("lxml.objectify.__checkBool");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":875
 *         raise ValueError
 * 
 * cpdef __parseBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value
 *     if s is None:
 */

static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static  PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, int __pyx_skip_dispatch) {
  int __pyx_v_value;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__parseBool");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":877
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":878
 *     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 = 878; __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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":879
 *     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);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":880
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":881
 *     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_761), __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":882
 *     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 = 882; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":875
 *         raise ValueError
 * 
 * cpdef __parseBool(s):             # <<<<<<<<<<<<<<
 *     cdef int value
 *     if s is None:
 */

static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__parseBool");
  __pyx_self = __pyx_self;
  __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 = 875; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":884
 *     return <bint>value
 * 
 * cdef inline int __parseBoolAsInt(text):             # <<<<<<<<<<<<<<
 *     if text == u'false':
 *         return 0
 */

static INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__pyx_v_text) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_SetupRefcountContext("__parseBoolAsInt");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":885
 * 
 * cdef inline int __parseBoolAsInt(text):
 *     if text == u'false':             # <<<<<<<<<<<<<<
 *         return 0
 *     elif text == u'true':
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_762), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __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 = 885; __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-HEAD/src/lxml/lxml.objectify.pyx":886
 * 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;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":887
 *     if text == u'false':
 *         return 0
 *     elif text == u'true':             # <<<<<<<<<<<<<<
 *         return 1
 *     elif text == u'0':
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_763), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __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 = 887; __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-HEAD/src/lxml/lxml.objectify.pyx":888
 *         return 0
 *     elif text == u'true':
 *         return 1             # <<<<<<<<<<<<<<
 *     elif text == u'0':
 *         return 0
 */
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":889
 *     elif text == u'true':
 *         return 1
 *     elif text == u'0':             # <<<<<<<<<<<<<<
 *         return 0
 *     elif text == u'1':
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_764), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __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 = 889; __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-HEAD/src/lxml/lxml.objectify.pyx":890
 *         return 1
 *     elif text == u'0':
 *         return 0             # <<<<<<<<<<<<<<
 *     elif text == u'1':
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":891
 *     elif text == u'0':
 *         return 0
 *     elif text == u'1':             # <<<<<<<<<<<<<<
 *         return 1
 *     return -1
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_765), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __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 = 891; __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-HEAD/src/lxml/lxml.objectify.pyx":892
 *         return 0
 *     elif text == u'1':
 *         return 1             # <<<<<<<<<<<<<<
 *     return -1
 * 
 */
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":893
 *     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_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("lxml.objectify.__parseBoolAsInt");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":895
 *     return -1
 * 
 * cdef inline object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
 *     return element._parse_value(textOf(element._c_node))
 * 
 */

static INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("_parseNumber");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":896
 * 
 * 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 = 896; __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 = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 896; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":898
 *     return element._parse_value(textOf(element._c_node))
 * 
 * cdef inline object _strValueOf(obj):             # <<<<<<<<<<<<<<
 *     if python._isString(obj):
 *         return obj
 */

static INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("_strValueOf");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":899
 * 
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":900
 * 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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":901
 *     if python._isString(obj):
 *         return obj
 *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
 *         return textOf((<_Element>obj)._c_node) or u''
 *     if obj is None:
 */
  __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":902
 *         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 = 902; __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 = 902; __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_766));
      __pyx_t_3 = __pyx_kp_766;
    } 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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":903
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":904
 *         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_767));
    __pyx_r = ((PyObject *)__pyx_kp_767);
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":905
 *     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 = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 905; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":907
 *     return unicode(obj)
 * 
 * cdef inline object _numericValueOf(obj):             # <<<<<<<<<<<<<<
 *     if isinstance(obj, NumberElement):
 *         return _parseNumber(<NumberElement>obj)
 */

static INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("_numericValueOf");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":908
 * 
 * cdef inline object _numericValueOf(obj):
 *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
 *         return _parseNumber(<NumberElement>obj)
 *     elif hasattr(obj, u'pyval'):
 */
  __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NumberElement))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":909
 * 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_2 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __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;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":910
 *     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_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_kp_768)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":912
 *     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_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_kp_pyval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":913
 *         # 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_2);
  __Pyx_AddTraceback("lxml.objectify._numericValueOf");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":915
 *     return obj
 * 
 * cdef inline _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
 *     left  = getattr3(left,  u'pyval', left)
 *     right = getattr3(right, u'pyval', right)
 */

static INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, PyObject *__pyx_v_right, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("_richcmpPyvals");
  __Pyx_INCREF(__pyx_v_left);
  __Pyx_INCREF(__pyx_v_right);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":916
 * 
 * cdef inline _richcmpPyvals(left, right, int op):
 *     left  = getattr3(left,  u'pyval', left)             # <<<<<<<<<<<<<<
 *     right = getattr3(right, u'pyval', right)
 *     return python.PyObject_RichCompare(left, right, op)
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_left, ((PyObject *)__pyx_kp_769), __pyx_v_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_left);
  __pyx_v_left = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":917
 * cdef inline _richcmpPyvals(left, right, int op):
 *     left  = getattr3(left,  u'pyval', left)
 *     right = getattr3(right, u'pyval', right)             # <<<<<<<<<<<<<<
 *     return python.PyObject_RichCompare(left, right, op)
 * 
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, ((PyObject *)__pyx_kp_770), __pyx_v_right); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_right);
  __pyx_v_right = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":918
 *     left  = getattr3(left,  u'pyval', left)
 *     right = getattr3(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 = 918; __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._richcmpPyvals");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_left);
  __Pyx_DECREF(__pyx_v_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":946
 *     cdef object _type
 *     cdef list _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
 *         if python.PyString_Check(name):
 *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
 */

static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4lxml_9objectify_6PyType___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;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_name,&__pyx_kp_type_check,&__pyx_kp_type_class,&__pyx_kp_stringify,0};
  __Pyx_SetupRefcountContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[3] = Py_None;
    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);
      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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_name);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_type_check);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      case  2:
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_type_class);
      if (likely(values[2])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      case  3:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_stringify);
        if (unlikely(value)) { values[3] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_name = values[0];
    __pyx_v_type_check = values[1];
    __pyx_v_type_class = values[2];
    __pyx_v_stringify = values[3];
  } else {
    __pyx_v_stringify = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  4:
      __pyx_v_stringify = PyTuple_GET_ITEM(__pyx_args, 3);
      case  3:
      __pyx_v_type_class = PyTuple_GET_ITEM(__pyx_args, 2);
      __pyx_v_type_check = PyTuple_GET_ITEM(__pyx_args, 1);
      __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.PyType.__init__");
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_INCREF(__pyx_v_stringify);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":947
 *     cdef list _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):
 *         if python.PyString_Check(name):             # <<<<<<<<<<<<<<
 *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
 *         elif not python.PyUnicode_Check(name):
 */
  __pyx_t_1 = PyString_Check(__pyx_v_name);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":948
 *     def __init__(self, name, type_check, type_class, stringify=None):
 *         if python.PyString_Check(name):
 *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)             # <<<<<<<<<<<<<<
 *         elif not python.PyUnicode_Check(name):
 *             raise TypeError, u"Type name must be a string"
 */
    __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_name, __pyx_k_771, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L6;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":949
 *         if python.PyString_Check(name):
 *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
 *         elif not python.PyUnicode_Check(name):             # <<<<<<<<<<<<<<
 *             raise TypeError, u"Type name must be a string"
 *         if type_check is not None and not callable(type_check):
 */
  __pyx_t_1 = (!PyUnicode_Check(__pyx_v_name));
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":950
 *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
 *         elif not python.PyUnicode_Check(name):
 *             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_772), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":951
 *         elif not python.PyUnicode_Check(name):
 *             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_1 = (__pyx_v_type_check != Py_None);
  if (__pyx_t_1) {
    __pyx_t_3 = (!PyCallable_Check(__pyx_v_type_check));
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":952
 *             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_773), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":953
 *         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_2 = PyObject_RichCompare(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":954
 *             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_IsSubclass(__pyx_v_type_class, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = (!__pyx_t_1);
    __pyx_t_1 = __pyx_t_4;
  } else {
    __pyx_t_1 = __pyx_t_3;
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":956
 *                not issubclass(type_class, ObjectifiedDataElement):
 *             raise TypeError, \
 *                 u"Data classes must inherit from ObjectifiedDataElement"             # <<<<<<<<<<<<<<
 *         self.name  = name
 *         self._type = type_class
 */
    __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_774), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":957
 *             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(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name = __pyx_v_name;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":958
 *                 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(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type = __pyx_v_type_class;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":959
 *         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(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check = __pyx_v_type_check;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":960
 *         self._type = type_class
 *         self.type_check = type_check
 *         if stringify is None:             # <<<<<<<<<<<<<<
 *             stringify = unicode
 *         self.stringify = stringify
 */
  __pyx_t_1 = (__pyx_v_stringify == Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":961
 *         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_L9;
  }
  __pyx_L9:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":962
 *         if stringify is None:
 *             stringify = unicode
 *         self.stringify = stringify             # <<<<<<<<<<<<<<
 *         self._schema_types = []
 * 
 */
  __Pyx_INCREF(__pyx_v_stringify);
  __Pyx_GIVEREF(__pyx_v_stringify);
  __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify);
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify = __pyx_v_stringify;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":963
 *             stringify = unicode
 *         self.stringify = stringify
 *         self._schema_types = []             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = __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.PyType.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_stringify);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":965
 *         self._schema_types = []
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__repr__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":966
 * 
 *     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(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type, __pyx_kp___name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __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 = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__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_775), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __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.PyType.__repr__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":968
 *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
 *         u"""register(self, before=None, after=None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_6PyType_register[] = "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_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_before = 0;
  PyObject *__pyx_v_after = 0;
  PyObject *__pyx_v_item;
  PyObject *__pyx_v_entry;
  PyObject *__pyx_v_first_pos;
  PyObject *__pyx_v_last_pos;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_check;
  PyObject *__pyx_v_pytype;
  PyObject *__pyx_v_xs_type;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  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;
  int __pyx_t_9;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_before,&__pyx_kp_after,0};
  __Pyx_SetupRefcountContext("register");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[0] = Py_None;
    values[1] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_before);
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
      case  1:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_after);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "register") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_before = values[0];
    __pyx_v_after = values[1];
  } else {
    __pyx_v_before = Py_None;
    __pyx_v_after = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_after = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_before = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.PyType.register");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_before);
  __Pyx_INCREF(__pyx_v_after);
  __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_entry = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_first_pos = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_last_pos = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_check = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_xs_type = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":978
 *         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(((struct __pyx_obj_4lxml_9objectify_PyType *)__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 = 978; __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 = 978; __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-HEAD/src/lxml/lxml.objectify.pyx":979
 *         """
 *         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_776), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":980
 *         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 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check != Py_None);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":981
 *             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 (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
      __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
    } else {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
      __Pyx_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":982
 *         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_1 = __Pyx_GetItemInt(__pyx_v_item, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __pyx_t_2 = (__pyx_1 == ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      if (__pyx_t_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":983
 *             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_kp_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __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 = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__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 = 983; __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;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":984
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)
 *                     break             # <<<<<<<<<<<<<<
 *             entry = (self.type_check, self)
 *             first_pos = 0
 */
        goto __pyx_L9_break;
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
    __pyx_L9_break:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":985
 *                     _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 = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
    __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __Pyx_DECREF(__pyx_v_entry);
    __pyx_v_entry = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":986
 *                     break
 *             entry = (self.type_check, self)
 *             first_pos = 0             # <<<<<<<<<<<<<<
 *             last_pos = -1
 *             if before or after:
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF(__pyx_v_first_pos);
    __pyx_v_first_pos = __pyx_int_0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":987
 *             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_DECREF(__pyx_v_last_pos);
    __pyx_v_last_pos = __pyx_int_neg_1;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":988
 *             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 = 988; __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 = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_2;
    }
    if (__pyx_t_8) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":989
 *             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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":990
 *             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_L12;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":991
 *                 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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":992
 *                     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_L12;
      }
      __pyx_L12:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":993
 *                 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_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(((PyObject *)__pyx_t_1));
      __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
      __pyx_t_6 = PyObject_Call(__pyx_builtin_enumerate, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1);
      } else {
        __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++;
        } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++;
        } else {
          __pyx_t_6 = PyIter_Next(__pyx_t_1);
          if (!__pyx_t_6) {
            if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (PyTuple_CheckExact(__pyx_t_6) && likely(PyTuple_GET_SIZE(__pyx_t_6) == 2)) {
          PyObject* tuple = __pyx_t_6;
          __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
          __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_v_i);
          __pyx_v_i = __pyx_2;
          __pyx_2 = 0;
          if (PyTuple_CheckExact(__pyx_3) && likely(PyTuple_GET_SIZE(__pyx_3) == 2)) {
            PyObject* tuple = __pyx_3;
            __pyx_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_5);
            __pyx_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_6);
            __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
            __Pyx_DECREF(__pyx_v_check);
            __pyx_v_check = __pyx_5;
            __pyx_5 = 0;
            __Pyx_DECREF(__pyx_v_pytype);
            __pyx_v_pytype = __pyx_6;
            __pyx_6 = 0;
          } else {
            __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_4);
            __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_5 = __Pyx_UnpackItem(__pyx_4, 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_5);
            __pyx_6 = __Pyx_UnpackItem(__pyx_4, 1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_6);
            if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_4); __pyx_4 = 0;
            __Pyx_DECREF(__pyx_v_check);
            __pyx_v_check = __pyx_5;
            __pyx_5 = 0;
            __Pyx_DECREF(__pyx_v_pytype);
            __pyx_v_pytype = __pyx_6;
            __pyx_6 = 0;
          }
        } else {
          __pyx_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_2);
          __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_3);
          if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
          __Pyx_DECREF(__pyx_v_i);
          __pyx_v_i = __pyx_2;
          __pyx_2 = 0;
          if (PyTuple_CheckExact(__pyx_3) && likely(PyTuple_GET_SIZE(__pyx_3) == 2)) {
            PyObject* tuple = __pyx_3;
            __pyx_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_5);
            __pyx_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_6);
            __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
            __Pyx_DECREF(__pyx_v_check);
            __pyx_v_check = __pyx_5;
            __pyx_5 = 0;
            __Pyx_DECREF(__pyx_v_pytype);
            __pyx_v_pytype = __pyx_6;
            __pyx_6 = 0;
          } else {
            __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_4);
            __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_5 = __Pyx_UnpackItem(__pyx_4, 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_5);
            __pyx_6 = __Pyx_UnpackItem(__pyx_4, 1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_6);
            if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_4); __pyx_4 = 0;
            __Pyx_DECREF(__pyx_v_check);
            __pyx_v_check = __pyx_5;
            __pyx_5 = 0;
            __Pyx_DECREF(__pyx_v_pytype);
            __pyx_v_pytype = __pyx_6;
            __pyx_6 = 0;
          }
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":994
 *                     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_6 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_8) {
          __pyx_t_6 = PyObject_GetAttr(__pyx_v_pytype, __pyx_kp_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = (PySequence_Contains(__pyx_v_before, __pyx_t_6)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_7 = __pyx_t_2;
        } else {
          __pyx_t_7 = __pyx_t_8;
        }
        if (__pyx_t_7) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":995
 *                 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_L15;
        }
        __pyx_L15:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":996
 *                     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_6 = PyObject_GetAttr(__pyx_v_pytype, __pyx_kp_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = (PySequence_Contains(__pyx_v_after, __pyx_t_6)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_7) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":997
 *                         last_pos = i
 *                     if pytype.name in after:
 *                         first_pos = i+1             # <<<<<<<<<<<<<<
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)
 */
          __pyx_t_6 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_v_first_pos);
          __pyx_v_first_pos = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L16;
        }
        __pyx_L16:;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":998
 *                     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 = 998; __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 = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":999
 *                         first_pos = i+1
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<<
 *             elif first_pos > last_pos:
 *                 raise ValueError, u"inconsistent before/after dependencies"
 */
      __pyx_t_9 = PyList_Append(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_v_entry); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L17;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1000
 *             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 = 1000; __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 = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1001
 *                 _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_777), 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L17;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1003
 *                 raise ValueError, u"inconsistent before/after dependencies"
 *             else:
 *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<<
 * 
 *         _PYTYPE_DICT[self.name] = self
 */
      __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 = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = PyList_Insert(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_t_3, __pyx_v_entry); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L17:;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1005
 *                 _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 (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1006
 * 
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 * 
 */
  if (likely(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types) != Py_None)) {
    __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types); __Pyx_INCREF(__pyx_t_1);
  } else {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++;
    __Pyx_DECREF(__pyx_v_xs_type);
    __pyx_v_xs_type = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1007
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:
 *             _SCHEMA_TYPE_DICT[xs_type] = self             # <<<<<<<<<<<<<<
 * 
 *     def unregister(self):
 */
    if (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_4);
  __Pyx_XDECREF(__pyx_5);
  __Pyx_XDECREF(__pyx_6);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify.PyType.register");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_item);
  __Pyx_DECREF(__pyx_v_entry);
  __Pyx_DECREF(__pyx_v_first_pos);
  __Pyx_DECREF(__pyx_v_last_pos);
  __Pyx_DECREF(__pyx_v_i);
  __Pyx_DECREF(__pyx_v_check);
  __Pyx_DECREF(__pyx_v_pytype);
  __Pyx_DECREF(__pyx_v_xs_type);
  __Pyx_DECREF(__pyx_v_before);
  __Pyx_DECREF(__pyx_v_after);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1009
 *             _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_unregister(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_6PyType_unregister[] = "unregister(self)";
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_v_xs_type;
  PyObject *__pyx_v_pytype;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_SetupRefcountContext("unregister");
  __pyx_v_xs_type = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1011
 *     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()):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_kp_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __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 = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
  __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 = 1011; __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_t_4 = (__pyx_t_3 == __pyx_v_self);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1012
 *         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 (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1013
 *         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]
 */
  __pyx_t_3 = PyDict_Items(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __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 = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_2))) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
    } else {
      __pyx_t_3 = PyIter_Next(__pyx_t_2);
      if (!__pyx_t_3) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
      PyObject* tuple = __pyx_t_3;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_xs_type);
      __pyx_v_xs_type = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_pytype);
      __pyx_v_pytype = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_xs_type);
      __pyx_v_xs_type = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_pytype);
      __pyx_v_pytype = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1014
 *             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_4 = (__pyx_v_pytype == __pyx_v_self);
    if (__pyx_t_4) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1015
 *         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 (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1016
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:             # <<<<<<<<<<<<<<
 *             return
 *         try:
 */
  __pyx_t_4 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check == Py_None);
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1017
 *                 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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1018
 *         if self.type_check is None:
 *             return
 *         try:             # <<<<<<<<<<<<<<
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 *         except ValueError:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1019
 *             return
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
 */
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_kp_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
      __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
      __Pyx_INCREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L17_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_1); __pyx_1 = 0;
    __Pyx_XDECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_XDECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1020
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_4 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_4) {
      PyErr_Restore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    __Pyx_XDECREF(__pyx_save_exc_type);
    __Pyx_XDECREF(__pyx_save_exc_value);
    __Pyx_XDECREF(__pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L17_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.PyType.unregister");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_xs_type);
  __Pyx_DECREF(__pyx_v_pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1028
 *         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__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("__get__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1029
 *         """
 *         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 *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
  __pyx_r = ((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
  goto __pyx_L0;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1030
 *         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___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("__set__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1031
 *             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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 1031; __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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2)) || (__pyx_t_2) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected list, got %s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__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_r = -1;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1043
 * _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;
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("_lower_bool");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1044
 * 
 * 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 = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1045
 * cdef _lower_bool(b):
 *     if b:
 *         return u"true"             # <<<<<<<<<<<<<<
 *     else:
 *         return u"false"
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_778));
    __pyx_r = ((PyObject *)__pyx_kp_778);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1047
 *         return u"true"
 *     else:
 *         return u"false"             # <<<<<<<<<<<<<<
 * 
 * def __lower_bool(b):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_779));
    __pyx_r = ((PyObject *)__pyx_kp_779);
    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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1049
 *         return u"false"
 * 
 * def __lower_bool(b):             # <<<<<<<<<<<<<<
 *     return _lower_bool(b)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("__lower_bool");
  __pyx_self = __pyx_self;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1050
 * 
 * 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 = 1050; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1052
 *     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;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("_pytypename");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1053
 * 
 * cdef _pytypename(obj):
 *     if python._isString(obj):             # <<<<<<<<<<<<<<
 *         return u"str"
 *     else:
 */
  __pyx_t_1 = _isString(__pyx_v_obj);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1054
 * cdef _pytypename(obj):
 *     if python._isString(obj):
 *         return u"str"             # <<<<<<<<<<<<<<
 *     else:
 *         return _typename(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_780));
    __pyx_r = ((PyObject *)__pyx_kp_780);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1056
 *         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 = 1056; __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_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1058
 *         return _typename(obj)
 * 
 * def pytypename(obj):             # <<<<<<<<<<<<<<
 *     u"""pytypename(obj)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_4lxml_9objectify_pytypename[] = "pytypename(obj)\n\n    Find the name of the corresponding PyType for a Python object.\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("pytypename");
  __pyx_self = __pyx_self;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1063
 *     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 = 1063; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1065
 *     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) {
  PyObject *__pyx_v_pytype;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_SetupRefcountContext("_registerPyTypes");
  __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1066
 * 
 * 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 = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_781));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_781));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_781));
  __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 = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1070
 *                              u"unsignedByte", u"nonPositiveInteger",
 *                              u"negativeInteger", u"long", u"nonNegativeInteger",
 *                              u"unsignedLong", u"unsignedInt", u"positiveInteger",)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_2 = PyTuple_New(13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_kp_782));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_782));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_782));
  __Pyx_INCREF(((PyObject *)__pyx_kp_783));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_783));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_783));
  __Pyx_INCREF(((PyObject *)__pyx_kp_784));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_kp_784));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_784));
  __Pyx_INCREF(((PyObject *)__pyx_kp_785));
  PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_kp_785));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_785));
  __Pyx_INCREF(((PyObject *)__pyx_kp_786));
  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_786));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_786));
  __Pyx_INCREF(((PyObject *)__pyx_kp_787));
  PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_787));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_787));
  __Pyx_INCREF(((PyObject *)__pyx_kp_788));
  PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_kp_788));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_788));
  __Pyx_INCREF(((PyObject *)__pyx_kp_789));
  PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_kp_789));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_789));
  __Pyx_INCREF(((PyObject *)__pyx_kp_790));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_kp_790));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_790));
  __Pyx_INCREF(((PyObject *)__pyx_kp_791));
  PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_kp_791));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_791));
  __Pyx_INCREF(((PyObject *)__pyx_kp_792));
  PyTuple_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_kp_792));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_792));
  __Pyx_INCREF(((PyObject *)__pyx_kp_793));
  PyTuple_SET_ITEM(__pyx_t_2, 11, ((PyObject *)__pyx_kp_793));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_793));
  __Pyx_INCREF(((PyObject *)__pyx_kp_794));
  PyTuple_SET_ITEM(__pyx_t_2, 12, ((PyObject *)__pyx_kp_794));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_794));

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1067
 * 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(__pyx_v_pytype, __pyx_kp_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1071
 *                              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(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __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 = 1071; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1074
 * 
 *     # '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 = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_795));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_795));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_795));
  __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 = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1075
 *     # '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(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __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 = 1075; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1077
 *     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 = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_796));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_796));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_796));
  __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 = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1078
 * 
 *     pytype = PyType(u'float', float, FloatElement)
 *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_kp_797));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_797));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_797));
  __Pyx_INCREF(((PyObject *)__pyx_kp_798));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_798));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_798));
  if (PyObject_SetAttr(__pyx_v_pytype, __pyx_kp_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1079
 *     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(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __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 = 1079; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1081
 *     pytype.register()
 * 
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<<
 *     pytype.xmlSchemaTypes = (u"boolean",)
 *     pytype.register()
 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp___checkBool); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp___lower_bool); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_799));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_799));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_799));
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_2);
  __Pyx_GIVEREF(__pyx_2);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __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 = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1082
 * 
 *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_kp_800));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_800));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_800));
  if (PyObject_SetAttr(__pyx_v_pytype, __pyx_kp_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1083
 *     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(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __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 = 1083; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1085
 *     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_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_801));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_801));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_801));
  __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_StringElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1088
 *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",
 *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
 *                              u"NMTOKEN", )             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_2 = PyTuple_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_kp_802));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_802));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_802));
  __Pyx_INCREF(((PyObject *)__pyx_kp_803));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_803));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_803));
  __Pyx_INCREF(((PyObject *)__pyx_kp_804));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_kp_804));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_804));
  __Pyx_INCREF(((PyObject *)__pyx_kp_805));
  PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_kp_805));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_805));
  __Pyx_INCREF(((PyObject *)__pyx_kp_806));
  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_806));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_806));
  __Pyx_INCREF(((PyObject *)__pyx_kp_807));
  PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_807));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_807));
  __Pyx_INCREF(((PyObject *)__pyx_kp_808));
  PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_kp_808));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_808));
  __Pyx_INCREF(((PyObject *)__pyx_kp_809));
  PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_kp_809));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_809));
  __Pyx_INCREF(((PyObject *)__pyx_kp_810));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_kp_810));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_810));
  __Pyx_INCREF(((PyObject *)__pyx_kp_811));
  PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_kp_811));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_811));

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1086
 * 
 *     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(__pyx_v_pytype, __pyx_kp_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1089
 *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
 *                              u"NMTOKEN", )
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     # since lxml 2.0
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __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 = 1089; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1092
 * 
 *     # since lxml 2.0
 *     pytype = PyType(u'NoneType', None, NoneElement)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_812));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_812));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_812));
  __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_NoneElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1093
 *     # since lxml 2.0
 *     pytype = PyType(u'NoneType', None, NoneElement)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 *     # backwards compatibility
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __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 = 1093; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1096
 * 
 *     # backwards compatibility
 *     pytype = PyType(u'none', None, NoneElement)             # <<<<<<<<<<<<<<
 *     pytype.register()
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_813));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_813));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_813));
  __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_NoneElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1097
 *     # backwards compatibility
 *     pytype = PyType(u'none', None, NoneElement)
 *     pytype.register()             # <<<<<<<<<<<<<<
 * 
 * # non-registered PyType for inner tree elements
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_kp_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __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 = 1097; __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;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify._registerPyTypes");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1105
 * _registerPyTypes()
 * 
 * def getRegisteredTypes():             # <<<<<<<<<<<<<<
 *     u"""getRegisteredTypes()
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_getRegisteredTypes[] = "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 PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused) {
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_known = 0;
  PyObject *__pyx_v_check;
  PyObject *__pyx_v_pytype;
  PyObject *__pyx_v_name;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_SetupRefcountContext("getRegisteredTypes");
  __pyx_self = __pyx_self;
  __pyx_v_check = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1120
 *     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 = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_types = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1121
 *     """
 *     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 = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_known = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1122
 *     cdef list types = []
 *     cdef set known = set()
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *         name = pytype.name
 *         if name not in known:
 */
  if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
    __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
  } else {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
    if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
      PyObject* tuple = __pyx_t_3;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_check);
      __pyx_v_check = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_pytype);
      __pyx_v_pytype = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_check);
      __pyx_v_check = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_pytype);
      __pyx_v_pytype = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1123
 *     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_kp_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_name);
    __pyx_v_name = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1124
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name
 *         if name not in known:             # <<<<<<<<<<<<<<
 *             known.add(name)
 *             types.append(pytype)
 */
    __pyx_t_4 = (!PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1125
 *         name = pytype.name
 *         if name not in known:
 *             known.add(name)             # <<<<<<<<<<<<<<
 *             types.append(pytype)
 *     for pytype in _PYTYPE_DICT.values():
 */
      __pyx_t_5 = PySet_Add(((PyObject *)__pyx_v_known), __pyx_v_name); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1126
 *         if name not in known:
 *             known.add(name)
 *             types.append(pytype)             # <<<<<<<<<<<<<<
 *     for pytype in _PYTYPE_DICT.values():
 *         name = pytype.name
 */
      __pyx_t_5 = PyList_Append(((PyObject *)__pyx_v_types), __pyx_v_pytype); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1127
 *             known.add(name)
 *             types.append(pytype)
 *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
 *         name = pytype.name
 *         if name not in known:
 */
  __pyx_t_1 = PyDict_Values(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __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_2 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
  } 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 = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_3))) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
    } else {
      __pyx_t_1 = PyIter_Next(__pyx_t_3);
      if (!__pyx_t_1) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1128
 *             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_kp_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1129
 *     for pytype in _PYTYPE_DICT.values():
 *         name = pytype.name
 *         if name not in known:             # <<<<<<<<<<<<<<
 *             known.add(name)
 *             types.append(pytype)
 */
    __pyx_t_4 = (!PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1130
 *         name = pytype.name
 *         if name not in known:
 *             known.add(name)             # <<<<<<<<<<<<<<
 *             types.append(pytype)
 *     return types
 */
      __pyx_t_5 = PySet_Add(((PyObject *)__pyx_v_known), __pyx_v_name); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1131
 *         if name not in known:
 *             known.add(name)
 *             types.append(pytype)             # <<<<<<<<<<<<<<
 *     return types
 * 
 */
      __pyx_t_5 = PyList_Append(((PyObject *)__pyx_v_types), __pyx_v_pytype); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L10;
    }
    __pyx_L10:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1132
 *             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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.getRegisteredTypes");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_types);
  __Pyx_XDECREF(__pyx_v_known);
  __Pyx_DECREF(__pyx_v_check);
  __Pyx_DECREF(__pyx_v_pytype);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1134
 *     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;
  PyObject *__pyx_v_tested_pytype;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  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;
  __Pyx_SetupRefcountContext("_guessPyType");
  __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_tested_pytype = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1135
 * 
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1136
 * 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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1137
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *         try:
 *             type_check(value)
 */
  if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
    __pyx_t_2 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_3);
  } else {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
    if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
      PyObject* tuple = __pyx_t_4;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_type_check);
      __pyx_v_type_check = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_tested_pytype);
      __pyx_v_tested_pytype = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_type_check);
      __pyx_v_type_check = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_tested_pytype);
      __pyx_v_tested_pytype = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1138
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 *         try:             # <<<<<<<<<<<<<<
 *             type_check(value)
 *             return <PyType>tested_pytype
 */
    {
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
      __Pyx_XGOTREF(__pyx_save_exc_type);
      __Pyx_XGOTREF(__pyx_save_exc_value);
      __Pyx_XGOTREF(__pyx_save_exc_tb);
      /*try:*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1139
 *     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 = 1139; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(((PyObject *)__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_5 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1140
 *         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_3); __pyx_t_3 = 0;
        goto __pyx_L10_try_return;
      }
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L13_try_end;
      __pyx_L10_try_return:;
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L0;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_XDECREF(__pyx_2); __pyx_2 = 0;
      __Pyx_XDECREF(__pyx_3); __pyx_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1141
 *             type_check(value)
 *             return <PyType>tested_pytype
 *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
 *             # could not be parsed as the specififed type => ignore
 *             pass
 */
      __pyx_4 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
      if (__pyx_4) {
        PyErr_Restore(0,0,0);
        goto __pyx_L7_exception_handled;
      }
      __Pyx_XDECREF(__pyx_save_exc_type);
      __Pyx_XDECREF(__pyx_save_exc_value);
      __Pyx_XDECREF(__pyx_save_exc_tb);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      __pyx_L13_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1144
 *             # 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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify._guessPyType");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_type_check);
  __Pyx_DECREF(__pyx_v_tested_pytype);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1146
 *     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;
  PyObject *__pyx_v_type_check;
  PyObject *__pyx_v_pytype;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  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;
  __Pyx_SetupRefcountContext("_guessElementClass");
  __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1147
 * 
 * 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 = 1147; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1148
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1149
 *     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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1150
 *     if value is None:
 *         return None
 *     if value == u'':             # <<<<<<<<<<<<<<
 *         return StringElement
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_814), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __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 = 1150; __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-HEAD/src/lxml/lxml.objectify.pyx":1151
 *         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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1153
 *         return StringElement
 * 
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
 *         try:
 *             type_check(value)
 */
  if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
    __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
  } else {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
    if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
      PyObject* tuple = __pyx_t_4;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_type_check);
      __pyx_v_type_check = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_pytype);
      __pyx_v_pytype = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_type_check);
      __pyx_v_type_check = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_pytype);
      __pyx_v_pytype = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1154
 * 
 *     for type_check, pytype in _TYPE_CHECKS:
 *         try:             # <<<<<<<<<<<<<<
 *             type_check(value)
 *             return (<PyType>pytype)._type
 */
    {
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
      __Pyx_XGOTREF(__pyx_save_exc_type);
      __Pyx_XGOTREF(__pyx_save_exc_value);
      __Pyx_XGOTREF(__pyx_save_exc_tb);
      /*try:*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1155
 *     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 = 1155; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
        __Pyx_GOTREF(((PyObject *)__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_5 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1156
 *         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_L11_try_return;
      }
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L14_try_end;
      __pyx_L11_try_return:;
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
      goto __pyx_L0;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_XDECREF(__pyx_2); __pyx_2 = 0;
      __Pyx_XDECREF(__pyx_3); __pyx_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1157
 *             type_check(value)
 *             return (<PyType>pytype)._type
 *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
 *             pass
 *     return None
 */
      __pyx_4 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
      if (__pyx_4) {
        PyErr_Restore(0,0,0);
        goto __pyx_L8_exception_handled;
      }
      __Pyx_XDECREF(__pyx_save_exc_type);
      __Pyx_XDECREF(__pyx_save_exc_value);
      __Pyx_XDECREF(__pyx_save_exc_tb);
      goto __pyx_L1_error;
      __pyx_L8_exception_handled:;
      __Pyx_XGIVEREF(__pyx_save_exc_type);
      __Pyx_XGIVEREF(__pyx_save_exc_value);
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
      __pyx_L14_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1159
 *         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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify._guessElementClass");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_value);
  __Pyx_DECREF(__pyx_v_type_check);
  __Pyx_DECREF(__pyx_v_pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1177
 *     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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4lxml_9objectify_12ElementMaker___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;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_namespace,&__pyx_kp_nsmap,&__pyx_kp_annotate,&__pyx_kp_makeelement,0};
  __Pyx_SetupRefcountContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[0] = Py_None;
    values[1] = Py_None;
    values[2] = __pyx_k_714;
    values[3] = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_namespace);
      if (value) { values[0] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_nsmap);
      if (value) { values[1] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_annotate);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_makeelement);
      if (value) { values[3] = value; if (!(--kw_args)) break; }
      break;
    }
    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 = 1177; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_namespace = values[0];
    __pyx_v_nsmap = values[1];
    __pyx_v_annotate = values[2];
    __pyx_v_makeelement = values[3];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_namespace = Py_None;
    __pyx_v_nsmap = Py_None;
    __pyx_v_annotate = __pyx_k_714;
    __pyx_v_makeelement = Py_None;
  }
  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 = 1177; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_nsmap);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1179
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
 *                  makeelement=None):
 *         if nsmap is None:             # <<<<<<<<<<<<<<
 *             nsmap = _DEFAULT_NSMAP
 *         self._nsmap = nsmap
 */
  __pyx_t_1 = (__pyx_v_nsmap == Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1180
 *                  makeelement=None):
 *         if nsmap is None:
 *             nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
 *         self._nsmap = nsmap
 *         if namespace is None:
 */
    __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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1181
 *         if nsmap is None:
 *             nsmap = _DEFAULT_NSMAP
 *         self._nsmap = nsmap             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             self._namespace = None
 */
  __Pyx_INCREF(__pyx_v_nsmap);
  __Pyx_GIVEREF(__pyx_v_nsmap);
  __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
  ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap = __pyx_v_nsmap;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1182
 *             nsmap = _DEFAULT_NSMAP
 *         self._nsmap = nsmap
 *         if namespace is None:             # <<<<<<<<<<<<<<
 *             self._namespace = None
 *         else:
 */
  __pyx_t_1 = (__pyx_v_namespace == Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1183
 *         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(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
    ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = Py_None;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1185
 *             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_815), __pyx_v_namespace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
    ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1186
 *         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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate = __pyx_t_1;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1187
 *             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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1188
 *         self._annotate = annotate
 *         if makeelement is not None:
 *             assert callable(makeelement)             # <<<<<<<<<<<<<<
 *             self._makeelement = makeelement
 *         else:
 */
    #ifndef PYREX_WITHOUT_ASSERTIONS
    if (unlikely(!PyCallable_Check(__pyx_v_makeelement))) {
      PyErr_SetNone(PyExc_AssertionError);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #endif

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1189
 *         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(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
    ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = __pyx_v_makeelement;
    goto __pyx_L8;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1191
 *             self._makeelement = makeelement
 *         else:
 *             self._makeelement = None             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, tag):
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
    ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = Py_None;
  }
  __pyx_L8:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_nsmap);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1193
 *             self._makeelement = None
 * 
 *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != u"{":
 */

static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_SetupRefcountContext("__getattr__");
  __Pyx_INCREF(__pyx_v_tag);
  __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1195
 *     def __getattr__(self, tag):
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 */
  __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace != Py_None);
  if (__pyx_t_1) {
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_tag, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_1, ((PyObject *)__pyx_kp_816), Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_1;
  }
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1196
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != u"{":
 *             tag = self._namespace + tag             # <<<<<<<<<<<<<<
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag
 */
    __pyx_t_2 = PyNumber_Add(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace, __pyx_v_tag); 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_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1197
 *         if self._namespace is not None and tag[0] != u"{":
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)             # <<<<<<<<<<<<<<
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap
 */
  __pyx_t_2 = ((PyObject *)PY_NEW(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_v_element_maker));
  __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1198
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1199
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap             # <<<<<<<<<<<<<<
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement
 */
  __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
  __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
  __Pyx_GOTREF(__pyx_v_element_maker->_nsmap);
  __Pyx_DECREF(__pyx_v_element_maker->_nsmap);
  __pyx_v_element_maker->_nsmap = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1200
 *         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 = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1201
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement             # <<<<<<<<<<<<<<
 *         return element_maker
 * 
 */
  __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
  __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__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 = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1202
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement
 *         return element_maker             # <<<<<<<<<<<<<<
 * 
 * cdef class _ObjectifyElementMakerCaller:
 */
  __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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_element_maker);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1210
 *     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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__[] = "__call__(self, *children, **attrib)";
static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_children = 0;
  PyObject *__pyx_v_attrib = 0;
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker;
  PyObject *__pyx_v_pytype;
  struct LxmlElement *__pyx_v_element;
  struct LxmlElement *__pyx_v_childElement;
  int __pyx_v_has_children;
  int __pyx_v_has_string_value;
  PyObject *__pyx_v_pytype_name;
  PyObject *__pyx_v_child;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_SetupRefcountContext("__call__");
  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_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_childElement = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1218
 *         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 = (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory == Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1219
 *         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 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag, Py_None, __pyx_v_attrib, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1221
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)
 *         else:
 *             element = self._element_factory(self._tag, attrib, self._nsmap)             # <<<<<<<<<<<<<<
 * 
 *         pytype_name = None
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
    __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
    __Pyx_INCREF(__pyx_v_attrib);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_attrib);
    __Pyx_GIVEREF(__pyx_v_attrib);
    __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
    PyTuple_SET_ITEM(__pyx_t_2, 2, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
    __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
    __pyx_t_3 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1223
 *             element = self._element_factory(self._tag, attrib, self._nsmap)
 * 
 *         pytype_name = None             # <<<<<<<<<<<<<<
 *         has_children = 0
 *         has_string_value = 0
 */
  __Pyx_INCREF(Py_None);
  __Pyx_DECREF(__pyx_v_pytype_name);
  __pyx_v_pytype_name = Py_None;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1224
 * 
 *         pytype_name = None
 *         has_children = 0             # <<<<<<<<<<<<<<
 *         has_string_value = 0
 *         for child in children:
 */
  __pyx_v_has_children = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1225
 *         pytype_name = None
 *         has_children = 0
 *         has_string_value = 0             # <<<<<<<<<<<<<<
 *         for child in children:
 *             if child is None:
 */
  __pyx_v_has_string_value = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1226
 *         has_children = 0
 *         has_string_value = 0
 *         for child in children:             # <<<<<<<<<<<<<<
 *             if child is None:
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 */
  if (PyList_CheckExact(__pyx_v_children) || PyTuple_CheckExact(__pyx_v_children)) {
    __pyx_t_4 = 0; __pyx_t_3 = __pyx_v_children; __Pyx_INCREF(__pyx_t_3);
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_3))) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else {
      __pyx_t_2 = PyIter_Next(__pyx_t_3);
      if (!__pyx_t_2) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_v_child);
    __pyx_v_child = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1227
 *         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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1228
 *         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(__pyx_v_children) == 1);
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1230
 *                 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 = setAttributeValue(__pyx_v_element, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_kp_817)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1231
 *                     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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1232
 *                         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_2 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1233
 *             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_L8;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1234
 *                 _add_text(element, child)
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1
 */
    __pyx_t_1 = PyObject_TypeCheck(__pyx_v_child, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1235
 *                 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));

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1236
 *             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_L8;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1237
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 *                 if elementMaker._element_factory is None:
 */
    __pyx_t_1 = PyObject_TypeCheck(__pyx_v_child, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller))); 
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1238
 *                 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_DECREF(((PyObject *)__pyx_v_elementMaker));
      __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1239
 *             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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1241
 *                 if elementMaker._element_factory is None:
 *                     cetree.makeSubElement(element, elementMaker._tag,
 *                                           None, None, None, None)             # <<<<<<<<<<<<<<
 *                 else:
 *                     childElement = elementMaker._element_factory(
 */
        __pyx_t_2 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_v_elementMaker->_tag, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1244
 *                 else:
 *                     childElement = elementMaker._element_factory(
 *                         elementMaker._tag)             # <<<<<<<<<<<<<<
 *                     cetree.appendChild(element, childElement)
 *                 has_children = 1
 */
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __Pyx_INCREF(__pyx_v_elementMaker->_tag);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_elementMaker->_tag);
        __Pyx_GIVEREF(__pyx_v_elementMaker->_tag);
        __pyx_t_6 = PyObject_Call(__pyx_v_elementMaker->_element_factory, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(((PyObject *)__pyx_v_childElement));
        __pyx_v_childElement = ((struct LxmlElement *)__pyx_t_6);
        __pyx_t_6 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1245
 *                     childElement = elementMaker._element_factory(
 *                         elementMaker._tag)
 *                     cetree.appendChild(element, childElement)             # <<<<<<<<<<<<<<
 *                 has_children = 1
 *             else:
 */
        appendChild(__pyx_v_element, __pyx_v_childElement);
      }
      __pyx_L10:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1246
 *                         elementMaker._tag)
 *                     cetree.appendChild(element, childElement)
 *                 has_children = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 if pytype_name is not None:
 */
      __pyx_v_has_children = 1;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1248
 *                 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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1250
 *                 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_L11;
      }
      __pyx_L11:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1251
 *                     # 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_6 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_v_pytype_name);
      __pyx_v_pytype_name = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1252
 *                     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_v_pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1253
 *                 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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1254
 *                 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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
        __Pyx_INCREF(__pyx_v_child);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_child);
        __Pyx_GIVEREF(__pyx_v_child);
        __pyx_t_2 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __pyx_t_6 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L12;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1256
 *                     _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;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1257
 *                 else:
 *                     has_string_value = 1
 *                     child = unicode(child)             # <<<<<<<<<<<<<<
 *                     _add_text(element, child)
 * 
 */
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
        __Pyx_INCREF(__pyx_v_child);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_child);
        __Pyx_GIVEREF(__pyx_v_child);
        __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_v_child);
        __pyx_v_child = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1258
 *                     has_string_value = 1
 *                     child = unicode(child)
 *                     _add_text(element, child)             # <<<<<<<<<<<<<<
 * 
 *         if self._annotate and not has_children:
 */
        __pyx_t_2 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L12:;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1260
 *                     _add_text(element, child)
 * 
 *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 */
  if (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate) {
    __pyx_t_1 = (!__pyx_v_has_children);
  } else {
    __pyx_t_1 = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate;
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1261
 * 
 *         if self._annotate and not has_children:
 *             if has_string_value:             # <<<<<<<<<<<<<<
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 *             elif pytype_name is not None:
 */
    __pyx_t_1 = __pyx_v_has_string_value;
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1262
 *         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_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_1, ((PyObject *)__pyx_kp_818)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      goto __pyx_L14;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1263
 *             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_1 = (__pyx_v_pytype_name != Py_None);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1264
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
 * 
 *         return element
 */
      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_1, __pyx_v_pytype_name); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      goto __pyx_L14;
    }
    __pyx_L14:;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1266
 *                 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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_children);
  __Pyx_DECREF(__pyx_v_attrib);
  __Pyx_DECREF((PyObject *)__pyx_v_elementMaker);
  __Pyx_DECREF((PyObject *)__pyx_v_element);
  __Pyx_DECREF((PyObject *)__pyx_v_childElement);
  __Pyx_DECREF(__pyx_v_pytype_name);
  __Pyx_DECREF(__pyx_v_child);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1268
 *         return element
 * 
 * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
 *     cdef tree.xmlNode* c_child
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)
 */

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;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_SetupRefcountContext("_add_text");
  __Pyx_INCREF(__pyx_v_text);
  __pyx_v_old = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1270
 * cdef _add_text(_Element elem, text):
 *     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);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1271
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1272
 *     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 = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_old);
    __pyx_v_old = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1273
 *     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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1274
 *         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 = 1274; __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:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1275
 *         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 = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1277
 *         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 = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_old);
    __pyx_v_old = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1278
 *     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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1279
 *         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 = 1279; __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:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1280
 *         if old is not None:
 *             text = old + text
 *         cetree.setNodeText(elem._c_node, text)             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
    __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 = 1280; __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_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_old);
  __Pyx_DECREF(__pyx_v_text);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1288
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
 *     u"""enable_recursive_str(on=True)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_enable_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 PyObject *__pyx_pf_4lxml_9objectify_enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_on = 0;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_on,0};
  __Pyx_SetupRefcountContext("enable_recursive_str");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = __pyx_k_715;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_on);
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "enable_recursive_str") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_on = values[0];
  } else {
    __pyx_v_on = __pyx_k_715;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_on = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1288; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.enable_recursive_str");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1295
 *     """
 *     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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1297
 *     __RECURSIVE_STR = on
 * 
 * def dump(_Element element not None):             # <<<<<<<<<<<<<<
 *     u"""dump(_Element element not None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
static char __pyx_doc_4lxml_9objectify_dump[] = "dump(_Element element not None)\n\n    Return a recursively generated string representation of an element.\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("dump");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_11etreepublic__Element, 0, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1302
 *     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(((struct LxmlElement *)__pyx_v_element), 0); 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_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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1304
 *     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;
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_result;
  PyObject *__pyx_v_xsi_ns;
  PyObject *__pyx_v_pytype_ns;
  PyObject *__pyx_v_name;
  PyObject *__pyx_v_child;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  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 = NULL;
  __Pyx_SetupRefcountContext("_dump");
  __pyx_v_indentstr = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_xsi_ns = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_pytype_ns = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1305
 * 
 * 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 = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(((PyObject *)__pyx_kp_819), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __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_indentstr);
  __pyx_v_indentstr = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1306
 * cdef object _dump(_Element element, int indent):
 *     indentstr = u"    " * indent
 *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *         value = repr(element)
 *     else:
 */
  __pyx_t_3 = PyObject_TypeCheck(((PyObject *)__pyx_v_element), ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); 
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1307
 *     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 = 1307; __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;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1309
 *         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 = 1309; __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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1310
 *     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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1311
 *         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_kp_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __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 = 1311; __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 = 1311; __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) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1312
 *         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*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1314
 *                 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 = 1314; __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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1315
 *             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_kp_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1316
 *                 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 = 1316; __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 = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(__pyx_v_indentstr);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_indentstr);
  __Pyx_GIVEREF(__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_820), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1317
 *     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_821), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_xsi_ns);
  __pyx_v_xsi_ns = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1318
 *                                     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_822), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); 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_DECREF(__pyx_v_pytype_ns);
  __pyx_v_pytype_ns = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1319
 *     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 = 1319; __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_6 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
  } 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 = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_5))) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
    } else {
      __pyx_t_2 = PyIter_Next(__pyx_t_5);
      if (!__pyx_t_2) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
      PyObject* tuple = __pyx_t_2;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_3;
      __pyx_3 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_3;
      __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1320
 *     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_823))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1321
 *     for name, value in cetree.iterattributes(element, 3):
 *         if u'{' in name:
 *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
 *                 if value == TREE_PYTYPE_NAME:
 *                     continue
 */
      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_name, __pyx_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1322
 *         if u'{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
 *                     continue
 *                 else:
 */
        __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 = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_4) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1323
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:
 *                     continue             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = name.replace(pytype_ns, u'py:')
 */
          goto __pyx_L6_continue;
          goto __pyx_L10;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1325
 *                     continue
 *                 else:
 *                     name = name.replace(pytype_ns, u'py:')             # <<<<<<<<<<<<<<
 *             name = name.replace(xsi_ns, u'xsi:')
 *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_name, __pyx_kp_replace); 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);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_1));
          __Pyx_INCREF(__pyx_v_pytype_ns);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pytype_ns);
          __Pyx_GIVEREF(__pyx_v_pytype_ns);
          __Pyx_INCREF(((PyObject *)__pyx_kp_824));
          PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_824));
          __Pyx_GIVEREF(((PyObject *)__pyx_kp_824));
          __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_t_7;
          __pyx_t_7 = 0;
        }
        __pyx_L10:;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1326
 *                 else:
 *                     name = name.replace(pytype_ns, u'py:')
 *             name = name.replace(xsi_ns, u'xsi:')             # <<<<<<<<<<<<<<
 *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)
 * 
 */
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_name, __pyx_kp_replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_INCREF(__pyx_v_xsi_ns);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_xsi_ns);
      __Pyx_GIVEREF(__pyx_v_xsi_ns);
      __Pyx_INCREF(((PyObject *)__pyx_kp_825));
      PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_825));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_825));
      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1327
 *                     name = name.replace(pytype_ns, u'py:')
 *             name = name.replace(xsi_ns, u'xsi:')
 *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)             # <<<<<<<<<<<<<<
 * 
 *     indent = indent + 1
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_indentstr);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_indentstr);
    __Pyx_GIVEREF(__pyx_v_indentstr);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_826), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __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 = PyNumber_Add(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __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_result);
    __pyx_v_result = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_L6_continue:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1329
 *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)
 * 
 *     indent = indent + 1             # <<<<<<<<<<<<<<
 *     for child in element.iterchildren():
 *         result = result + _dump(child, indent)
 */
  __pyx_v_indent = (__pyx_v_indent + 1);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1330
 * 
 *     indent = indent + 1
 *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
 *         result = result + _dump(child, indent)
 *     if indent == 1:
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_kp_iterchildren); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
  } 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 = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_5))) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
    } else {
      __pyx_t_2 = PyIter_Next(__pyx_t_5);
      if (!__pyx_t_2) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_v_child);
    __pyx_v_child = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1331
 *     indent = indent + 1
 *     for child in element.iterchildren():
 *         result = result + _dump(child, indent)             # <<<<<<<<<<<<<<
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'
 */
    if (!(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child), __pyx_v_indent); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Add(__pyx_v_result, __pyx_t_2); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1332
 *     for child in element.iterchildren():
 *         result = 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1333
 *         result = result + _dump(child, indent)
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
 *     else:
 *         return result
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_2 = PySequence_GetSlice(__pyx_v_result, 0, -1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_2);
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L13;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1335
 *         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_L13:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify._dump");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_indentstr);
  __Pyx_DECREF(__pyx_v_value);
  __Pyx_DECREF(__pyx_v_result);
  __Pyx_DECREF(__pyx_v_xsi_ns);
  __Pyx_DECREF(__pyx_v_pytype_ns);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_child);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1341
 * # Pickle support
 * 
 * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
 *     return etree.ElementTree(fromstring(data))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify___unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify___unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("__unpickleElementTree");
  __pyx_self = __pyx_self;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1342
 * 
 * def __unpickleElementTree(data):
 *     return etree.ElementTree(fromstring(data))             # <<<<<<<<<<<<<<
 * 
 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_ElementTree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_fromstring); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __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_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_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.__unpickleElementTree");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1344
 *     return etree.ElementTree(fromstring(data))
 * 
 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):             # <<<<<<<<<<<<<<
 *     if python.IS_PYTHON3:
 *         import copyreg
 */

static  PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_elementReduceFunction, PyObject *__pyx_v_elementTreeReduceFunction) {
  PyObject *__pyx_v_copyreg;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("_setupPickle");
  __pyx_v_copyreg = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1345
 * 
 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
 *     if python.IS_PYTHON3:             # <<<<<<<<<<<<<<
 *         import copyreg
 *     else:
 */
  __pyx_t_1 = IS_PYTHON3;
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1346
 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
 *     if python.IS_PYTHON3:
 *         import copyreg             # <<<<<<<<<<<<<<
 *     else:
 *         import copy_reg as copyreg
 */
    __pyx_1 = __Pyx_Import(__pyx_kp_copyreg, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_v_copyreg);
    __pyx_v_copyreg = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1348
 *         import copyreg
 *     else:
 *         import copy_reg as copyreg             # <<<<<<<<<<<<<<
 *     copyreg.constructor(fromstring)
 *     copyreg.constructor(__unpickleElementTree)
 */
    __pyx_1 = __Pyx_Import(__pyx_kp_copy_reg, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_v_copyreg);
    __pyx_v_copyreg = __pyx_1;
    __pyx_1 = 0;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1349
 *     else:
 *         import copy_reg as copyreg
 *     copyreg.constructor(fromstring)             # <<<<<<<<<<<<<<
 *     copyreg.constructor(__unpickleElementTree)
 *     copyreg.pickle(ObjectifiedElement,
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_kp_constructor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_fromstring); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  __pyx_1 = 0;
  __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 = 1349; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1350
 *         import copy_reg as copyreg
 *     copyreg.constructor(fromstring)
 *     copyreg.constructor(__unpickleElementTree)             # <<<<<<<<<<<<<<
 *     copyreg.pickle(ObjectifiedElement,
 *                    elementReduceFunction, fromstring)
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_kp_constructor); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_827); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  __pyx_1 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __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_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1351
 *     copyreg.constructor(fromstring)
 *     copyreg.constructor(__unpickleElementTree)
 *     copyreg.pickle(ObjectifiedElement,             # <<<<<<<<<<<<<<
 *                    elementReduceFunction, fromstring)
 *     copyreg.pickle(etree._ElementTree,
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_kp_pickle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1352
 *     copyreg.constructor(__unpickleElementTree)
 *     copyreg.pickle(ObjectifiedElement,
 *                    elementReduceFunction, fromstring)             # <<<<<<<<<<<<<<
 *     copyreg.pickle(etree._ElementTree,
 *                    elementTreeReduceFunction, __unpickleElementTree)
 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_fromstring); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  __Pyx_INCREF(__pyx_v_elementReduceFunction);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_elementReduceFunction);
  __Pyx_GIVEREF(__pyx_v_elementReduceFunction);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  __pyx_1 = 0;
  __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 = 1351; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1353
 *     copyreg.pickle(ObjectifiedElement,
 *                    elementReduceFunction, fromstring)
 *     copyreg.pickle(etree._ElementTree,             # <<<<<<<<<<<<<<
 *                    elementTreeReduceFunction, __unpickleElementTree)
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_kp_pickle); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp__ElementTree); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1354
 *                    elementReduceFunction, fromstring)
 *     copyreg.pickle(etree._ElementTree,
 *                    elementTreeReduceFunction, __unpickleElementTree)             # <<<<<<<<<<<<<<
 * 
 * def pickleReduceElement(obj):
 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_827); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_elementTreeReduceFunction);
  __Pyx_GIVEREF(__pyx_v_elementTreeReduceFunction);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  __pyx_t_3 = 0;
  __pyx_1 = 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 = 1353; __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;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify._setupPickle");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_copyreg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1356
 *                    elementTreeReduceFunction, __unpickleElementTree)
 * 
 * def pickleReduceElement(obj):             # <<<<<<<<<<<<<<
 *     return (fromstring, (etree.tostring(obj),))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElement(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElement(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("pickleReduceElement");
  __pyx_self = __pyx_self;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1357
 * 
 * def pickleReduceElement(obj):
 *     return (fromstring, (etree.tostring(obj),))             # <<<<<<<<<<<<<<
 * 
 * def pickleReduceElementTree(obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_fromstring); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_tostring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __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 = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_obj);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __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 = 1357; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__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_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.pickleReduceElement");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1359
 *     return (fromstring, (etree.tostring(obj),))
 * 
 * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
 *     return (__unpickleElementTree, (etree.tostring(obj),))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("pickleReduceElementTree");
  __pyx_self = __pyx_self;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1360
 * 
 * def pickleReduceElementTree(obj):
 *     return (__unpickleElementTree, (etree.tostring(obj),))             # <<<<<<<<<<<<<<
 * 
 * _setupPickle(pickleReduceElement, pickleReduceElementTree)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_827); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_tostring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __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 = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_obj);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __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 = 1360; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
  __Pyx_GIVEREF(__pyx_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__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_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.pickleReduceElementTree");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1374
 *     cdef object empty_data_class
 *     cdef object tree_class
 *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
 *         u"""Lookup mechanism for objectify.
 * 
 */

static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___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        ";
static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___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;
  int __pyx_t_1;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_tree_class,&__pyx_kp_empty_data_class,0};
  __Pyx_SetupRefcountContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    values[0] = Py_None;
    values[1] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_tree_class);
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
      case  1:
      if (kw_args > 1) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_empty_data_class);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_tree_class = values[0];
    __pyx_v_empty_data_class = values[1];
  } else {
    __pyx_v_tree_class = Py_None;
    __pyx_v_empty_data_class = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_empty_data_class = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_tree_class = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__");
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_tree_class);
  __Pyx_INCREF(__pyx_v_empty_data_class);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1383
 *         empty data elements (defauls to StringElement).
 *         """
 *         self._lookup_function = _lookupElementClass             # <<<<<<<<<<<<<<
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement
 */
  ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1384
 *         """
 *         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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1385
 *         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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1386
 *         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(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
  ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class = __pyx_v_tree_class;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1387
 *             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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1388
 *         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_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1389
 *         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(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
  ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class = __pyx_v_empty_data_class;

  __pyx_r = 0;
  __Pyx_DECREF(__pyx_v_tree_class);
  __Pyx_DECREF(__pyx_v_empty_data_class);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1391
 *         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, struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) {
  struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup;
  PyObject *__pyx_v_dict_result;
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_prefix;
  PyObject *__pyx_v_el_class;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_SetupRefcountContext("_lookupElementClass");
  __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_el_class = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1394
 *     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_DECREF(((PyObject *)__pyx_v_lookup));
  __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1396
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1397
 *     # 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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1401
 *     # if element is defined as xsi:nil, return NoneElement class
 *     if u"true" == cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "nil"):             # <<<<<<<<<<<<<<
 *         return NoneElement
 * 
 */
  __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_829); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_kp_828), __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1402
 *     if u"true" == cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1406
 *     # 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_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_v_value);
  __pyx_v_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1407
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1408
 *         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_3 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1409
 *     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:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1410
 *         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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_value);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1411
 *             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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1412
 *         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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1417
 *     # check for XML Schema type hint
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<<
 * 
 *     if value is not None:
 */
  __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_830); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_v_value);
  __pyx_v_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1419
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1420
 * 
 *     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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_value);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1421
 *     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)
 */
    if ((__pyx_v_dict_result == NULL)) {
      __pyx_t_1 = (PySequence_Contains(__pyx_v_value, ((PyObject *)__pyx_kp_831))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __pyx_t_1;
    } else {
      __pyx_t_4 = (__pyx_v_dict_result == NULL);
    }
    if (__pyx_t_4) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1422
 *         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_3 = PyObject_GetAttr(__pyx_v_value, __pyx_kp_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_kp_832));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_832));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_832));
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __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_2)); __pyx_t_2 = 0;
      if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
        PyObject* tuple = __pyx_t_5;
        __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
        __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_v_prefix);
        __pyx_v_prefix = __pyx_2;
        __pyx_2 = 0;
        __Pyx_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_3;
        __pyx_3 = 0;
      } else {
        __pyx_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_2);
        __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_3);
        if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
        __Pyx_DECREF(__pyx_v_prefix);
        __pyx_v_prefix = __pyx_2;
        __pyx_2 = 0;
        __Pyx_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_3;
        __pyx_3 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1423
 *         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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_value);
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1424
 *             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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1425
 *             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_L10;
    }
    __pyx_L10:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1428
 * 
 *     # 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 = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_v_el_class);
  __pyx_v_el_class = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1429
 *     # 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1430
 *     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_L11;
  }
  __pyx_L11:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1433
 * 
 *     # 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
 * 
 */
  if (!(__pyx_v_c_node->parent == NULL)) {
    __pyx_t_4 = (!_isElement(__pyx_v_c_node->parent));
  } else {
    __pyx_t_4 = (__pyx_v_c_node->parent == NULL);
  }
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1434
 *     # 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_L12;
  }
  __pyx_L12:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1436
 *         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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify._lookupElementClass");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_lookup);
  __Pyx_DECREF(__pyx_v_value);
  __Pyx_DECREF(__pyx_v_prefix);
  __Pyx_DECREF(__pyx_v_el_class);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1442
 * # 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;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
  int __pyx_1;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_SetupRefcountContext("_check_type");
  __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1443
 * 
 * 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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1444
 * 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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1445
 *     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 = 1445; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1446
 *         return None
 *     value = textOf(c_node)
 *     try:             # <<<<<<<<<<<<<<
 *         pytype.type_check(value)
 *         return pytype
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1447
 *     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 = 1447; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(((PyObject *)__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(__pyx_v_pytype->type_check, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1448
 *     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_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L11_try_end;
    __pyx_L8_try_return:;
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L0;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1449
 *         pytype.type_check(value)
 *         return pytype
 *     except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
 *         # could not be parsed as the specified type => ignore
 *         pass
 */
    __pyx_1 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
    if (__pyx_1) {
      PyErr_Restore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __Pyx_XDECREF(__pyx_save_exc_type);
    __Pyx_XDECREF(__pyx_save_exc_value);
    __Pyx_XDECREF(__pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L11_try_end:;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1452
 *         # 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_3);
  __Pyx_AddTraceback("lxml.objectify._check_type");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_value);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1454
 *     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_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_pyannotate[] = "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 PyObject *__pyx_pf_4lxml_9objectify_pyannotate(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;
  struct LxmlElement *__pyx_v_element;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_element_or_tree,&__pyx_kp_ignore_old,&__pyx_kp_ignore_xsi,&__pyx_kp_empty_pytype,0};
  __Pyx_SetupRefcountContext("pyannotate");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[1] = __pyx_k_717;
    values[2] = __pyx_k_718;
    values[3] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_element_or_tree);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_ignore_old);
      if (value) { values[1] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_ignore_xsi);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_empty_pytype);
      if (value) { values[3] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "pyannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __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];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_ignore_old = __pyx_k_717;
    __pyx_v_ignore_xsi = __pyx_k_718;
    __pyx_v_empty_pytype = Py_None;
  }
  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 = 1454; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.pyannotate");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1474
 *     """
 *     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 = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_v_element));
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1475
 *     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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, Py_None, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __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.pyannotate");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1477
 *     _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_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_xsiannotate[] = "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 PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(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;
  struct LxmlElement *__pyx_v_element;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_element_or_tree,&__pyx_kp_ignore_old,&__pyx_kp_ignore_pytype,&__pyx_kp_empty_type,0};
  __Pyx_SetupRefcountContext("xsiannotate");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[1] = __pyx_k_719;
    values[2] = __pyx_k_720;
    values[3] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_element_or_tree);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_ignore_old);
      if (value) { values[1] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_ignore_pytype);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_empty_type);
      if (value) { values[3] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "xsiannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __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];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_ignore_old = __pyx_k_719;
    __pyx_v_ignore_pytype = __pyx_k_720;
    __pyx_v_empty_type = Py_None;
  }
  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 = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.xsiannotate");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1502
 *     """
 *     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 = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_v_element));
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1503
 *     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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; __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.xsiannotate");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1505
 *     _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_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_annotate[] = "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 PyObject *__pyx_pf_4lxml_9objectify_annotate(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;
  struct LxmlElement *__pyx_v_element;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_element_or_tree,&__pyx_kp_ignore_old,&__pyx_kp_ignore_xsi,&__pyx_kp_empty_pytype,&__pyx_kp_empty_type,&__pyx_kp_annotate_xsi,&__pyx_kp_annotate_pytype,0};
  __Pyx_SetupRefcountContext("annotate");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = __pyx_k_721;
    values[2] = __pyx_k_722;
    values[3] = Py_None;
    values[4] = Py_None;
    values[5] = __pyx_int_0;
    values[6] = __pyx_int_1;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_element_or_tree);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_ignore_old);
      if (value) { values[1] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_ignore_xsi);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_empty_pytype);
      if (value) { values[3] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_empty_type);
      if (value) { values[4] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_annotate_xsi);
      if (value) { values[5] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_annotate_pytype);
      if (value) { values[6] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "annotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __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];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_ignore_old = __pyx_k_721;
    __pyx_v_ignore_xsi = __pyx_k_722;
    __pyx_v_empty_pytype = Py_None;
    __pyx_v_empty_type = Py_None;
    __pyx_v_annotate_xsi = __pyx_int_0;
    __pyx_v_annotate_pytype = __pyx_int_1;
  }
  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 = 1505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.annotate");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1539
 *     """
 *     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 = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_v_element));
  __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1540
 *     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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1541
 *     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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __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 = 1540; __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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1544
 * 
 * 
 * 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;
  xmlNode *__pyx_v_c_node;
  xmlNs *__pyx_v_c_ns;
  PyObject *__pyx_v_dict_result;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType;
  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType;
  PyObject *__pyx_v_typename;
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_istree;
  PyObject *__pyx_v_prefix;
  PyObject *__pyx_v_old_pytypename;
  PyObject *__pyx_v_typename_utf8;
  PyObject *__pyx_v_name;
  PyObject *__pyx_v_pytype_name;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_SetupRefcountContext("_annotate");
  __Pyx_INCREF(__pyx_v_empty_type_name);
  __Pyx_INCREF(__pyx_v_empty_pytype_name);
  __pyx_v_doc = ((struct LxmlDocument *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_typename = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_istree = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_old_pytypename = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_typename_utf8 = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1553
 *     cdef PyType pytype, empty_pytype, StrType, NoneType
 * 
 *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  if ((!__pyx_v_annotate_xsi)) {
    __pyx_t_1 = (!__pyx_v_annotate_pytype);
  } else {
    __pyx_t_1 = (!__pyx_v_annotate_xsi);
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1554
 * 
 *     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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1556
 *         return
 * 
 *     doc = element._doc             # <<<<<<<<<<<<<<
 * 
 *     if empty_type_name is not None:
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_element->_doc));
  __Pyx_DECREF(((PyObject *)__pyx_v_doc));
  __pyx_v_doc = __pyx_v_element->_doc;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1558
 *     doc = element._doc
 * 
 *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
 *         if python.PyString_Check(empty_type_name):
 *             empty_type_name = python.PyUnicode_FromEncodedObject(
 */
  __pyx_t_1 = (__pyx_v_empty_type_name != Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1559
 * 
 *     if empty_type_name is not None:
 *         if python.PyString_Check(empty_type_name):             # <<<<<<<<<<<<<<
 *             empty_type_name = python.PyUnicode_FromEncodedObject(
 *                 empty_type_name, "ASCII", NULL)
 */
    __pyx_t_1 = PyString_Check(__pyx_v_empty_type_name);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1561
 *         if python.PyString_Check(empty_type_name):
 *             empty_type_name = python.PyUnicode_FromEncodedObject(
 *                 empty_type_name, "ASCII", NULL)             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 */
      __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_empty_type_name, __pyx_k_833, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_empty_type_name);
      __pyx_v_empty_type_name = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1562
 *             empty_type_name = python.PyUnicode_FromEncodedObject(
 *                 empty_type_name, "ASCII", NULL)
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)             # <<<<<<<<<<<<<<
 *     elif empty_pytype_name is not None:
 *         if python.PyString_Check(empty_pytype_name):
 */
    __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_empty_type_name);
    goto __pyx_L4;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1563
 *                 empty_type_name, "ASCII", NULL)
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
 *         if python.PyString_Check(empty_pytype_name):
 *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
 */
  __pyx_t_1 = (__pyx_v_empty_pytype_name != Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1564
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 *         if python.PyString_Check(empty_pytype_name):             # <<<<<<<<<<<<<<
 *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
 *                 empty_pytype_name, "ASCII", NULL)
 */
    __pyx_t_1 = PyString_Check(__pyx_v_empty_pytype_name);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1566
 *         if python.PyString_Check(empty_pytype_name):
 *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
 *                 empty_pytype_name, "ASCII", NULL)             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 *     else:
 */
      __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_empty_pytype_name, __pyx_k_834, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_empty_pytype_name);
      __pyx_v_empty_pytype_name = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1567
 *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
 *                 empty_pytype_name, "ASCII", NULL)
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)             # <<<<<<<<<<<<<<
 *     else:
 *         dict_result = NULL
 */
    __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_empty_pytype_name);
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1569
 *         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:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1570
 *     else:
 *         dict_result = NULL
 *     if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *         empty_pytype = <PyType>dict_result
 *     else:
 */
  __pyx_t_1 = (__pyx_v_dict_result != NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1571
 *         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_DECREF(((PyObject *)__pyx_v_empty_pytype));
    __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1573
 *         empty_pytype = <PyType>dict_result
 *     else:
 *         empty_pytype = None             # <<<<<<<<<<<<<<
 * 
 *     StrType  = _PYTYPE_DICT.get(u'str')
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF(((PyObject *)__pyx_v_empty_pytype));
    __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1575
 *         empty_pytype = None
 * 
 *     StrType  = _PYTYPE_DICT.get(u'str')             # <<<<<<<<<<<<<<
 *     NoneType = _PYTYPE_DICT.get(u'NoneType')
 *     c_node = element._c_node
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_kp_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __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 = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_kp_835));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_835));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_835));
  __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 = 1575; __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;
  if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_StrType));
  __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1576
 * 
 *     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)
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_kp_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_kp_836));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_836));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_836));
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __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_3)); __pyx_t_3 = 0;
  if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_NoneType));
  __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1577
 *     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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1578
 *     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);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1579
 *     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_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1580
 *     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_DECREF(__pyx_v_typename);
    __pyx_v_typename = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1581
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None
 *         pytype = None             # <<<<<<<<<<<<<<
 *         value  = None
 *         istree = 0
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
    __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1582
 *         typename = None
 *         pytype = None
 *         value  = None             # <<<<<<<<<<<<<<
 *         istree = 0
 *         # if element is defined as xsi:nil, represent it as None
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF(__pyx_v_value);
    __pyx_v_value = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1583
 *         pytype = None
 *         value  = None
 *         istree = 0             # <<<<<<<<<<<<<<
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF(__pyx_v_istree);
    __pyx_v_istree = __pyx_int_0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1586
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == u"true":             # <<<<<<<<<<<<<<
 *             pytype = NoneType
 * 
 */
    __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_837); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_838), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1587
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, "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:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1589
 *             pytype = NoneType
 * 
 *         if  pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 */
    __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_1) {
      __pyx_t_5 = (!__pyx_v_ignore_xsi);
    } else {
      __pyx_t_5 = __pyx_t_1;
    }
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1592
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<<
 *             if typename is not None:
 *                 dict_result = python.PyDict_GetItem(
 */
      __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_839); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_v_typename);
      __pyx_v_typename = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1593
 *             typename = cetree.attributeValueFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 *             if typename is not None:             # <<<<<<<<<<<<<<
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)
 */
      __pyx_t_5 = (__pyx_v_typename != Py_None);
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1595
 *             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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_typename);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1596
 *                 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(
 */
        if ((__pyx_v_dict_result == NULL)) {
          __pyx_t_5 = (PySequence_Contains(__pyx_v_typename, ((PyObject *)__pyx_kp_840))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_1 = __pyx_t_5;
        } else {
          __pyx_t_1 = (__pyx_v_dict_result == NULL);
        }
        if (__pyx_t_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1597
 *                     _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_3 = PyObject_GetAttr(__pyx_v_typename, __pyx_kp_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_2));
          __Pyx_INCREF(((PyObject *)__pyx_kp_841));
          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_841));
          __Pyx_GIVEREF(((PyObject *)__pyx_kp_841));
          __Pyx_INCREF(__pyx_int_1);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
          __Pyx_GIVEREF(__pyx_int_1);
          __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
            PyObject* tuple = __pyx_t_4;
            __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
            __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_v_prefix);
            __pyx_v_prefix = __pyx_2;
            __pyx_2 = 0;
            __Pyx_DECREF(__pyx_v_typename);
            __pyx_v_typename = __pyx_3;
            __pyx_3 = 0;
          } else {
            __pyx_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_2);
            __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_3);
            if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
            __Pyx_DECREF(__pyx_v_prefix);
            __pyx_v_prefix = __pyx_2;
            __pyx_2 = 0;
            __Pyx_DECREF(__pyx_v_typename);
            __pyx_v_typename = __pyx_3;
            __pyx_3 = 0;
          }

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1599
 *                     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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_typename);
          goto __pyx_L12;
        }
        __pyx_L12:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1600
 *                     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) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1601
 *                         _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);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1602
 *                 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) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1606
 *                         # anyway, so just accept it if given as type
 *                         # information
 *                         pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
 *                         if pytype is None:
 *                             typename = None
 */
            __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
            __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
            __pyx_t_4 = 0;

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1607
 *                         # 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) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1608
 *                         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_L15;
            }
            __pyx_L15:;
            goto __pyx_L14;
          }
          __pyx_L14:;
          goto __pyx_L13;
        }
        __pyx_L13:;
        goto __pyx_L11;
      }
      __pyx_L11:;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1610
 *                             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_5 = (!__pyx_v_ignore_pytype);
    } else {
      __pyx_t_5 = __pyx_t_1;
    }
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1613
 *             # 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_4 = attributeValueFromNsName(__pyx_v_c_node, __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 = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_v_old_pytypename);
      __pyx_v_old_pytypename = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1614
 *             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_5 = (__pyx_v_old_pytypename != Py_None);
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1615
 *                 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_4 = PyObject_RichCompare(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_5) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1616
 *             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_5 = (!hasChild(__pyx_v_c_node));
          if (__pyx_t_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1619
 *                         # 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_L19;
          }
          __pyx_L19:;
          goto __pyx_L18;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1621
 *                         pytype = TREE_PYTYPE
 *                 else:
 *                     if old_pytypename == u'none':             # <<<<<<<<<<<<<<
 *                         # transition from lxml 1.x
 *                         old_pytypename = u"NoneType"
 */
          __pyx_t_4 = PyObject_RichCompare(__pyx_v_old_pytypename, ((PyObject *)__pyx_kp_842), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1623
 *                     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_kp_843));
            __Pyx_DECREF(__pyx_v_old_pytypename);
            __pyx_v_old_pytypename = ((PyObject *)__pyx_kp_843);
            goto __pyx_L20;
          }
          __pyx_L20:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1625
 *                         old_pytypename = u"NoneType"
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)             # <<<<<<<<<<<<<<
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result
 */
          __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_old_pytypename);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1626
 *                     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_5 = (__pyx_v_dict_result != NULL);
          if (__pyx_t_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1627
 *                         _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);

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1628
 *                     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_5 = (__pyx_v_pytype != __pyx_v_StrType);
            if (__pyx_t_5) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1632
 *                             # default anyway, so just accept it if given as
 *                             # type information
 *                             pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
 * 
 *         if pytype is None:
 */
              __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
              __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
              __pyx_t_4 = 0;
              goto __pyx_L22;
            }
            __pyx_L22:;
            goto __pyx_L21;
          }
          __pyx_L21:;
        }
        __pyx_L18:;
        goto __pyx_L17;
      }
      __pyx_L17:;
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1634
 *                             pytype = _check_type(c_node, pytype)
 * 
 *         if pytype is None:             # <<<<<<<<<<<<<<
 *             # try to guess type
 *             if not cetree.hasChild(c_node):
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1636
 *         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_5 = (!hasChild(__pyx_v_c_node));
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1638
 *             if not cetree.hasChild(c_node):
 *                 # element has no children => data class
 *                 pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<<
 *             else:
 *                 istree = 1
 */
        __pyx_t_4 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_4, __pyx_v_StrType)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __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_v_pytype));
        __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L24;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1640
 *                 pytype = _guessPyType(textOf(c_node), StrType)
 *             else:
 *                 istree = 1             # <<<<<<<<<<<<<<
 * 
 *         if pytype is None:
 */
        __Pyx_INCREF(__pyx_int_1);
        __Pyx_DECREF(__pyx_v_istree);
        __pyx_v_istree = __pyx_int_1;
      }
      __pyx_L24:;
      goto __pyx_L23;
    }
    __pyx_L23:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1642
 *                 istree = 1
 * 
 *         if pytype is None:             # <<<<<<<<<<<<<<
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1644
 *         if pytype is None:
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
 *                 pytype = StrType
 *             else:
 */
      __pyx_t_5 = hasText(__pyx_v_c_node);
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1645
 *             # 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_L26;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1647
 *                 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;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1648
 *             else:
 *                 pytype = empty_pytype
 *                 if typename is None:             # <<<<<<<<<<<<<<
 *                     typename = empty_type_name
 * 
 */
        __pyx_t_5 = (__pyx_v_typename == Py_None);
        if (__pyx_t_5) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1649
 *                 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_L27;
        }
        __pyx_L27:;
      }
      __pyx_L26:;
      goto __pyx_L25;
    }
    __pyx_L25:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1651
 *                     typename = empty_type_name
 * 
 *         if pytype is not None:             # <<<<<<<<<<<<<<
 *             if typename is None:
 *                 if not istree:
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_pytype) != Py_None);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1652
 * 
 *         if pytype is not None:
 *             if typename is None:             # <<<<<<<<<<<<<<
 *                 if not istree:
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
 */
      __pyx_t_5 = (__pyx_v_typename == Py_None);
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1653
 *         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_5 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_1 = (!__pyx_t_5);
        if (__pyx_t_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1654
 *             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_1 = (PyList_GET_SIZE(((PyObject *)__pyx_v_pytype->_schema_types)) > 0);
          if (__pyx_t_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1657
 *                         # 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]
 */
            __pyx_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_1);
            __Pyx_DECREF(__pyx_v_typename);
            __pyx_v_typename = __pyx_1;
            __pyx_1 = 0;
            goto __pyx_L31;
          }
          __pyx_L31:;
          goto __pyx_L30;
        }
        __pyx_L30:;
        goto __pyx_L29;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1658
 *                         # simply take the first
 *                         typename = pytype._schema_types[0]
 *             elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
 *                 typename = pytype._schema_types[0]
 * 
 */
      __pyx_t_1 = (!PySequence_Contains(((PyObject *)__pyx_v_pytype->_schema_types), __pyx_v_typename)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1659
 *                         typename = pytype._schema_types[0]
 *             elif typename not in pytype._schema_types:
 *                 typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
 * 
 *         if annotate_xsi:
 */
        __pyx_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_2);
        __Pyx_DECREF(__pyx_v_typename);
        __pyx_v_typename = __pyx_2;
        __pyx_2 = 0;
        goto __pyx_L29;
      }
      __pyx_L29:;
      goto __pyx_L28;
    }
    __pyx_L28:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1661
 *                 typename = pytype._schema_types[0]
 * 
 *         if annotate_xsi:             # <<<<<<<<<<<<<<
 *             if typename is None or istree:
 *                 cetree.delAttributeFromNsName(
 */
    __pyx_t_1 = __pyx_v_annotate_xsi;
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1662
 * 
 *         if annotate_xsi:
 *             if typename is None or istree:             # <<<<<<<<<<<<<<
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 */
      __pyx_t_1 = (__pyx_v_typename == Py_None);
      if (!__pyx_t_1) {
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = __pyx_t_5;
      } else {
        __pyx_t_6 = __pyx_t_1;
      }
      if (__pyx_t_6) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1664
 *             if typename is None or istree:
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<<
 *             else:
 *                 # update or create attribute
 */
        delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_844);
        goto __pyx_L33;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1667
 *             else:
 *                 # update or create attribute
 *                 typename_utf8 = cetree.utf8(typename)             # <<<<<<<<<<<<<<
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
 */
        __pyx_t_2 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_v_typename_utf8);
        __pyx_v_typename_utf8 = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1669
 *                 typename_utf8 = cetree.utf8(typename)
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')             # <<<<<<<<<<<<<<
 *                 if c_ns is not NULL:
 *                     if ':' in typename_utf8:
 */
        __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_NS, __pyx_k_845);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1670
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
 *                 if c_ns is not NULL:             # <<<<<<<<<<<<<<
 *                     if ':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(':', 1)
 */
        __pyx_t_6 = (__pyx_v_c_ns != NULL);
        if (__pyx_t_6) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1671
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
 *                 if c_ns is not NULL:
 *                     if ':' in typename_utf8:             # <<<<<<<<<<<<<<
 *                         prefix, name = typename_utf8.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 */
          __pyx_t_6 = (PySequence_Contains(__pyx_v_typename_utf8, __pyx_kp_846)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_6) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1672
 *                 if c_ns is not NULL:
 *                     if ':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(':', 1)             # <<<<<<<<<<<<<<
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name
 */
            __pyx_t_2 = PyObject_GetAttr(__pyx_v_typename_utf8, __pyx_kp_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_4));
            __Pyx_INCREF(__pyx_kp_847);
            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_847);
            __Pyx_GIVEREF(__pyx_kp_847);
            __Pyx_INCREF(__pyx_int_1);
            PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
            __Pyx_GIVEREF(__pyx_int_1);
            __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
            if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
              PyObject* tuple = __pyx_t_3;
              __pyx_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_1);
              __pyx_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_v_prefix);
              __pyx_v_prefix = __pyx_1;
              __pyx_1 = 0;
              __Pyx_DECREF(__pyx_v_name);
              __pyx_v_name = __pyx_2;
              __pyx_2 = 0;
            } else {
              __pyx_3 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_3);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_1 = __Pyx_UnpackItem(__pyx_3, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_1);
              __pyx_2 = __Pyx_UnpackItem(__pyx_3, 1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_2);
              if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
              __Pyx_DECREF(__pyx_v_prefix);
              __pyx_v_prefix = __pyx_1;
              __pyx_1 = 0;
              __Pyx_DECREF(__pyx_v_name);
              __pyx_v_name = __pyx_2;
              __pyx_2 = 0;
            }

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1673
 *                     if ':' in typename_utf8:
 *                         prefix, name = typename_utf8.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
 *                             typename_utf8 = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 */
            if (!(__pyx_v_c_ns->prefix == NULL)) {
              __pyx_t_6 = ((__pyx_v_c_ns->prefix[0]) == '\x00');
            } else {
              __pyx_t_6 = (__pyx_v_c_ns->prefix == NULL);
            }
            if (__pyx_t_6) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1674
 *                         prefix, name = typename_utf8.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name             # <<<<<<<<<<<<<<
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix
 */
              __Pyx_INCREF(__pyx_v_name);
              __Pyx_DECREF(__pyx_v_typename_utf8);
              __pyx_v_typename_utf8 = __pyx_v_name;
              goto __pyx_L36;
            }

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1675
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename_utf8 = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
 *                             prefix = c_ns.prefix
 *                             typename_utf8 = prefix + ':' + name
 */
            __pyx_t_6 = (strcmp(PyString_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0);
            if (__pyx_t_6) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1676
 *                             typename_utf8 = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix             # <<<<<<<<<<<<<<
 *                             typename_utf8 = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 */
              __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_v_prefix);
              __pyx_v_prefix = __pyx_t_3;
              __pyx_t_3 = 0;

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1677
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix
 *                             typename_utf8 = prefix + ':' + name             # <<<<<<<<<<<<<<
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix
 */
              __pyx_t_3 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_848); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_v_typename_utf8);
              __pyx_v_typename_utf8 = __pyx_t_4;
              __pyx_t_4 = 0;
              goto __pyx_L36;
            }
            __pyx_L36:;
            goto __pyx_L35;
          }

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1678
 *                             prefix = c_ns.prefix
 *                             typename_utf8 = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
 *                         prefix = c_ns.prefix
 *                         typename_utf8 = prefix + ':' + typename_utf8
 */
          if (!(__pyx_v_c_ns->prefix != NULL)) {
            __pyx_t_6 = ((__pyx_v_c_ns->prefix[0]) != '\x00');
          } else {
            __pyx_t_6 = (__pyx_v_c_ns->prefix != NULL);
          }
          if (__pyx_t_6) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1679
 *                             typename_utf8 = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix             # <<<<<<<<<<<<<<
 *                         typename_utf8 = prefix + ':' + typename_utf8
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 */
            __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __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;

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1680
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix
 *                         typename_utf8 = prefix + ':' + typename_utf8             # <<<<<<<<<<<<<<
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 */
            __pyx_t_4 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_849); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_v_typename_utf8);
            __pyx_v_typename_utf8 = __pyx_t_3;
            __pyx_t_3 = 0;
            goto __pyx_L35;
          }
          __pyx_L35:;
          goto __pyx_L34;
        }
        __pyx_L34:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1682
 *                         typename_utf8 = prefix + ':' + typename_utf8
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')             # <<<<<<<<<<<<<<
 *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))
 * 
 */
        __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_850);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1683
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))             # <<<<<<<<<<<<<<
 * 
 *         if annotate_pytype:
 */
        xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_k_851, PyString_AS_STRING(__pyx_v_typename_utf8));
      }
      __pyx_L33:;
      goto __pyx_L32;
    }
    __pyx_L32:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1685
 *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))
 * 
 *         if annotate_pytype:             # <<<<<<<<<<<<<<
 *             if pytype is None:
 *                 # delete attribute if it exists
 */
    __pyx_t_6 = __pyx_v_annotate_pytype;
    if (__pyx_t_6) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1686
 * 
 *         if annotate_pytype:
 *             if pytype is None:             # <<<<<<<<<<<<<<
 *                 # delete attribute if it exists
 *                 cetree.delAttributeFromNsName(
 */
      __pyx_t_6 = (((PyObject *)__pyx_v_pytype) == Py_None);
      if (__pyx_t_6) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1689
 *                 # 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_L38;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1693
 *                 # update or create attribute
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _PYTYPE_NAMESPACE, '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, __pyx_k_852);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1694
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _PYTYPE_NAMESPACE, 'py')
 *                 pytype_name = cetree.utf8(pytype.name)             # <<<<<<<<<<<<<<
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _cstr(pytype_name))
 */
        __pyx_t_3 = utf8(__pyx_v_pytype->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_v_pytype_name);
        __pyx_v_pytype_name = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1696
 *                 pytype_name = cetree.utf8(pytype.name)
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _cstr(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, PyString_AS_STRING(__pyx_v_pytype_name));

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1697
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _cstr(pytype_name))
 *                 if pytype is NoneType:             # <<<<<<<<<<<<<<
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 */
        __pyx_t_6 = (__pyx_v_pytype == __pyx_v_NoneType);
        if (__pyx_t_6) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1699
 *                 if pytype is NoneType:
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')             # <<<<<<<<<<<<<<
 *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "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, __pyx_k_853);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1700
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")             # <<<<<<<<<<<<<<
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 */
          xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_k_854, __pyx_k_855);
          goto __pyx_L39;
        }
        __pyx_L39:;
      }
      __pyx_L38:;
      goto __pyx_L37;
    }
    __pyx_L37:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1701
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<<
 * 
 * cdef object _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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify._annotate");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_doc);
  __Pyx_DECREF((PyObject *)__pyx_v_pytype);
  __Pyx_DECREF((PyObject *)__pyx_v_empty_pytype);
  __Pyx_DECREF((PyObject *)__pyx_v_StrType);
  __Pyx_DECREF((PyObject *)__pyx_v_NoneType);
  __Pyx_DECREF(__pyx_v_typename);
  __Pyx_DECREF(__pyx_v_value);
  __Pyx_DECREF(__pyx_v_istree);
  __Pyx_DECREF(__pyx_v_prefix);
  __Pyx_DECREF(__pyx_v_old_pytypename);
  __Pyx_DECREF(__pyx_v_typename_utf8);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_pytype_name);
  __Pyx_DECREF(__pyx_v_empty_type_name);
  __Pyx_DECREF(__pyx_v_empty_pytype_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1706
 * _strip_attributes = etree.strip_attributes
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):             # <<<<<<<<<<<<<<
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_deannotate[] = "deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=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    ";
static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element_or_tree = 0;
  PyObject *__pyx_v_pytype = 0;
  PyObject *__pyx_v_xsi = 0;
  PyObject *__pyx_v_xsi_nil = 0;
  PyObject *__pyx_v_attribute_names = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_element_or_tree,&__pyx_kp_pytype,&__pyx_kp_xsi,&__pyx_kp_xsi_nil,0};
  __Pyx_SetupRefcountContext("deannotate");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[1] = __pyx_k_723;
    values[2] = __pyx_k_724;
    values[3] = __pyx_k_725;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_element_or_tree);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_pytype);
      if (value) { values[1] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_xsi);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_xsi_nil);
      if (value) { values[3] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "deannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_element_or_tree = values[0];
    __pyx_v_pytype = values[1];
    __pyx_v_xsi = values[2];
    __pyx_v_xsi_nil = values[3];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_pytype = __pyx_k_723;
    __pyx_v_xsi = __pyx_k_724;
    __pyx_v_xsi_nil = __pyx_k_725;
  }
  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 = 1706; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.deannotate");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1718
 *     attributes will be removed.
 *     """
 *     cdef list attribute_names = []             # <<<<<<<<<<<<<<
 * 
 *     if pytype:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_attribute_names = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1720
 *     cdef list attribute_names = []
 * 
 *     if pytype:             # <<<<<<<<<<<<<<
 *         attribute_names.append(PYTYPE_ATTRIBUTE)
 *     if xsi:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pytype); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1721
 * 
 *     if pytype:
 *         attribute_names.append(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
 *     if xsi:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1722
 *     if pytype:
 *         attribute_names.append(PYTYPE_ATTRIBUTE)
 *     if xsi:             # <<<<<<<<<<<<<<
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *     if xsi_nil:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xsi); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1723
 *         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_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1724
 *     if xsi:
 *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *     if xsi_nil:             # <<<<<<<<<<<<<<
 *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xsi_nil); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1725
 *         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_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1727
 *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
 * 
 *     _strip_attributes(element_or_tree, *attribute_names)             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1 = PySequence_Tuple(((PyObject *)__pyx_v_attribute_names)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __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_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.deannotate");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attribute_names);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1739
 * objectify_parser = __DEFAULT_PARSER
 * 
 * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
 *     u"""set_default_parser(new_parser = None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_set_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 PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_new_parser = 0;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_new_parser,0};
  __Pyx_SetupRefcountContext("set_default_parser");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_new_parser);
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_default_parser") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_new_parser = values[0];
  } else {
    __pyx_v_new_parser = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  1: __pyx_v_new_parser = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1739; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.set_default_parser");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1750
 *     """
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1751
 *     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_GOTREF(__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_L6;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1752
 *     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_kp_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __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 = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1753
 *         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_GOTREF(__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_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1755
 *         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_856), 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L6:;

  __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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1757
 *         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_makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_makeparser[] = "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 PyObject *__pyx_pf_4lxml_9objectify_makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_v_remove_blank_text;
  PyObject *__pyx_v_parser;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("makeparser");
  __pyx_self = __pyx_self;
  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_v_remove_blank_text = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_parser = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1767
 *     ``remove_blank_text`` boolean keyword option yourself.
 *     """
 *     if python.IS_PYTHON3:             # <<<<<<<<<<<<<<
 *         remove_blank_text = u'remove_blank_text'
 *     else:
 */
  __pyx_t_1 = IS_PYTHON3;
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1768
 *     """
 *     if python.IS_PYTHON3:
 *         remove_blank_text = u'remove_blank_text'             # <<<<<<<<<<<<<<
 *     else:
 *         remove_blank_text = 'remove_blank_text'
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_857));
    __Pyx_DECREF(__pyx_v_remove_blank_text);
    __pyx_v_remove_blank_text = ((PyObject *)__pyx_kp_857);
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1770
 *         remove_blank_text = u'remove_blank_text'
 *     else:
 *         remove_blank_text = 'remove_blank_text'             # <<<<<<<<<<<<<<
 *     if remove_blank_text not in kw:
 *         kw[remove_blank_text] = True
 */
    __Pyx_INCREF(__pyx_kp_858);
    __Pyx_DECREF(__pyx_v_remove_blank_text);
    __pyx_v_remove_blank_text = __pyx_kp_858;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1771
 *     else:
 *         remove_blank_text = 'remove_blank_text'
 *     if remove_blank_text not in kw:             # <<<<<<<<<<<<<<
 *         kw[remove_blank_text] = True
 *     parser = etree.XMLParser(**kw)
 */
  __pyx_t_1 = (!PySequence_Contains(__pyx_v_kw, __pyx_v_remove_blank_text)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1772
 *         remove_blank_text = 'remove_blank_text'
 *     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 = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetItem(__pyx_v_kw, __pyx_v_remove_blank_text, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1773
 *     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_kp_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), __pyx_v_kw); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_parser);
  __pyx_v_parser = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1774
 *         kw[remove_blank_text] = True
 *     parser = etree.XMLParser(**kw)
 *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
 *     return parser
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_kp_726); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1775
 *     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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kw);
  __Pyx_DECREF(__pyx_v_remove_blank_text);
  __Pyx_DECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1777
 *     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;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_SetupRefcountContext("_makeElement");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1778
 * 
 * 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 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)Py_None), __pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_text, Py_None, __pyx_v_attrib, __pyx_v_nsmap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct LxmlElement *)__pyx_t_1);
  __pyx_t_1 = 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_AddTraceback("lxml.objectify._makeElement");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1786
 * _fromstring = etree.fromstring
 * 
 * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""fromstring(xml, parser=None, base_url=None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_fromstring[] = "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 PyObject *__pyx_pf_4lxml_9objectify_fromstring(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 = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_xml,&__pyx_kp_parser,&__pyx_kp_base_url,0};
  __Pyx_SetupRefcountContext("fromstring");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    values[1] = Py_None;
    values[2] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_xml);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_parser);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_base_url);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fromstring") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_xml = values[0];
    __pyx_v_parser = values[1];
    __pyx_v_base_url = values[2];
  } else {
    __pyx_v_parser = Py_None;
    __pyx_v_base_url = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_xml = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1786; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.fromstring");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_parser);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1798
 *     (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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1799
 *     """
 *     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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1800
 *     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 = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  if (PyDict_SetItem(__pyx_1, __pyx_kp_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.fromstring");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1802
 *     return _fromstring(xml, parser, base_url=base_url)
 * 
 * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""XML(xml, parser=None, base_url=None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_XML[] = "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 PyObject *__pyx_pf_4lxml_9objectify_XML(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 = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_xml,&__pyx_kp_parser,&__pyx_kp_base_url,0};
  __Pyx_SetupRefcountContext("XML");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    values[1] = Py_None;
    values[2] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_xml);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_parser);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_base_url);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "XML") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_xml = values[0];
    __pyx_v_parser = values[1];
    __pyx_v_base_url = values[2];
  } else {
    __pyx_v_parser = Py_None;
    __pyx_v_base_url = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_xml = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.XML");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_parser);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1814
 *     (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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1815
 *     """
 *     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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1816
 *     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 = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  if (PyDict_SetItem(__pyx_1, __pyx_kp_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.XML");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1821
 * _parse = etree.parse
 * 
 * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
 *     u"""parse(f, parser=None, base_url=None)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_parse[] = "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 PyObject *__pyx_pf_4lxml_9objectify_parse(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 = NULL;
  PyObject *__pyx_1 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_f,&__pyx_kp_parser,&__pyx_kp_base_url,0};
  __Pyx_SetupRefcountContext("parse");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    values[1] = Py_None;
    values[2] = Py_None;
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_f);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_parser);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
    }
    while (kw_args > 0) {
      PyObject* value;
      value = PyDict_GetItem(__pyx_kwds, __pyx_kp_base_url);
      if (value) { values[2] = value; if (!(--kw_args)) break; }
      break;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_f = values[0];
    __pyx_v_parser = values[1];
    __pyx_v_base_url = values[2];
  } else {
    __pyx_v_parser = Py_None;
    __pyx_v_base_url = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1821; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("lxml.objectify.parse");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_parser);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1832
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1833
 *     """
 *     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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1834
 *     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 = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  if (PyDict_SetItem(__pyx_1, __pyx_kp_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__parse, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_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_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify.parse");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_parser);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1843
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
 *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_Element[] = "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 PyObject *__pyx_pf_4lxml_9objectify_Element(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 = NULL;
  PyObject *__pyx_1 = 0;
  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;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp__tag,&__pyx_kp_attrib,&__pyx_kp_nsmap,&__pyx_kp__pytype,0};
  __Pyx_SetupRefcountContext("Element");
  __pyx_self = __pyx_self;
  __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
  __Pyx_GOTREF(__pyx_v__attributes);
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[4] = {0,0,0,0};
    values[1] = Py_None;
    values[2] = Py_None;
    values[3] = Py_None;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp__tag);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_attrib);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
      case  2:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_nsmap);
        if (unlikely(value)) { values[2] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, PyTuple_GET_SIZE(__pyx_args), "Element") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v__tag = values[0];
    __pyx_v_attrib = values[1];
    __pyx_v_nsmap = values[2];
    __pyx_v__pytype = values[3];
  } else {
    __pyx_v_attrib = Py_None;
    __pyx_v_nsmap = Py_None;
    __pyx_v__pytype = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: __pyx_v_nsmap = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: __pyx_v_attrib = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v__tag = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1843; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v__attributes);
  __Pyx_AddTraceback("lxml.objectify.Element");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_nsmap);
  __Pyx_INCREF(__pyx_v__pytype);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1851
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1852
 *     """
 *     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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1853
 *     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_kp_update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __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 = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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 = 1853; __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_L7;
    }
    __pyx_L7:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1854
 *         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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1855
 *             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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1856
 *         _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_L8;
  }
  __pyx_L8:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1857
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1858
 *         _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_L9;
  }
  __pyx_L9:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1859
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  if (PyObject_SetItem(__pyx_v__attributes, __pyx_1, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1860
 *         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 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, Py_None, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __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_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("lxml.objectify.Element");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v__attributes);
  __Pyx_DECREF(__pyx_v_nsmap);
  __Pyx_DECREF(__pyx_v__pytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1862
 *     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)
 */

static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_DataElement[] = "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 PyObject *__pyx_pf_4lxml_9objectify_DataElement(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_v_dict_result;
  PyObject *__pyx_v_temp;
  PyObject *__pyx_v_prefix;
  PyObject *__pyx_v_name;
  PyObject *__pyx_v_ns;
  PyObject *__pyx_v_strval;
  PyObject *__pyx_v_type_check;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp__value,&__pyx_kp_attrib,&__pyx_kp_nsmap,&__pyx_kp__pytype,&__pyx_kp__xsi,0};
  __Pyx_SetupRefcountContext("DataElement");
  __pyx_self = __pyx_self;
  __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
  __Pyx_GOTREF(__pyx_v__attributes);
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = Py_None;
    values[2] = Py_None;
    values[3] = Py_None;
    values[4] = Py_None;
    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);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp__value);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_attrib);
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
      case  2:
      if (kw_args > 0) {
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_nsmap);
        if (unlikely(value)) { values[2] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, PyTuple_GET_SIZE(__pyx_args), "DataElement") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L3_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];
  } else {
    __pyx_v_attrib = Py_None;
    __pyx_v_nsmap = Py_None;
    __pyx_v__pytype = Py_None;
    __pyx_v__xsi = Py_None;
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: __pyx_v_nsmap = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: __pyx_v_attrib = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v__value = PyTuple_GET_ITEM(__pyx_args, 0);
      break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  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 = 1862; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v__attributes);
  __Pyx_AddTraceback("lxml.objectify.DataElement");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_attrib);
  __Pyx_INCREF(__pyx_v_nsmap);
  __Pyx_INCREF(__pyx_v__pytype);
  __Pyx_INCREF(__pyx_v__xsi);
  __pyx_v_temp = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_strval = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1878
 *     """
 *     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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1879
 *     cdef python.PyObject* dict_result
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
 *     if attrib is not None and attrib:
 *         if python.PyDict_Size(_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_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1880
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
 *         if python.PyDict_Size(_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 = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1881
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:
 *         if python.PyDict_Size(_attributes):             # <<<<<<<<<<<<<<
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)
 */
    __pyx_t_4 = PyDict_Size(__pyx_v__attributes);
    if (__pyx_t_4) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1882
 *     if attrib is not None and attrib:
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
 *             attrib.update(_attributes)
 *         _attributes = attrib
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_INCREF(__pyx_v_attrib);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attrib);
      __Pyx_GIVEREF(__pyx_v_attrib);
      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_attrib);
      __pyx_v_attrib = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1883
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_attrib, __pyx_kp_update); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1884
 *             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_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1885
 *             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_3 = PyObject_TypeCheck(__pyx_v__value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement))); 
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1886
 *         _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) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1887
 *     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 = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if ((!__pyx_t_1)) {
          __pyx_t_2 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
          __pyx_t_8 = __pyx_t_2;
        } else {
          __pyx_t_8 = (!__pyx_t_1);
        }
        __pyx_t_1 = __pyx_t_8;
      } else {
        __pyx_t_1 = __pyx_t_3;
      }
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1889
 *             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_7 = PyObject_GetAttr(__pyx_v__value, __pyx_kp___copy__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;
        goto __pyx_L11;
      }
      __pyx_L11:;
      goto __pyx_L10;
    }
    __pyx_L10:;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1890
 *                 # special case: no change!
 *                 return _value.__copy__()
 *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap
 */
  __pyx_t_1 = PyObject_TypeCheck(__pyx_v__value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); 
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1892
 *     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_5 = PyObject_GetAttr(__pyx_v__value, __pyx_kp_nsmap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1893
 *         # 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_1 = (__pyx_v_temp != Py_None);
    if (__pyx_t_1) {
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = __pyx_t_3;
    } else {
      __pyx_t_8 = __pyx_t_1;
    }
    if (__pyx_t_8) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1894
 *         temp = _value.nsmap
 *         if temp is not None and temp:
 *             temp = dict(temp)             # <<<<<<<<<<<<<<
 *             temp.update(nsmap)
 *             nsmap = temp
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__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_7 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_temp);
      __pyx_v_temp = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1895
 *         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_7 = PyObject_GetAttr(__pyx_v_temp, __pyx_kp_update); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_INCREF(__pyx_v_nsmap);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_nsmap);
      __Pyx_GIVEREF(__pyx_v_nsmap);
      __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1896
 *             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_L13;
    }
    __pyx_L13:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1898
 *             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_6 = PyObject_GetAttr(__pyx_v__value, __pyx_kp_attrib); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_v_temp);
    __pyx_v_temp = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1899
 *         # 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_8 = (__pyx_v_temp != Py_None);
    if (__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __pyx_t_1;
    } else {
      __pyx_t_3 = __pyx_t_8;
    }
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1900
 *         temp = _value.attrib
 *         if temp is not None and temp:
 *             temp = dict(temp)             # <<<<<<<<<<<<<<
 *             temp.update(_attributes)
 *             _attributes = temp
 */
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __Pyx_INCREF(__pyx_v_temp);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_temp);
      __Pyx_GIVEREF(__pyx_v_temp);
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_v_temp);
      __pyx_v_temp = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1901
 *         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_5 = PyObject_GetAttr(__pyx_v_temp, __pyx_kp_update); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __Pyx_INCREF(__pyx_v__attributes);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__attributes);
      __Pyx_GIVEREF(__pyx_v__attributes);
      __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __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_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1902
 *             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_L14;
    }
    __pyx_L14:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1905
 *         # 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_8 = (__pyx_v__pytype == Py_None);
      __pyx_t_1 = __pyx_t_8;
    } else {
      __pyx_t_1 = __pyx_t_3;
    }
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1907
 *         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_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1908
 *             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_1 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1909
 *                                                 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_L16;
      }
      __pyx_L16:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1910
 *             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_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_1);
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1911
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
 *                 _pytype = <object>dict_result
 * 
 */
      __pyx_t_1 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1912
 *             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_L17;
      }
      __pyx_L17:;
      goto __pyx_L15;
    }
    __pyx_L15:;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1914
 *                 _pytype = <object>dict_result
 * 
 *     if _xsi is not None:             # <<<<<<<<<<<<<<
 *         if u':' in _xsi:
 *             prefix, name = _xsi.split(u':', 1)
 */
  __pyx_t_1 = (__pyx_v__xsi != Py_None);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1915
 * 
 *     if _xsi is not None:
 *         if u':' in _xsi:             # <<<<<<<<<<<<<<
 *             prefix, name = _xsi.split(u':', 1)
 *             ns = nsmap.get(prefix)
 */
    __pyx_t_1 = (PySequence_Contains(__pyx_v__xsi, ((PyObject *)__pyx_kp_859))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1916
 *     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_7 = PyObject_GetAttr(__pyx_v__xsi, __pyx_kp_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __Pyx_INCREF(((PyObject *)__pyx_kp_860));
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_860));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_860));
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
        PyObject* tuple = __pyx_t_5;
        __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
        __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_v_prefix);
        __pyx_v_prefix = __pyx_2;
        __pyx_2 = 0;
        __Pyx_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_3;
        __pyx_3 = 0;
      } else {
        __pyx_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_2);
        __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_3);
        if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
        __Pyx_DECREF(__pyx_v_prefix);
        __pyx_v_prefix = __pyx_2;
        __pyx_2 = 0;
        __Pyx_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_3;
        __pyx_3 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1917
 *         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_kp_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __Pyx_INCREF(__pyx_v_prefix);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_prefix);
      __Pyx_GIVEREF(__pyx_v_prefix);
      __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __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_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_v_ns);
      __pyx_v_ns = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1918
 *             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_7 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1919
 *             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_861), 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L20;
      }
      __pyx_L20:;
      goto __pyx_L19;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1920
 *             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_1 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1921
 *                 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_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_v__xsi;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1922
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi
 *             _xsi = u'xsd:' + _xsi             # <<<<<<<<<<<<<<
 *         else:
 *             name = _xsi
 */
      __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_kp_862), __pyx_v__xsi); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_v__xsi);
      __pyx_v__xsi = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L19;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1924
 *             _xsi = u'xsd:' + _xsi
 *         else:
 *             name = _xsi             # <<<<<<<<<<<<<<
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:
 */
      __Pyx_INCREF(__pyx_v__xsi);
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_v__xsi;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1925
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_kp_items); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7);
      } else {
        __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
        } else if (likely(PyTuple_CheckExact(__pyx_t_7))) {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
        } else {
          __pyx_t_6 = PyIter_Next(__pyx_t_7);
          if (!__pyx_t_6) {
            if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (PyTuple_CheckExact(__pyx_t_6) && likely(PyTuple_GET_SIZE(__pyx_t_6) == 2)) {
          PyObject* tuple = __pyx_t_6;
          __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
          __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_v_prefix);
          __pyx_v_prefix = __pyx_2;
          __pyx_2 = 0;
          __Pyx_DECREF(__pyx_v_ns);
          __pyx_v_ns = __pyx_3;
          __pyx_3 = 0;
        } else {
          __pyx_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_2);
          __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_3);
          if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
          __Pyx_DECREF(__pyx_v_prefix);
          __pyx_v_prefix = __pyx_2;
          __pyx_2 = 0;
          __Pyx_DECREF(__pyx_v_ns);
          __pyx_v_ns = __pyx_3;
          __pyx_3 = 0;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1926
 *             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_6 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1927
 *             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_1 = (__pyx_v_prefix != Py_None);
          if (__pyx_t_1) {
            __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_8 = __pyx_t_3;
          } else {
            __pyx_t_8 = __pyx_t_1;
          }
          if (__pyx_t_8) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1928
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + u':' + _xsi             # <<<<<<<<<<<<<<
 *                     break
 *             else:
 */
            __pyx_t_6 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_863)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_v__xsi); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_v__xsi);
            __pyx_v__xsi = __pyx_t_5;
            __pyx_t_5 = 0;
            goto __pyx_L24;
          }
          __pyx_L24:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1929
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + u':' + _xsi
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError, u"XSD types require the XSD namespace"
 */
          goto __pyx_L22_break;
          goto __pyx_L23;
        }
        __pyx_L23:;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1931
 *                     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_864), 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L22_break:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L19:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1932
 *             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 = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1933
 *                 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_8 = (__pyx_v__pytype == Py_None);
    if (__pyx_t_8) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1935
 *         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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v__xsi);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1936
 *             # 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_8 = (__pyx_v_dict_result == NULL);
      if (__pyx_t_8) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1937
 *             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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_name);
        goto __pyx_L26;
      }
      __pyx_L26:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1938
 *             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_8 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_8) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1939
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:
 *                 _pytype = (<PyType>dict_result).name             # <<<<<<<<<<<<<<
 * 
 *     if _value is None and _pytype != u"str":
 */
        __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_L27;
      }
      __pyx_L27:;
      goto __pyx_L25;
    }
    __pyx_L25:;
    goto __pyx_L18;
  }
  __pyx_L18:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1941
 *                 _pytype = (<PyType>dict_result).name
 * 
 *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
 *         _pytype = _pytype or u"NoneType"
 *         strval = None
 */
  __pyx_t_8 = (__pyx_v__value == Py_None);
  if (__pyx_t_8) {
    __pyx_t_7 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_kp_865), Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_3 = __pyx_t_8;
  }
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1942
 * 
 *     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 = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_3) {
      __Pyx_INCREF(((PyObject *)__pyx_kp_866));
      __pyx_t_7 = __pyx_kp_866;
    } else {
      __Pyx_INCREF(__pyx_v__pytype);
      __pyx_t_7 = __pyx_v__pytype;
    }
    __Pyx_DECREF(__pyx_v__pytype);
    __pyx_v__pytype = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1943
 *     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_DECREF(__pyx_v_strval);
    __pyx_v_strval = Py_None;
    goto __pyx_L28;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1944
 *         _pytype = _pytype or u"NoneType"
 *         strval = None
 *     elif python._isString(_value):             # <<<<<<<<<<<<<<
 *         strval = _value
 *     elif python.PyBool_Check(_value):
 */
  __pyx_t_3 = _isString(__pyx_v__value);
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1945
 *         strval = None
 *     elif python._isString(_value):
 *         strval = _value             # <<<<<<<<<<<<<<
 *     elif python.PyBool_Check(_value):
 *         if _value:
 */
    __Pyx_INCREF(__pyx_v__value);
    __Pyx_DECREF(__pyx_v_strval);
    __pyx_v_strval = __pyx_v__value;
    goto __pyx_L28;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1946
 *     elif python._isString(_value):
 *         strval = _value
 *     elif python.PyBool_Check(_value):             # <<<<<<<<<<<<<<
 *         if _value:
 *             strval = u"true"
 */
  __pyx_t_3 = PyBool_Check(__pyx_v__value);
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1947
 *         strval = _value
 *     elif python.PyBool_Check(_value):
 *         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 = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1948
 *     elif python.PyBool_Check(_value):
 *         if _value:
 *             strval = u"true"             # <<<<<<<<<<<<<<
 *         else:
 *             strval = u"false"
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_867));
      __Pyx_DECREF(__pyx_v_strval);
      __pyx_v_strval = ((PyObject *)__pyx_kp_867);
      goto __pyx_L29;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1950
 *             strval = u"true"
 *         else:
 *             strval = u"false"             # <<<<<<<<<<<<<<
 *     else:
 *         strval = unicode(_value)
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_868));
      __Pyx_DECREF(__pyx_v_strval);
      __pyx_v_strval = ((PyObject *)__pyx_kp_868);
    }
    __pyx_L29:;
    goto __pyx_L28;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1952
 *             strval = u"false"
 *     else:
 *         strval = unicode(_value)             # <<<<<<<<<<<<<<
 * 
 *     if _pytype is None:
 */
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    __Pyx_INCREF(__pyx_v__value);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__value);
    __Pyx_GIVEREF(__pyx_v__value);
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_v_strval);
    __pyx_v_strval = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L28:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1954
 *         strval = unicode(_value)
 * 
 *     if _pytype is None:             # <<<<<<<<<<<<<<
 *         _pytype = _pytypename(_value)
 * 
 */
  __pyx_t_3 = (__pyx_v__pytype == Py_None);
  if (__pyx_t_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1955
 * 
 *     if _pytype is None:
 *         _pytype = _pytypename(_value)             # <<<<<<<<<<<<<<
 * 
 *     if _pytype is not None:
 */
    __pyx_t_5 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_v__pytype);
    __pyx_v__pytype = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L30;
  }
  __pyx_L30:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1957
 *         _pytype = _pytypename(_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) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1958
 * 
 *     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_5 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_kp_869), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __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 = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!__pyx_t_3) {
      __pyx_t_5 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_kp_870), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __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 = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __pyx_t_8;
    } else {
      __pyx_t_1 = __pyx_t_3;
    }
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1959
 *     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;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1960
 *         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_kp_871)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L32;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1963
 *         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_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v__pytype);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1964
 *             # 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_1 = (__pyx_v_dict_result != NULL);
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1965
 *             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_DECREF(__pyx_v_type_check);
        __pyx_v_type_check = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1966
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:             # <<<<<<<<<<<<<<
 *                     type_check(strval)
 * 
 */
        __pyx_t_1 = (__pyx_v_type_check != Py_None);
        if (__pyx_t_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1967
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:
 *                     type_check(strval)             # <<<<<<<<<<<<<<
 * 
 *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
 */
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_5));
          __Pyx_INCREF(__pyx_v_strval);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_strval);
          __Pyx_GIVEREF(__pyx_v_strval);
          __pyx_t_7 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L34;
        }
        __pyx_L34:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1969
 *                     type_check(strval)
 * 
 *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
 * 
 *     return _makeElement(u"value", strval, _attributes, nsmap)
 */
        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_1);
        if (PyObject_SetItem(__pyx_v__attributes, __pyx_1, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
        goto __pyx_L33;
      }
      __pyx_L33:;
    }
    __pyx_L32:;
    goto __pyx_L31;
  }
  __pyx_L31:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1971
 *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
 * 
 *     return _makeElement(u"value", strval, _attributes, nsmap)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(((PyObject *)__pyx_kp_872), __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("lxml.objectify.DataElement");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v__attributes);
  __Pyx_DECREF(__pyx_v_temp);
  __Pyx_DECREF(__pyx_v_prefix);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_ns);
  __Pyx_DECREF(__pyx_v_strval);
  __Pyx_DECREF(__pyx_v_type_check);
  __Pyx_DECREF(__pyx_v_attrib);
  __Pyx_DECREF(__pyx_v_nsmap);
  __Pyx_DECREF(__pyx_v__pytype);
  __Pyx_DECREF(__pyx_v__xsi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  int __pyx_r;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_t_5;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_path,0};
  __Pyx_SetupRefcountContext("__init__");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_path);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_path = values[0];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 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__");
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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-HEAD/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(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_v_path;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_GetAttr(((PyObject *)__pyx_kp_873), __pyx_kp_join); 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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __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_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
    __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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__
 */
  ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len = PyList_GET_SIZE(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_5 = __pyx_f_4lxml_9objectify__buildObjectPathSegments(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path = __pyx_t_5;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_4 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___call__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
  __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
  ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find = __pyx_t_4;
  __pyx_t_4 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self) {
  int __pyx_t_1;
  __Pyx_SetupRefcountContext("__dealloc__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":33
 * 
 *     def __dealloc__(self):
 *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
 *             python.PyMem_Free(self._c_path)
 * 
 */
  __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path != NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path);
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_FinishRefcountContext();
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_SetupRefcountContext("__str__");

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
  __pyx_r = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str;
  goto __pyx_L0;

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

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath___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        ";
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct LxmlElement *__pyx_v_root = 0;
  PyObject *__pyx_v_default = 0;
  Py_ssize_t __pyx_v_use_default;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_root,0};
  __Pyx_SetupRefcountContext("__call__");
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_default = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); __Pyx_GOTREF(__pyx_v_default);
    if (unlikely(!__pyx_v_default)) return NULL;
  } else {
    __pyx_v_default = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      default:
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_root);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
    }
    if (unlikely(kw_args > 0)) {
      const Py_ssize_t used_pos_args = (PyTuple_GET_SIZE(__pyx_args) < 1) ? PyTuple_GET_SIZE(__pyx_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;}
    }
    __pyx_v_root = ((struct LxmlElement *)values[0]);
  } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 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_AddTraceback("lxml.objectify.ObjectPath.__call__");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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-HEAD/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-HEAD/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-HEAD/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-HEAD/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_L6;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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-HEAD/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_874), 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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-HEAD/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, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_default);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_hasattr[] = "hasattr(self, root)";
static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
  PyObject *__pyx_r = NULL;
  int __pyx_1;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_SetupRefcountContext("hasattr");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    __Pyx_XGOTREF(__pyx_save_exc_type);
    __Pyx_XGOTREF(__pyx_save_exc_value);
    __Pyx_XGOTREF(__pyx_save_exc_tb);
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = __pyx_f_4lxml_9objectify__findObjectPath(((struct LxmlElement *)__pyx_v_root), ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len, Py_None, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":61
 *         try:
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return False
 *         return True
 */
    __pyx_1 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_1) {
      __Pyx_AddTraceback("lxml.objectify.hasattr");
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L8_except_return;
      __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;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XDECREF(__pyx_save_exc_type);
    __Pyx_XDECREF(__pyx_save_exc_value);
    __Pyx_XDECREF(__pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_save_exc_type);
    __Pyx_XGIVEREF(__pyx_save_exc_value);
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L12_try_end:;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __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.ObjectPath.hasattr");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_setattr[] = "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_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct LxmlElement *__pyx_v_root = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_root,&__pyx_kp_value,0};
  __Pyx_SetupRefcountContext("setattr");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_root);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_value);
      if (likely(values[1])) 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, PyTuple_GET_SIZE(__pyx_args), "setattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_root = ((struct LxmlElement *)values[0]);
    __pyx_v_value = values[1];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 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");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_10ObjectPath_addattr[] = "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_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct LxmlElement *__pyx_v_root = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_root,&__pyx_kp_value,0};
  __Pyx_SetupRefcountContext("addattr");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_root);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_value);
      if (likely(values[1])) 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, PyTuple_GET_SIZE(__pyx_args), "addattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_root = ((struct LxmlElement *)values[0]);
    __pyx_v_value = values[1];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 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");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__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_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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;
  PyObject *__pyx_v_match;
  PyObject *__pyx_v_dot;
  PyObject *__pyx_v_ns;
  PyObject *__pyx_v_name;
  PyObject *__pyx_v_index;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_SetupRefcountContext("_parseObjectPathString");
  __Pyx_INCREF(__pyx_v_path);
  __pyx_v_path_pos = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_match = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_dot = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":95
 *     """
 *     cdef bint has_dot
 *     cdef list new_path = []             # <<<<<<<<<<<<<<
 *     if python.PyString_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(((PyObject *)__pyx_t_1));
  __pyx_v_new_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":96
 *     cdef bint has_dot
 *     cdef list new_path = []
 *     if python.PyString_Check(path):             # <<<<<<<<<<<<<<
 *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
 *     path = path.strip()
 */
  __pyx_t_2 = PyString_Check(__pyx_v_path);
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":97
 *     cdef list new_path = []
 *     if python.PyString_Check(path):
 *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)             # <<<<<<<<<<<<<<
 *     path = path.strip()
 *     if path == u'.':
 */
    __pyx_t_1 = PyUnicode_FromEncodedObject(__pyx_v_path, __pyx_k_875, 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-HEAD/src/lxml/objectpath.pxi":98
 *     if python.PyString_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_kp_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-HEAD/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_3 = PyObject_RichCompare(__pyx_v_path, ((PyObject *)__pyx_kp_876), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((PyObject *)__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-HEAD/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_DECREF(__pyx_v_path_pos);
  __pyx_v_path_pos = __pyx_int_0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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-HEAD/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(((PyObject *)__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_DECREF(__pyx_v_match);
    __pyx_v_match = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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-HEAD/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-HEAD/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_kp_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 (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 4)) {
      PyObject* tuple = __pyx_t_3;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __pyx_4 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_4);
      __pyx_5 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_dot);
      __pyx_v_dot = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_ns);
      __pyx_v_ns = __pyx_3;
      __pyx_3 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_4;
      __pyx_4 = 0;
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_5;
      __pyx_5 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      __pyx_4 = __Pyx_UnpackItem(__pyx_1, 2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_4);
      __pyx_5 = __Pyx_UnpackItem(__pyx_1, 3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_5);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_dot);
      __pyx_v_dot = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_ns);
      __pyx_v_ns = __pyx_3;
      __pyx_3 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_4;
      __pyx_4 = 0;
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_5;
      __pyx_5 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_4 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = (!__pyx_t_4);
    } else {
      __pyx_t_5 = __pyx_t_2;
    }
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_L8;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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(((PyObject *)__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_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyObject_RichCompare(__pyx_v_dot, ((PyObject *)__pyx_kp_877), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_has_dot = __pyx_t_5;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_5 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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)
 */
      __pyx_t_5 = __pyx_v_has_dot;
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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 = PyList_Append(((PyObject *)__pyx_v_new_path), __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_878), 0);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;
      goto __pyx_L9;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_5 = (!__pyx_v_has_dot);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_879), 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_5 = (__pyx_v_ns != Py_None);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyUnicode_AsUTF8String(__pyx_v_ns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_v_ns);
      __pyx_v_ns = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    __pyx_t_6 = PyList_Append(((PyObject *)__pyx_v_new_path), ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyObject_GetAttr(__pyx_v_match, __pyx_kp_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __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 = 126; __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_pos);
    __pyx_v_path_pos = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L6_break:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_5 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
  if (!__pyx_t_5) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_path_pos, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (__pyx_t_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_880), 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_4);
  __Pyx_XDECREF(__pyx_5);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify._parseObjectPathString");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_path);
  __Pyx_DECREF(__pyx_v_path_pos);
  __Pyx_DECREF(__pyx_v_match);
  __Pyx_DECREF(__pyx_v_dot);
  __Pyx_DECREF(__pyx_v_ns);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_index);
  __Pyx_DECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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) {
  char *__pyx_v_index_pos;
  char *__pyx_v_index_end;
  char *__pyx_v_c_name;
  PyObject *__pyx_v_new_path = 0;
  PyObject *__pyx_v_item;
  PyObject *__pyx_v_ns;
  PyObject *__pyx_v_name;
  PyObject *__pyx_v_index;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_SetupRefcountContext("_parseObjectPathList");
  __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":138
 *     cdef char* index_end
 *     cdef 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(((PyObject *)__pyx_t_1));
  __pyx_v_new_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":139
 *     cdef 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_2 = 0; __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1);
  } 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);
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_1))) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
    } else {
      __pyx_t_3 = PyIter_Next(__pyx_t_1);
      if (!__pyx_t_3) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_3 = PyObject_GetAttr(__pyx_v_item, __pyx_kp_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_item);
    __pyx_v_item = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_5 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
    if (__pyx_t_5) {
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_item, ((PyObject *)__pyx_kp_881), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_5;
    }
    if (__pyx_t_7) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_DECREF(__pyx_v_ns);
      __pyx_v_ns = Py_None;
      __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = Py_None;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_int_0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":146
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<<
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 */
      __pyx_t_4 = getNsTag(__pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
        PyObject* tuple = __pyx_t_4;
        __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
        __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_v_ns);
        __pyx_v_ns = __pyx_2;
        __pyx_2 = 0;
        __Pyx_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_3;
        __pyx_3 = 0;
      } else {
        __pyx_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_2);
        __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_3);
        if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
        __Pyx_DECREF(__pyx_v_ns);
        __pyx_v_ns = __pyx_2;
        __pyx_2 = 0;
        __Pyx_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_3;
        __pyx_3 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":147
 *         else:
 *             ns, name = cetree.getNsTag(item)
 *             c_name = _cstr(name)             # <<<<<<<<<<<<<<
 *             index_pos = cstd.strchr(c_name, c'[')
 *             if index_pos is NULL:
 */
      __pyx_v_c_name = PyString_AS_STRING(__pyx_v_name);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":148
 *             ns, name = cetree.getNsTag(item)
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')             # <<<<<<<<<<<<<<
 *             if index_pos is NULL:
 *                 index = 0
 */
      __pyx_v_index_pos = strchr(__pyx_v_c_name, '[');

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":149
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 *             if index_pos is NULL:             # <<<<<<<<<<<<<<
 *                 index = 0
 *             else:
 */
      __pyx_t_7 = (__pyx_v_index_pos == NULL);
      if (__pyx_t_7) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":150
 *             index_pos = cstd.strchr(c_name, c'[')
 *             if index_pos is NULL:
 *                 index = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 index_end = cstd.strchr(index_pos + 1, c']')
 */
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_int_0;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":152
 *                 index = 0
 *             else:
 *                 index_end = cstd.strchr(index_pos + 1, c']')             # <<<<<<<<<<<<<<
 *                 if index_end is NULL:
 *                     raise ValueError, u"index must be enclosed in []"
 */
        __pyx_v_index_end = strchr((__pyx_v_index_pos + 1), ']');

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":153
 *             else:
 *                 index_end = cstd.strchr(index_pos + 1, c']')
 *                 if index_end is NULL:             # <<<<<<<<<<<<<<
 *                     raise ValueError, u"index must be enclosed in []"
 *                 index = int(
 */
        __pyx_t_7 = (__pyx_v_index_end == NULL);
        if (__pyx_t_7) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":154
 *                 index_end = cstd.strchr(index_pos + 1, c']')
 *                 if index_end is NULL:
 *                     raise ValueError, u"index must be enclosed in []"             # <<<<<<<<<<<<<<
 *                 index = int(
 *                     python.PyString_FromStringAndSize(
 */
          __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_882), 0);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L7;
        }
        __pyx_L7:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":157
 *                 index = int(
 *                     python.PyString_FromStringAndSize(
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))             # <<<<<<<<<<<<<<
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, u"index not allowed on root node"
 */
        __pyx_t_4 = PyString_FromStringAndSize((__pyx_v_index_pos + 1), ((Py_ssize_t)((__pyx_v_index_end - __pyx_v_index_pos) - 1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__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(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __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_v_index);
        __pyx_v_index = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":158
 *                     python.PyString_FromStringAndSize(
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:             # <<<<<<<<<<<<<<
 *                     raise ValueError, u"index not allowed on root node"
 *                 name = python.PyString_FromStringAndSize(
 */
        __pyx_t_7 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
        if (__pyx_t_7) {
          __pyx_t_4 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __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_7;
        }
        if (__pyx_t_6) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":159
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
 *                 name = python.PyString_FromStringAndSize(
 *                     c_name, <Py_ssize_t>(index_pos - c_name))
 */
          __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_883), 0);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L8;
        }
        __pyx_L8:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":161
 *                     raise ValueError, u"index not allowed on root node"
 *                 name = python.PyString_FromStringAndSize(
 *                     c_name, <Py_ssize_t>(index_pos - c_name))             # <<<<<<<<<<<<<<
 *         new_path.append( (ns, name, index) )
 *     if python.PyList_GET_SIZE(new_path) == 0:
 */
        __pyx_t_4 = PyString_FromStringAndSize(__pyx_v_c_name, ((Py_ssize_t)(__pyx_v_index_pos - __pyx_v_c_name))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L6:;
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":162
 *                 name = python.PyString_FromStringAndSize(
 *                     c_name, <Py_ssize_t>(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_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_new_path), ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":163
 *                     c_name, <Py_ssize_t>(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_6 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
  if (__pyx_t_6) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":164
 *         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_884), 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":165
 *     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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify._parseObjectPathList");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_path);
  __Pyx_DECREF(__pyx_v_item);
  __Pyx_DECREF(__pyx_v_ns);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":167
 *     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;
  PyObject *__pyx_v_name;
  PyObject *__pyx_v_index;
  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  __Pyx_SetupRefcountContext("_buildObjectPathSegments");
  __pyx_v_href = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":171
 *     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:
 *         python.PyErr_NoMemory()
 */
  __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-HEAD/src/lxml/objectpath.pxi":172
 *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
 *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 */
  __pyx_t_1 = (__pyx_v_c_path_segments == NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":173
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
 *     if c_path_segments is NULL:
 *         python.PyErr_NoMemory()             # <<<<<<<<<<<<<<
 *     c_path = c_path_segments
 *     for href, name, index in path_list:
 */
    __pyx_t_2 = PyErr_NoMemory(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":174
 *     if c_path_segments is NULL:
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments             # <<<<<<<<<<<<<<
 *     for href, name, index in path_list:
 *         if href is None:
 */
  __pyx_v_c_path = __pyx_v_c_path_segments;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":175
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
 *         if href is None:
 *             c_path[0].href = NULL
 */
  if (PyList_CheckExact(__pyx_v_path_list) || PyTuple_CheckExact(__pyx_v_path_list)) {
    __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_path_list; __Pyx_INCREF(__pyx_t_2);
  } 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 = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_t_2))) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
    } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
    } else {
      __pyx_t_4 = PyIter_Next(__pyx_t_2);
      if (!__pyx_t_4) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 3)) {
      PyObject* tuple = __pyx_t_4;
      __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
      __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
      __pyx_4 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_href);
      __pyx_v_href = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_3;
      __pyx_3 = 0;
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_4;
      __pyx_4 = 0;
    } else {
      __pyx_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_2);
      __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_3);
      __pyx_4 = __Pyx_UnpackItem(__pyx_1, 2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_4);
      if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
      __Pyx_DECREF(__pyx_v_href);
      __pyx_v_href = __pyx_2;
      __pyx_2 = 0;
      __Pyx_DECREF(__pyx_v_name);
      __pyx_v_name = __pyx_3;
      __pyx_3 = 0;
      __Pyx_DECREF(__pyx_v_index);
      __pyx_v_index = __pyx_4;
      __pyx_4 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":176
 *     c_path = c_path_segments
 *     for href, name, index in path_list:
 *         if href is None:             # <<<<<<<<<<<<<<
 *             c_path[0].href = NULL
 *         else:
 */
    __pyx_t_1 = (__pyx_v_href == Py_None);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":177
 *     for href, name, index in path_list:
 *         if href is None:
 *             c_path[0].href = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             c_path[0].href = _cstr(href)
 */
      (__pyx_v_c_path[0]).href = NULL;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":179
 *             c_path[0].href = NULL
 *         else:
 *             c_path[0].href = _cstr(href)             # <<<<<<<<<<<<<<
 *         if name is None:
 *             c_path[0].name = NULL
 */
      (__pyx_v_c_path[0]).href = PyString_AS_STRING(__pyx_v_href);
    }
    __pyx_L6:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":180
 *         else:
 *             c_path[0].href = _cstr(href)
 *         if name is None:             # <<<<<<<<<<<<<<
 *             c_path[0].name = NULL
 *         else:
 */
    __pyx_t_1 = (__pyx_v_name == Py_None);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":181
 *             c_path[0].href = _cstr(href)
 *         if name is None:
 *             c_path[0].name = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             c_path[0].name = _cstr(name)
 */
      (__pyx_v_c_path[0]).name = NULL;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":183
 *             c_path[0].name = NULL
 *         else:
 *             c_path[0].name = _cstr(name)             # <<<<<<<<<<<<<<
 *         c_path[0].index = index
 *         c_path = c_path + 1
 */
      (__pyx_v_c_path[0]).name = PyString_AS_STRING(__pyx_v_name);
    }
    __pyx_L7:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":184
 *         else:
 *             c_path[0].name = _cstr(name)
 *         c_path[0].index = index             # <<<<<<<<<<<<<<
 *         c_path = c_path + 1
 *     return c_path_segments
 */
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_c_path[0]).index = __pyx_t_5;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":185
 *             c_path[0].name = _cstr(name)
 *         c_path[0].index = index
 *         c_path = 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-HEAD/src/lxml/objectpath.pxi":186
 *         c_path[0].index = index
 *         c_path = 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_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_4);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify._buildObjectPathSegments");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_href);
  __Pyx_DECREF(__pyx_v_name);
  __Pyx_DECREF(__pyx_v_index);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":188
 *     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;
  char *__pyx_v_c_href;
  char *__pyx_v_c_name;
  Py_ssize_t __pyx_v_c_index;
  PyObject *__pyx_v_tag;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_SetupRefcountContext("_findObjectPath");
  __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":196
 *     cdef char* c_name
 *     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-HEAD/src/lxml/objectpath.pxi":197
 *     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-HEAD/src/lxml/objectpath.pxi":198
 *     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-HEAD/src/lxml/objectpath.pxi":199
 *     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):
 */
  if (!(__pyx_v_c_href == NULL)) {
    __pyx_t_1 = ((__pyx_v_c_href[0]) == '\x00');
  } else {
    __pyx_t_1 = (__pyx_v_c_href == NULL);
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":200
 *     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-HEAD/src/lxml/objectpath.pxi":201
 *     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_1 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":202
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         if use_default:             # <<<<<<<<<<<<<<
 *             return default_value
 *         else:
 */
    __pyx_t_2 = __pyx_v_use_default;
    if (__pyx_t_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":203
 *     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-HEAD/src/lxml/objectpath.pxi":207
 *             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_3 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_kp_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __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[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_885), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":209
 *                 (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_node is not NULL:             # <<<<<<<<<<<<<<
 *         c_path_len = c_path_len - 1
 *         if c_path_len <= 0:
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_c_node != NULL);
    if (!__pyx_t_1) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":210
 * 
 *     while c_node is not NULL:
 *         c_path_len = 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-HEAD/src/lxml/objectpath.pxi":211
 *     while c_node is not NULL:
 *         c_path_len = c_path_len - 1
 *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_1 = (__pyx_v_c_path_len <= 0);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":212
 *         c_path_len = c_path_len - 1
 *         if c_path_len <= 0:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         c_path = c_path + 1
 */
      goto __pyx_L7_break;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":214
 *             break
 * 
 *         c_path = 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-HEAD/src/lxml/objectpath.pxi":215
 * 
 *         c_path = 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_1 = ((__pyx_v_c_path[0]).href != NULL);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":216
 *         c_path = 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-HEAD/src/lxml/objectpath.pxi":217
 *         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-HEAD/src/lxml/objectpath.pxi":218
 *             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_1 = (__pyx_v_c_name == NULL);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":219
 *         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-HEAD/src/lxml/objectpath.pxi":220
 *         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-HEAD/src/lxml/objectpath.pxi":221
 *             c_name = c_path[0].name
 *             c_node = NULL
 *             break             # <<<<<<<<<<<<<<
 *         c_index = c_path[0].index
 * 
 */
      goto __pyx_L7_break;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":222
 *             c_node = NULL
 *             break
 *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
 * 
 *         if c_index < 0:
 */
    __pyx_v_c_index = (__pyx_v_c_path[0]).index;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":224
 *         c_index = c_path[0].index
 * 
 *         if c_index < 0:             # <<<<<<<<<<<<<<
 *             c_node = c_node.last
 *         else:
 */
    __pyx_t_1 = (__pyx_v_c_index < 0);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":225
 * 
 *         if c_index < 0:
 *             c_node = c_node.last             # <<<<<<<<<<<<<<
 *         else:
 *             c_node = c_node.children
 */
      __pyx_v_c_node = __pyx_v_c_node->last;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":227
 *             c_node = c_node.last
 *         else:
 *             c_node = c_node.children             # <<<<<<<<<<<<<<
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
 * 
 */
      __pyx_v_c_node = __pyx_v_c_node->children;
    }
    __pyx_L11:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":228
 *         else:
 *             c_node = 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-HEAD/src/lxml/objectpath.pxi":230
 *         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_1 = (__pyx_v_c_node != NULL);
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":231
 * 
 *     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_4 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L12;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":232
 *     if c_node is not NULL:
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:             # <<<<<<<<<<<<<<
 *         return default_value
 *     else:
 */
  __pyx_t_2 = __pyx_v_use_default;
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":233
 *         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_L12;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":235
 *         return default_value
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)             # <<<<<<<<<<<<<<
 *         raise AttributeError, u"no such child: " + tag
 * 
 */
    __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __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;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":236
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
 *         raise AttributeError, u"no such child: " + tag             # <<<<<<<<<<<<<<
 * 
 * cdef _createObjectPath(_Element root, _ObjectPath* c_path,
 */
    __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_886), __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_4, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L12:;

  __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._findObjectPath");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":238
 *         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;
  xmlNode *__pyx_v_c_node;
  xmlNode *__pyx_v_c_child;
  char *__pyx_v_c_href;
  char *__pyx_v_c_name;
  Py_ssize_t __pyx_v_c_index;
  PyObject *__pyx_v_element;
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_SetupRefcountContext("_createObjectPath");
  __pyx_v_child = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_element = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":250
 *     cdef char* c_name
 *     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-HEAD/src/lxml/objectpath.pxi":251
 *     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_887), 0);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":253
 *         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-HEAD/src/lxml/objectpath.pxi":254
 * 
 *     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-HEAD/src/lxml/objectpath.pxi":255
 *     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-HEAD/src/lxml/objectpath.pxi":256
 *     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):
 */
  if (!(__pyx_v_c_href == NULL)) {
    __pyx_t_1 = ((__pyx_v_c_href[0]) == '\x00');
  } else {
    __pyx_t_1 = (__pyx_v_c_href == NULL);
  }
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":257
 *     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-HEAD/src/lxml/objectpath.pxi":258
 *     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_1 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
  if (__pyx_t_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":261
 *         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_2 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_kp_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_888), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_3, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":263
 *             (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_path_len > 1:             # <<<<<<<<<<<<<<
 *         c_path_len = c_path_len - 1
 *         c_path = c_path + 1
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_c_path_len > 1);
    if (!__pyx_t_1) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":264
 * 
 *     while c_path_len > 1:
 *         c_path_len = c_path_len - 1             # <<<<<<<<<<<<<<
 *         c_path = 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-HEAD/src/lxml/objectpath.pxi":265
 *     while c_path_len > 1:
 *         c_path_len = c_path_len - 1
 *         c_path = 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-HEAD/src/lxml/objectpath.pxi":266
 *         c_path_len = c_path_len - 1
 *         c_path = 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_1 = ((__pyx_v_c_path[0]).href != NULL);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":267
 *         c_path = 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-HEAD/src/lxml/objectpath.pxi":268
 *         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-HEAD/src/lxml/objectpath.pxi":269
 *             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-HEAD/src/lxml/objectpath.pxi":270
 *         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_1 = (__pyx_v_c_name == NULL);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":271
 *         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-HEAD/src/lxml/objectpath.pxi":272
 *         if c_name is NULL:
 *             c_name = c_path[0].name
 *             c_child = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if c_index < 0:
 */
      __pyx_v_c_child = NULL;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":274
 *             c_child = NULL
 *         else:
 *             if c_index < 0:             # <<<<<<<<<<<<<<
 *                 c_child = c_node.last
 *             else:
 */
      __pyx_t_1 = (__pyx_v_c_index < 0);
      if (__pyx_t_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":275
 *         else:
 *             if c_index < 0:
 *                 c_child = c_node.last             # <<<<<<<<<<<<<<
 *             else:
 *                 c_child = c_node.children
 */
        __pyx_v_c_child = __pyx_v_c_node->last;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":277
 *                 c_child = c_node.last
 *             else:
 *                 c_child = c_node.children             # <<<<<<<<<<<<<<
 *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
 * 
 */
        __pyx_v_c_child = __pyx_v_c_node->children;
      }
      __pyx_L10:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":278
 *             else:
 *                 c_child = 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-HEAD/src/lxml/objectpath.pxi":280
 *             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_1 = (__pyx_v_c_child != NULL);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":281
 * 
 *         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_L11;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":282
 *         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_1 = (__pyx_v_c_index != 0);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":284
 *         elif c_index != 0:
 *             raise TypeError, \
 *                 u"creating indexed path attributes is not supported"             # <<<<<<<<<<<<<<
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 */
      __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_889), 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L11;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":285
 *             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_1 = (__pyx_v_c_path_len == 1);
    if (__pyx_t_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":286
 *                 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_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":287
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
 *                          value)
 *             return
 */
      __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":288
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)             # <<<<<<<<<<<<<<
 *             return
 *         else:
 */
      __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_3), __pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":289
 *                          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_L11;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":292
 *         else:
 *             child = cetree.makeSubElement(
 *                 cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)
 */
      __pyx_t_2 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":293
 *             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 = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":294
 *                 cetree.elementFactory(root._doc, c_node),
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)             # <<<<<<<<<<<<<<
 *             c_node = child._c_node
 * 
 */
      __pyx_t_3 = ((PyObject *)makeSubElement(((struct LxmlElement *)__pyx_t_2), __pyx_t_4, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_v_child));
      __pyx_v_child = ((struct LxmlElement *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":295
 *                 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_L11:;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":298
 * 
 *     # if we get here, the entire path was already there
 *     if replace:             # <<<<<<<<<<<<<<
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)
 */
  __pyx_t_5 = __pyx_v_replace;
  if (__pyx_t_5) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":299
 *     # 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_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_element);
    __pyx_v_element = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":300
 *     if replace:
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 */
    if (!(__Pyx_TypeTest(__pyx_v_element, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(((struct LxmlElement *)__pyx_v_element), __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L12;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":302
 *         _replaceElement(element, value)
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
 *                      cetree.namespacedName(c_node), value)
 * 
 */
    __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node->parent)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":303
 *     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_4 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_3), __pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L12:;

  __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._createObjectPath");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_v_child);
  __Pyx_DECREF(__pyx_v_element);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":305
 *                      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;
  PyObject *__pyx_v_path_list;
  PyObject *__pyx_v_tag;
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_SetupRefcountContext("_buildDescendantPaths");
  __Pyx_INCREF(__pyx_v_prefix_string);
  __pyx_v_path = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_path_list = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":309
 *     """
 *     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 = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":310
 *     cdef list path, path_list
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:             # <<<<<<<<<<<<<<
 *         if prefix_string[-1] != u'.':
 *             prefix_string = 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 = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":311
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:
 *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
 *             prefix_string = prefix_string + u'.'
 *         prefix_string = prefix_string + tag
 */
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_prefix_string, -1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __pyx_t_1 = PyObject_RichCompare(__pyx_1, ((PyObject *)__pyx_kp_890), Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __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-HEAD/src/lxml/objectpath.pxi":312
 *     if prefix_string:
 *         if prefix_string[-1] != u'.':
 *             prefix_string = prefix_string + u'.'             # <<<<<<<<<<<<<<
 *         prefix_string = prefix_string + tag
 *     else:
 */
      __pyx_t_1 = PyNumber_Add(__pyx_v_prefix_string, ((PyObject *)__pyx_kp_891)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 312; __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-HEAD/src/lxml/objectpath.pxi":313
 *         if prefix_string[-1] != u'.':
 *             prefix_string = 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 = 313; __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-HEAD/src/lxml/objectpath.pxi":315
 *         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-HEAD/src/lxml/objectpath.pxi":316
 *     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 = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__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_DECREF(((PyObject *)__pyx_v_path));
  __pyx_v_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":317
 *         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 = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_v_path_list));
  __pyx_v_path_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":318
 *     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 = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":319
 *     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_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("lxml.objectify._buildDescendantPaths");
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_path);
  __Pyx_DECREF(__pyx_v_path_list);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_DECREF(__pyx_v_prefix_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":321
 *     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;
  char *__pyx_v_c_href;
  PyObject *__pyx_v_tags = 0;
  PyObject *__pyx_v_tag;
  PyObject *__pyx_v_count;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_SetupRefcountContext("_recursiveBuildDescendantPaths");
  __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_count = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":329
 *     cdef tree.xmlNode* c_child
 *     cdef char* c_href
 *     cdef dict tags = {}             # <<<<<<<<<<<<<<
 *     path_list.append( u'.'.join(path) )
 *     c_href = tree._getNs(c_node)
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  __pyx_v_tags = __pyx_1;
  __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":330
 *     cdef char* c_href
 *     cdef dict tags = {}
 *     path_list.append( u'.'.join(path) )             # <<<<<<<<<<<<<<
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_892), __pyx_kp_join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __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[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_v_path));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_path));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_path));
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __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_t_4 = PyList_Append(((PyObject *)__pyx_v_path_list), __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":331
 *     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-HEAD/src/lxml/objectpath.pxi":332
 *     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-HEAD/src/lxml/objectpath.pxi":333
 *     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_5 = (__pyx_v_c_child != NULL);
    if (!__pyx_t_5) break;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":334
 *     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_5 = (__pyx_v_c_child->type != XML_ELEMENT_NODE);
      if (!__pyx_t_5) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":335
 *     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-HEAD/src/lxml/objectpath.pxi":336
 *         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_5 = (__pyx_v_c_child == NULL);
      if (__pyx_t_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":337
 *             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-HEAD/src/lxml/objectpath.pxi":338
 *             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_5 = (__pyx_v_c_href == _getNs(__pyx_v_c_child));
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":339
 *                 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_3 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L8;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":340
 *         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)
 */
    if ((__pyx_v_c_href != NULL)) {
      __pyx_t_5 = (_getNs(__pyx_v_c_child) == NULL);
    } else {
      __pyx_t_5 = (__pyx_v_c_href != NULL);
    }
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":342
 *         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_3 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_893), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":344
 *             tag = u'{}' + pyunicode(c_child.name)
 *         else:
 *             tag = cetree.namespacedName(c_child)             # <<<<<<<<<<<<<<
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         if dict_result is NULL:
 */
      __pyx_t_2 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":345
 *         else:
 *             tag = cetree.namespacedName(c_child)
 *         dict_result = python.PyDict_GetItem(tags, tag)             # <<<<<<<<<<<<<<
 *         if dict_result is NULL:
 *             count = 0
 */
    __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":346
 *             tag = cetree.namespacedName(c_child)
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         if dict_result is NULL:             # <<<<<<<<<<<<<<
 *             count = 0
 *         else:
 */
    __pyx_t_5 = (__pyx_v_dict_result == NULL);
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":347
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         if dict_result is NULL:
 *             count = 0             # <<<<<<<<<<<<<<
 *         else:
 *             count = (<object>dict_result) + 1
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF(__pyx_v_count);
      __pyx_v_count = __pyx_int_0;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":349
 *             count = 0
 *         else:
 *             count = (<object>dict_result) + 1             # <<<<<<<<<<<<<<
 *         tags[tag] = count
 *         if count > 0:
 */
      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_dict_result), __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_count);
      __pyx_v_count = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":350
 *         else:
 *             count = (<object>dict_result) + 1
 *         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 = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":351
 *             count = (<object>dict_result) + 1
 *         tags[tag] = count
 *         if count > 0:             # <<<<<<<<<<<<<<
 *             tag += u'[%d]' % count
 *         path.append(tag)
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_count, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":352
 *         tags[tag] = count
 *         if count > 0:
 *             tag += u'[%d]' % count             # <<<<<<<<<<<<<<
 *         path.append(tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 */
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_894), __pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_t_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":353
 *         if count > 0:
 *             tag += u'[%d]' % count
 *         path.append(tag)             # <<<<<<<<<<<<<<
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]
 */
    __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_path), __pyx_v_tag); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":354
 *             tag += u'[%d]' % count
 *         path.append(tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)             # <<<<<<<<<<<<<<
 *         del path[-1]
 *         c_child = c_child.next
 */
    __pyx_t_4 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_child, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":355
 *         path.append(tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]             # <<<<<<<<<<<<<<
 *         c_child = c_child.next
 *     return 0
 */
    if (__Pyx_DelItemInt(((PyObject *)__pyx_v_path), -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":356
 *         _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-HEAD/src/lxml/objectpath.pxi":357
 *         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_1);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("lxml.objectify._recursiveBuildDescendantPaths");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tags);
  __Pyx_DECREF(__pyx_v_tag);
  __Pyx_DECREF(__pyx_v_count);
  __Pyx_FinishRefcountContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, PyObject *a, 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, void *x) {
  return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(o);
}

static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
  {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("register"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_register)},
  {__Pyx_NAMESTR("unregister"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_unregister, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_unregister)},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_4lxml_9objectify_PyType[] = {
  {(char *)"name", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, name), READONLY, 0},
  {(char *)"type_check", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, type_check), READONLY, 0},
  {(char *)"stringify", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, stringify), READONLY, 0},
  {0, 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_k_676, 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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  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
};

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*/
  0, /*tp_compare*/
  __pyx_pf_4lxml_9objectify_6PyType___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
  __pyx_members_4lxml_9objectify_PyType, /*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_pf_4lxml_9objectify_6PyType___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*/
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_ptype_4lxml_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_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_11etreepublic_ElementBase->tp_traverse) {
    e = __pyx_ptype_4lxml_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_11etreepublic_ElementBase->tp_clear) {
    __pyx_ptype_4lxml_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_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(o, i, v);
  }
  else {
    return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___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_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(o, n, v);
  }
  else {
    return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(o, n);
  }
}

static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, void *x) {
  return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(o);
}

static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, void *x) {
  return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(o);
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
  {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__)},
  {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("countchildren"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren)},
  {__Pyx_NAMESTR("getchildren"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren)},
  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___getattr__)},
  {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr)},
  {__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___getitem__)},
  {__Pyx_NAMESTR("iterfind"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_iterfind)},
  {__Pyx_NAMESTR("findall"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_findall)},
  {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_find)},
  {__Pyx_NAMESTR("findtext"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_findtext)},
  {__Pyx_NAMESTR("descendantpaths"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths)},
  {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_k_675, 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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
  __pyx_pf_4lxml_9objectify_18ObjectifiedElement___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_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*mp_length*/
  __pyx_pf_4lxml_9objectify_18ObjectifiedElement___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
};

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*/
  0, /*tp_compare*/
  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_pf_4lxml_9objectify_18ObjectifiedElement___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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 = etree.XML(\"<root><c1><c2>0</c2><c2>1</c2></c1></root>\")\n       >>> second_c2 = root.c1.c2[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_pf_4lxml_9objectify_18ObjectifiedElement___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*/
};

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, void *x) {
  return __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(o);
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
  {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_setText"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedDataElement = {
  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_ObjectifiedDataElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___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_pf_4lxml_9objectify_22ObjectifiedDataElement___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
  0, /*tp_iter*/
  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*/
};

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, void *x) {
  return __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(o);
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
  {__Pyx_NAMESTR("_setValueParser"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_13NumberElement__setValueParser)},
  {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___int__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___long__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__float__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___float__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__oct__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___oct__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__hex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___hex__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___add__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__sub__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___sub__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__mul__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mul__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__div__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___div__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__truediv__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___truediv__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__mod__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mod__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__neg__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___neg__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__pos__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___pos__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__abs__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___abs__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__invert__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___invert__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__lshift__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___lshift__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__rshift__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___rshift__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__and__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___and__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__or__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___or__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__xor__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___xor__, METH_O|METH_COEXIST, __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_pf_4lxml_9objectify_13NumberElement___add__, /*nb_add*/
  __pyx_pf_4lxml_9objectify_13NumberElement___sub__, /*nb_subtract*/
  __pyx_pf_4lxml_9objectify_13NumberElement___mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pf_4lxml_9objectify_13NumberElement___div__, /*nb_divide*/
  #endif
  __pyx_pf_4lxml_9objectify_13NumberElement___mod__, /*nb_remainder*/
  0, /*nb_divmod*/
  __pyx_pf_4lxml_9objectify_13NumberElement___pow__, /*nb_power*/
  __pyx_pf_4lxml_9objectify_13NumberElement___neg__, /*nb_negative*/
  __pyx_pf_4lxml_9objectify_13NumberElement___pos__, /*nb_positive*/
  __pyx_pf_4lxml_9objectify_13NumberElement___abs__, /*nb_absolute*/
  __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__, /*nb_nonzero*/
  __pyx_pf_4lxml_9objectify_13NumberElement___invert__, /*nb_invert*/
  __pyx_pf_4lxml_9objectify_13NumberElement___lshift__, /*nb_lshift*/
  __pyx_pf_4lxml_9objectify_13NumberElement___rshift__, /*nb_rshift*/
  __pyx_pf_4lxml_9objectify_13NumberElement___and__, /*nb_and*/
  __pyx_pf_4lxml_9objectify_13NumberElement___xor__, /*nb_xor*/
  __pyx_pf_4lxml_9objectify_13NumberElement___or__, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  __pyx_pf_4lxml_9objectify_13NumberElement___int__, /*nb_int*/
  #if PY_MAJOR_VERSION >= 3
  0, /*reserved*/
  #else
  __pyx_pf_4lxml_9objectify_13NumberElement___long__, /*nb_long*/
  #endif
  __pyx_pf_4lxml_9objectify_13NumberElement___float__, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pf_4lxml_9objectify_13NumberElement___oct__, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_pf_4lxml_9objectify_13NumberElement___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_pf_4lxml_9objectify_13NumberElement___truediv__, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_NumberElement = {
  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_NumberElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  __pyx_pf_4lxml_9objectify_13NumberElement___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*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pf_4lxml_9objectify_13NumberElement___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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_pf_4lxml_9objectify_13NumberElement___richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  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*/
};

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 struct PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_10IntElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_IntElement = {
  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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_IntElement = {
  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_IntElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__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*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_IntElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
  0, /*tp_iter*/
  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*/
};

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 struct PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_11LongElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_LongElement = {
  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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_LongElement = {
  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_LongElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__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*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_LongElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
  0, /*tp_iter*/
  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*/
};

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 struct PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_12FloatElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_FloatElement = {
  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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_FloatElement = {
  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_FloatElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__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*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_FloatElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
  0, /*tp_iter*/
  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*/
};

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, void *x) {
  return __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(o);
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
  {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("strlen"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement_strlen, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___add__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__mul__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mul__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__mod__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mod__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___int__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___long__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__float__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___float__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___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_pf_4lxml_9objectify_13StringElement___add__, /*nb_add*/
  0, /*nb_subtract*/
  __pyx_pf_4lxml_9objectify_13StringElement___mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  __pyx_pf_4lxml_9objectify_13StringElement___mod__, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pf_4lxml_9objectify_13StringElement___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_pf_4lxml_9objectify_13StringElement___int__, /*nb_int*/
  #if PY_MAJOR_VERSION >= 3
  0, /*reserved*/
  #else
  __pyx_pf_4lxml_9objectify_13StringElement___long__, /*nb_long*/
  #endif
  __pyx_pf_4lxml_9objectify_13StringElement___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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_StringElement = {
  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_StringElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  __pyx_pf_4lxml_9objectify_13StringElement___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*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_StringElement, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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_pf_4lxml_9objectify_13StringElement___richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  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*/
};

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, void *x) {
  return __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(o);
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
  {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {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_pf_4lxml_9objectify_11NoneElement___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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_NoneElement = {
  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_NoneElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  __pyx_pf_4lxml_9objectify_11NoneElement___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*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pf_4lxml_9objectify_11NoneElement___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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_pf_4lxml_9objectify_11NoneElement___richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  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*/
};

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, void *x) {
  return __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(o);
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
  {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___repr__, METH_NOARGS|METH_COEXIST, __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 = {
  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_pf_4lxml_9objectify_11BoolElement___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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_BoolElement = {
  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_BoolElement = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  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
};

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*/
  0, /*tp_compare*/
  __pyx_pf_4lxml_9objectify_11BoolElement___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*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pf_4lxml_9objectify_11BoolElement___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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_pf_4lxml_9objectify_11BoolElement___richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  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*/
};

static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, PyObject *a, 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 struct PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
  {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__)},
  {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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  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
};

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*/
  0, /*tp_compare*/
  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_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, PyObject *a, 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_pf_4lxml_9objectify_12ElementMaker___getattr__(o, n);
  }
  return v;
}

static struct PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_12ElementMaker___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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  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
};

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*/
  0, /*tp_compare*/
  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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)\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_pf_4lxml_9objectify_12ElementMaker___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*/
};

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_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_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_11etreepublic_ElementClassLookup->tp_traverse) {
    e = __pyx_ptype_4lxml_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_11etreepublic_ElementClassLookup->tp_clear) {
    __pyx_ptype_4lxml_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 struct 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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  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
};

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*/
  0, /*tp_compare*/
  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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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_pf_4lxml_9objectify_27ObjectifyElementClassLookup___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*/
};

static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, PyObject *a, 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_pf_4lxml_9objectify_10ObjectPath___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 struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
  {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath___call__)},
  {__Pyx_NAMESTR("hasattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_hasattr)},
  {__Pyx_NAMESTR("setattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_setattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_setattr)},
  {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_addattr)},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_4lxml_9objectify_ObjectPath[] = {
  {(char *)"find", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_ObjectPath, find), READONLY, 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, /*reserved*/
  #else
  0, /*nb_long*/
  #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_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  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
};

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*/
  0, /*tp_compare*/
  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_pf_4lxml_9objectify_10ObjectPath___call__, /*tp_call*/
  __pyx_pf_4lxml_9objectify_10ObjectPath___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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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*/
  __pyx_members_4lxml_9objectify_ObjectPath, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4lxml_9objectify_10ObjectPath___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*/
};

static struct PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("set_pytype_attribute_tag"), (PyCFunction)__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_pytype_attribute_tag)},
  {__Pyx_NAMESTR("__checkBool"), (PyCFunction)__pyx_pf_4lxml_9objectify___checkBool, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__parseBool"), (PyCFunction)__pyx_pf_4lxml_9objectify___parseBool, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__lower_bool"), (PyCFunction)__pyx_pf_4lxml_9objectify___lower_bool, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("pytypename"), (PyCFunction)__pyx_pf_4lxml_9objectify_pytypename, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_pytypename)},
  {__Pyx_NAMESTR("getRegisteredTypes"), (PyCFunction)__pyx_pf_4lxml_9objectify_getRegisteredTypes, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_getRegisteredTypes)},
  {__Pyx_NAMESTR("enable_recursive_str"), (PyCFunction)__pyx_pf_4lxml_9objectify_enable_recursive_str, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_enable_recursive_str)},
  {__Pyx_NAMESTR("dump"), (PyCFunction)__pyx_pf_4lxml_9objectify_dump, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_dump)},
  {__Pyx_NAMESTR("__unpickleElementTree"), (PyCFunction)__pyx_pf_4lxml_9objectify___unpickleElementTree, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("pickleReduceElement"), (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduceElement, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("pickleReduceElementTree"), (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduceElementTree, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("pyannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_pyannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_pyannotate)},
  {__Pyx_NAMESTR("xsiannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_xsiannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_xsiannotate)},
  {__Pyx_NAMESTR("annotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_annotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_annotate)},
  {__Pyx_NAMESTR("deannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_deannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_deannotate)},
  {__Pyx_NAMESTR("set_default_parser"), (PyCFunction)__pyx_pf_4lxml_9objectify_set_default_parser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_default_parser)},
  {__Pyx_NAMESTR("makeparser"), (PyCFunction)__pyx_pf_4lxml_9objectify_makeparser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_makeparser)},
  {__Pyx_NAMESTR("fromstring"), (PyCFunction)__pyx_pf_4lxml_9objectify_fromstring, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_fromstring)},
  {__Pyx_NAMESTR("XML"), (PyCFunction)__pyx_pf_4lxml_9objectify_XML, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_XML)},
  {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pf_4lxml_9objectify_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_parse)},
  {__Pyx_NAMESTR("Element"), (PyCFunction)__pyx_pf_4lxml_9objectify_Element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_Element)},
  {__Pyx_NAMESTR("DataElement"), (PyCFunction)__pyx_pf_4lxml_9objectify_DataElement, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_DataElement)},
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("objectify"),
    __Pyx_DOCSTR(__pyx_mdoc), /* 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___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
  {&__pyx_kp___iter__, __pyx_k___iter__, sizeof(__pyx_k___iter__), 1, 1, 1},
  {&__pyx_kp___str__, __pyx_k___str__, sizeof(__pyx_k___str__), 1, 1, 1},
  {&__pyx_kp___len__, __pyx_k___len__, sizeof(__pyx_k___len__), 1, 1, 1},
  {&__pyx_kp_countchildren, __pyx_k_countchildren, sizeof(__pyx_k_countchildren), 1, 1, 1},
  {&__pyx_kp_getchildren, __pyx_k_getchildren, sizeof(__pyx_k_getchildren), 1, 1, 1},
  {&__pyx_kp___getattr__, __pyx_k___getattr__, sizeof(__pyx_k___getattr__), 1, 1, 1},
  {&__pyx_kp___setattr__, __pyx_k___setattr__, sizeof(__pyx_k___setattr__), 1, 1, 1},
  {&__pyx_kp___delattr__, __pyx_k___delattr__, sizeof(__pyx_k___delattr__), 1, 1, 1},
  {&__pyx_kp_addattr, __pyx_k_addattr, sizeof(__pyx_k_addattr), 1, 1, 1},
  {&__pyx_kp___getitem__, __pyx_k___getitem__, sizeof(__pyx_k___getitem__), 1, 1, 1},
  {&__pyx_kp___setitem__, __pyx_k___setitem__, sizeof(__pyx_k___setitem__), 1, 1, 1},
  {&__pyx_kp___delitem__, __pyx_k___delitem__, sizeof(__pyx_k___delitem__), 1, 1, 1},
  {&__pyx_kp_iterfind, __pyx_k_iterfind, sizeof(__pyx_k_iterfind), 1, 1, 1},
  {&__pyx_kp_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 1, 1, 1},
  {&__pyx_kp_find, __pyx_k_find, sizeof(__pyx_k_find), 1, 1, 1},
  {&__pyx_kp_findtext, __pyx_k_findtext, sizeof(__pyx_k_findtext), 1, 1, 1},
  {&__pyx_kp_descendantpaths, __pyx_k_descendantpaths, sizeof(__pyx_k_descendantpaths), 1, 1, 1},
  {&__pyx_kp___repr__, __pyx_k___repr__, sizeof(__pyx_k___repr__), 1, 1, 1},
  {&__pyx_kp__setText, __pyx_k__setText, sizeof(__pyx_k__setText), 1, 1, 1},
  {&__pyx_kp__setValueParser, __pyx_k__setValueParser, sizeof(__pyx_k__setValueParser), 1, 1, 1},
  {&__pyx_kp___int__, __pyx_k___int__, sizeof(__pyx_k___int__), 1, 1, 1},
  {&__pyx_kp___long__, __pyx_k___long__, sizeof(__pyx_k___long__), 1, 1, 1},
  {&__pyx_kp___float__, __pyx_k___float__, sizeof(__pyx_k___float__), 1, 1, 1},
  {&__pyx_kp___complex__, __pyx_k___complex__, sizeof(__pyx_k___complex__), 1, 1, 1},
  {&__pyx_kp___oct__, __pyx_k___oct__, sizeof(__pyx_k___oct__), 1, 1, 1},
  {&__pyx_kp___hex__, __pyx_k___hex__, sizeof(__pyx_k___hex__), 1, 1, 1},
  {&__pyx_kp___richcmp__, __pyx_k___richcmp__, sizeof(__pyx_k___richcmp__), 1, 1, 1},
  {&__pyx_kp___add__, __pyx_k___add__, sizeof(__pyx_k___add__), 1, 1, 1},
  {&__pyx_kp___sub__, __pyx_k___sub__, sizeof(__pyx_k___sub__), 1, 1, 1},
  {&__pyx_kp___mul__, __pyx_k___mul__, sizeof(__pyx_k___mul__), 1, 1, 1},
  {&__pyx_kp___div__, __pyx_k___div__, sizeof(__pyx_k___div__), 1, 1, 1},
  {&__pyx_kp___truediv__, __pyx_k___truediv__, sizeof(__pyx_k___truediv__), 1, 1, 1},
  {&__pyx_kp___mod__, __pyx_k___mod__, sizeof(__pyx_k___mod__), 1, 1, 1},
  {&__pyx_kp___pow__, __pyx_k___pow__, sizeof(__pyx_k___pow__), 1, 1, 1},
  {&__pyx_kp___neg__, __pyx_k___neg__, sizeof(__pyx_k___neg__), 1, 1, 1},
  {&__pyx_kp___pos__, __pyx_k___pos__, sizeof(__pyx_k___pos__), 1, 1, 1},
  {&__pyx_kp___abs__, __pyx_k___abs__, sizeof(__pyx_k___abs__), 1, 1, 1},
  {&__pyx_kp___nonzero__, __pyx_k___nonzero__, sizeof(__pyx_k___nonzero__), 1, 1, 1},
  {&__pyx_kp___invert__, __pyx_k___invert__, sizeof(__pyx_k___invert__), 1, 1, 1},
  {&__pyx_kp___lshift__, __pyx_k___lshift__, sizeof(__pyx_k___lshift__), 1, 1, 1},
  {&__pyx_kp___rshift__, __pyx_k___rshift__, sizeof(__pyx_k___rshift__), 1, 1, 1},
  {&__pyx_kp___and__, __pyx_k___and__, sizeof(__pyx_k___and__), 1, 1, 1},
  {&__pyx_kp___or__, __pyx_k___or__, sizeof(__pyx_k___or__), 1, 1, 1},
  {&__pyx_kp___xor__, __pyx_k___xor__, sizeof(__pyx_k___xor__), 1, 1, 1},
  {&__pyx_kp__init, __pyx_k__init, sizeof(__pyx_k__init), 1, 1, 1},
  {&__pyx_kp_strlen, __pyx_k_strlen, sizeof(__pyx_k_strlen), 1, 1, 1},
  {&__pyx_kp___parseBool, __pyx_k___parseBool, sizeof(__pyx_k___parseBool), 1, 1, 1},
  {&__pyx_kp___init__, __pyx_k___init__, sizeof(__pyx_k___init__), 1, 1, 1},
  {&__pyx_kp_register, __pyx_k_register, sizeof(__pyx_k_register), 1, 1, 1},
  {&__pyx_kp_unregister, __pyx_k_unregister, sizeof(__pyx_k_unregister), 1, 1, 1},
  {&__pyx_kp___call__, __pyx_k___call__, sizeof(__pyx_k___call__), 1, 1, 1},
  {&__pyx_kp___dealloc__, __pyx_k___dealloc__, sizeof(__pyx_k___dealloc__), 1, 1, 1},
  {&__pyx_kp_hasattr, __pyx_k_hasattr, sizeof(__pyx_k_hasattr), 1, 1, 1},
  {&__pyx_kp_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 1, 1, 1},
  {&__pyx_kp_attribute_tag, __pyx_k_attribute_tag, sizeof(__pyx_k_attribute_tag), 1, 1, 1},
  {&__pyx_kp_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 1, 1, 1},
  {&__pyx_kp_value, __pyx_k_value, sizeof(__pyx_k_value), 1, 1, 1},
  {&__pyx_kp_key, __pyx_k_key, sizeof(__pyx_k_key), 1, 1, 1},
  {&__pyx_kp_path, __pyx_k_path, sizeof(__pyx_k_path), 1, 1, 1},
  {&__pyx_kp_default, __pyx_k_default, sizeof(__pyx_k_default), 1, 1, 1},
  {&__pyx_kp_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 1, 1, 1},
  {&__pyx_kp_s, __pyx_k_s, sizeof(__pyx_k_s), 1, 1, 1},
  {&__pyx_kp_function, __pyx_k_function, sizeof(__pyx_k_function), 1, 1, 1},
  {&__pyx_kp_self, __pyx_k_self, sizeof(__pyx_k_self), 1, 1, 1},
  {&__pyx_kp_other, __pyx_k_other, sizeof(__pyx_k_other), 1, 1, 1},
  {&__pyx_kp_op, __pyx_k_op, sizeof(__pyx_k_op), 1, 1, 1},
  {&__pyx_kp_modulo, __pyx_k_modulo, sizeof(__pyx_k_modulo), 1, 1, 1},
  {&__pyx_kp_name, __pyx_k_name, sizeof(__pyx_k_name), 1, 1, 1},
  {&__pyx_kp_type_check, __pyx_k_type_check, sizeof(__pyx_k_type_check), 1, 1, 1},
  {&__pyx_kp_type_class, __pyx_k_type_class, sizeof(__pyx_k_type_class), 1, 1, 1},
  {&__pyx_kp_stringify, __pyx_k_stringify, sizeof(__pyx_k_stringify), 1, 1, 1},
  {&__pyx_kp_before, __pyx_k_before, sizeof(__pyx_k_before), 1, 1, 1},
  {&__pyx_kp_after, __pyx_k_after, sizeof(__pyx_k_after), 1, 1, 1},
  {&__pyx_kp_types, __pyx_k_types, sizeof(__pyx_k_types), 1, 1, 1},
  {&__pyx_kp_b, __pyx_k_b, sizeof(__pyx_k_b), 1, 1, 1},
  {&__pyx_kp_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 1, 1, 1},
  {&__pyx_kp_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 1, 1, 1},
  {&__pyx_kp_nsmap, __pyx_k_nsmap, sizeof(__pyx_k_nsmap), 1, 1, 1},
  {&__pyx_kp_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 1, 1, 1},
  {&__pyx_kp_makeelement, __pyx_k_makeelement, sizeof(__pyx_k_makeelement), 1, 1, 1},
  {&__pyx_kp_on, __pyx_k_on, sizeof(__pyx_k_on), 1, 1, 1},
  {&__pyx_kp_element, __pyx_k_element, sizeof(__pyx_k_element), 1, 1, 1},
  {&__pyx_kp_data, __pyx_k_data, sizeof(__pyx_k_data), 1, 1, 1},
  {&__pyx_kp_tree_class, __pyx_k_tree_class, sizeof(__pyx_k_tree_class), 1, 1, 1},
  {&__pyx_kp_empty_data_class, __pyx_k_empty_data_class, sizeof(__pyx_k_empty_data_class), 1, 1, 1},
  {&__pyx_kp_element_or_tree, __pyx_k_element_or_tree, sizeof(__pyx_k_element_or_tree), 1, 1, 1},
  {&__pyx_kp_ignore_old, __pyx_k_ignore_old, sizeof(__pyx_k_ignore_old), 1, 1, 1},
  {&__pyx_kp_ignore_xsi, __pyx_k_ignore_xsi, sizeof(__pyx_k_ignore_xsi), 1, 1, 1},
  {&__pyx_kp_empty_pytype, __pyx_k_empty_pytype, sizeof(__pyx_k_empty_pytype), 1, 1, 1},
  {&__pyx_kp_ignore_pytype, __pyx_k_ignore_pytype, sizeof(__pyx_k_ignore_pytype), 1, 1, 1},
  {&__pyx_kp_empty_type, __pyx_k_empty_type, sizeof(__pyx_k_empty_type), 1, 1, 1},
  {&__pyx_kp_annotate_xsi, __pyx_k_annotate_xsi, sizeof(__pyx_k_annotate_xsi), 1, 1, 1},
  {&__pyx_kp_annotate_pytype, __pyx_k_annotate_pytype, sizeof(__pyx_k_annotate_pytype), 1, 1, 1},
  {&__pyx_kp_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 1, 1, 1},
  {&__pyx_kp_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 1, 1, 1},
  {&__pyx_kp_xsi_nil, __pyx_k_xsi_nil, sizeof(__pyx_k_xsi_nil), 1, 1, 1},
  {&__pyx_kp_new_parser, __pyx_k_new_parser, sizeof(__pyx_k_new_parser), 1, 1, 1},
  {&__pyx_kp_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 1, 1, 1},
  {&__pyx_kp_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 1, 1, 1},
  {&__pyx_kp_base_url, __pyx_k_base_url, sizeof(__pyx_k_base_url), 1, 1, 1},
  {&__pyx_kp_f, __pyx_k_f, sizeof(__pyx_k_f), 1, 1, 1},
  {&__pyx_kp__tag, __pyx_k__tag, sizeof(__pyx_k__tag), 1, 1, 1},
  {&__pyx_kp_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 1, 1, 1},
  {&__pyx_kp__pytype, __pyx_k__pytype, sizeof(__pyx_k__pytype), 1, 1, 1},
  {&__pyx_kp__value, __pyx_k__value, sizeof(__pyx_k__value), 1, 1, 1},
  {&__pyx_kp__xsi, __pyx_k__xsi, sizeof(__pyx_k__xsi), 1, 1, 1},
  {&__pyx_kp_root, __pyx_k_root, sizeof(__pyx_k_root), 1, 1, 1},
  {&__pyx_kp_677, __pyx_k_677, sizeof(__pyx_k_677), 1, 1, 0},
  {&__pyx_kp_678, __pyx_k_678, sizeof(__pyx_k_678), 1, 1, 0},
  {&__pyx_kp_679, __pyx_k_679, sizeof(__pyx_k_679), 1, 1, 0},
  {&__pyx_kp_680, __pyx_k_680, sizeof(__pyx_k_680), 1, 1, 0},
  {&__pyx_kp_681, __pyx_k_681, sizeof(__pyx_k_681), 1, 1, 0},
  {&__pyx_kp_682, __pyx_k_682, sizeof(__pyx_k_682), 1, 1, 0},
  {&__pyx_kp_683, __pyx_k_683, sizeof(__pyx_k_683), 1, 1, 0},
  {&__pyx_kp_684, __pyx_k_684, sizeof(__pyx_k_684), 1, 1, 0},
  {&__pyx_kp_685, __pyx_k_685, sizeof(__pyx_k_685), 1, 1, 0},
  {&__pyx_kp_686, __pyx_k_686, sizeof(__pyx_k_686), 1, 1, 0},
  {&__pyx_kp_687, __pyx_k_687, sizeof(__pyx_k_687), 1, 1, 0},
  {&__pyx_kp_688, __pyx_k_688, sizeof(__pyx_k_688), 1, 1, 0},
  {&__pyx_kp_689, __pyx_k_689, sizeof(__pyx_k_689), 1, 1, 0},
  {&__pyx_kp_690, __pyx_k_690, sizeof(__pyx_k_690), 1, 1, 0},
  {&__pyx_kp_691, __pyx_k_691, sizeof(__pyx_k_691), 1, 1, 0},
  {&__pyx_kp_692, __pyx_k_692, sizeof(__pyx_k_692), 1, 1, 0},
  {&__pyx_kp_693, __pyx_k_693, sizeof(__pyx_k_693), 1, 1, 0},
  {&__pyx_kp_694, __pyx_k_694, sizeof(__pyx_k_694), 1, 1, 0},
  {&__pyx_kp_695, __pyx_k_695, sizeof(__pyx_k_695), 1, 1, 0},
  {&__pyx_kp_696, __pyx_k_696, sizeof(__pyx_k_696), 1, 1, 0},
  {&__pyx_kp_697, __pyx_k_697, sizeof(__pyx_k_697), 1, 1, 0},
  {&__pyx_kp_698, __pyx_k_698, sizeof(__pyx_k_698), 1, 1, 0},
  {&__pyx_kp_699, __pyx_k_699, sizeof(__pyx_k_699), 1, 1, 0},
  {&__pyx_kp_700, __pyx_k_700, sizeof(__pyx_k_700), 1, 1, 0},
  {&__pyx_kp_701, __pyx_k_701, sizeof(__pyx_k_701), 1, 1, 0},
  {&__pyx_kp_702, __pyx_k_702, sizeof(__pyx_k_702), 1, 1, 0},
  {&__pyx_kp_703, __pyx_k_703, sizeof(__pyx_k_703), 1, 1, 0},
  {&__pyx_kp_704, __pyx_k_704, sizeof(__pyx_k_704), 1, 1, 0},
  {&__pyx_kp_705, __pyx_k_705, sizeof(__pyx_k_705), 1, 1, 0},
  {&__pyx_kp_706, __pyx_k_706, sizeof(__pyx_k_706), 1, 1, 0},
  {&__pyx_kp_707, __pyx_k_707, sizeof(__pyx_k_707), 1, 1, 0},
  {&__pyx_kp___all__, __pyx_k___all__, sizeof(__pyx_k___all__), 1, 1, 1},
  {&__pyx_kp_lxml, __pyx_k_lxml, sizeof(__pyx_k_lxml), 1, 1, 1},
  {&__pyx_kp_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 1, 1, 1},
  {&__pyx_kp___version__, __pyx_k___version__, sizeof(__pyx_k___version__), 1, 1, 1},
  {&__pyx_kp_re, __pyx_k_re, sizeof(__pyx_k_re), 1, 1, 1},
  {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
  {&__pyx_kp_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 1, 1, 1},
  {&__pyx_kp_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 1, 1, 1},
  {&__pyx_kp_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 1, 1, 1},
  {&__pyx_kp_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 1, 1, 1},
  {&__pyx_kp_708, __pyx_k_708, sizeof(__pyx_k_708), 1, 1, 0},
  {&__pyx_kp_709, __pyx_k_709, sizeof(__pyx_k_709), 1, 1, 1},
  {&__pyx_kp_pickleReduceElement, __pyx_k_pickleReduceElement, sizeof(__pyx_k_pickleReduceElement), 1, 1, 1},
  {&__pyx_kp_716, __pyx_k_716, sizeof(__pyx_k_716), 1, 1, 1},
  {&__pyx_kp_strip_attributes, __pyx_k_strip_attributes, sizeof(__pyx_k_strip_attributes), 1, 1, 1},
  {&__pyx_kp_XMLParser, __pyx_k_XMLParser, sizeof(__pyx_k_XMLParser), 1, 1, 1},
  {&__pyx_kp_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 1, 1, 1},
  {&__pyx_kp_726, __pyx_k_726, sizeof(__pyx_k_726), 1, 1, 1},
  {&__pyx_kp_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 1, 1, 1},
  {&__pyx_kp_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 1, 1, 1},
  {&__pyx_kp_727, __pyx_k_727, sizeof(__pyx_k_727), 1, 1, 0},
  {&__pyx_kp_728, __pyx_k_728, sizeof(__pyx_k_728), 1, 1, 0},
  {&__pyx_kp_729, __pyx_k_729, sizeof(__pyx_k_729), 1, 1, 0},
  {&__pyx_kp_E, __pyx_k_E, sizeof(__pyx_k_E), 1, 1, 1},
  {&__pyx_kp_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 1, 1, 1},
  {&__pyx_kp_U, __pyx_k_U, sizeof(__pyx_k_U), 1, 1, 1},
  {&__pyx_kp_match, __pyx_k_match, sizeof(__pyx_k_match), 1, 1, 1},
  {&__pyx_kp_732, __pyx_k_732, sizeof(__pyx_k_732), 1, 1, 0},
  {&__pyx_kp_getparent, __pyx_k_getparent, sizeof(__pyx_k_getparent), 1, 1, 1},
  {&__pyx_kp_735, __pyx_k_735, sizeof(__pyx_k_735), 1, 1, 1},
  {&__pyx_kp_738, __pyx_k_738, sizeof(__pyx_k_738), 1, 1, 0},
  {&__pyx_kp_739, __pyx_k_739, sizeof(__pyx_k_739), 1, 1, 0},
  {&__pyx_kp_741, __pyx_k_741, sizeof(__pyx_k_741), 1, 1, 0},
  {&__pyx_kp_742, __pyx_k_742, sizeof(__pyx_k_742), 1, 1, 0},
  {&__pyx_kp___set__, __pyx_k___set__, sizeof(__pyx_k___set__), 1, 1, 1},
  {&__pyx_kp_743, __pyx_k_743, sizeof(__pyx_k_743), 1, 1, 0},
  {&__pyx_kp_base, __pyx_k_base, sizeof(__pyx_k_base), 1, 1, 1},
  {&__pyx_kp_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 1, 1, 1},
  {&__pyx_kp_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 1, 1, 1},
  {&__pyx_kp_ETXPath, __pyx_k_ETXPath, sizeof(__pyx_k_ETXPath), 1, 1, 1},
  {&__pyx_kp_text, __pyx_k_text, sizeof(__pyx_k_text), 1, 1, 1},
  {&__pyx_kp_join, __pyx_k_join, sizeof(__pyx_k_join), 1, 1, 1},
  {&__pyx_kp_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 1, 1, 1},
  {&__pyx_kp_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 1, 1, 1},
  {&__pyx_kp_749, __pyx_k_749, sizeof(__pyx_k_749), 1, 1, 0},
  {&__pyx_kp_751, __pyx_k_751, sizeof(__pyx_k_751), 1, 1, 0},
  {&__pyx_kp_addnext, __pyx_k_addnext, sizeof(__pyx_k_addnext), 1, 1, 1},
  {&__pyx_kp_oct, __pyx_k_oct, sizeof(__pyx_k_oct), 1, 1, 1},
  {&__pyx_kp_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 1, 1, 1},
  {&__pyx_kp_759, __pyx_k_759, sizeof(__pyx_k_759), 1, 1, 0},
  {&__pyx_kp_760, __pyx_k_760, sizeof(__pyx_k_760), 1, 1, 0},
  {&__pyx_kp_762, __pyx_k_762, sizeof(__pyx_k_762), 1, 1, 0},
  {&__pyx_kp_763, __pyx_k_763, sizeof(__pyx_k_763), 1, 1, 0},
  {&__pyx_kp_768, __pyx_k_768, sizeof(__pyx_k_768), 1, 1, 0},
  {&__pyx_kp_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 1, 1, 1},
  {&__pyx_kp_769, __pyx_k_769, sizeof(__pyx_k_769), 1, 1, 0},
  {&__pyx_kp_770, __pyx_k_770, sizeof(__pyx_k_770), 1, 1, 0},
  {&__pyx_kp___name__, __pyx_k___name__, sizeof(__pyx_k___name__), 1, 1, 1},
  {&__pyx_kp_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 1, 1, 1},
  {&__pyx_kp_get, __pyx_k_get, sizeof(__pyx_k_get), 1, 1, 1},
  {&__pyx_kp_map, __pyx_k_map, sizeof(__pyx_k_map), 1, 1, 1},
  {&__pyx_kp_778, __pyx_k_778, sizeof(__pyx_k_778), 1, 1, 0},
  {&__pyx_kp_779, __pyx_k_779, sizeof(__pyx_k_779), 1, 1, 0},
  {&__pyx_kp_780, __pyx_k_780, sizeof(__pyx_k_780), 1, 1, 0},
  {&__pyx_kp_781, __pyx_k_781, sizeof(__pyx_k_781), 1, 1, 0},
  {&__pyx_kp_782, __pyx_k_782, sizeof(__pyx_k_782), 1, 1, 0},
  {&__pyx_kp_783, __pyx_k_783, sizeof(__pyx_k_783), 1, 1, 0},
  {&__pyx_kp_784, __pyx_k_784, sizeof(__pyx_k_784), 1, 1, 0},
  {&__pyx_kp_785, __pyx_k_785, sizeof(__pyx_k_785), 1, 1, 0},
  {&__pyx_kp_786, __pyx_k_786, sizeof(__pyx_k_786), 1, 1, 0},
  {&__pyx_kp_787, __pyx_k_787, sizeof(__pyx_k_787), 1, 1, 0},
  {&__pyx_kp_788, __pyx_k_788, sizeof(__pyx_k_788), 1, 1, 0},
  {&__pyx_kp_789, __pyx_k_789, sizeof(__pyx_k_789), 1, 1, 0},
  {&__pyx_kp_790, __pyx_k_790, sizeof(__pyx_k_790), 1, 1, 0},
  {&__pyx_kp_791, __pyx_k_791, sizeof(__pyx_k_791), 1, 1, 0},
  {&__pyx_kp_792, __pyx_k_792, sizeof(__pyx_k_792), 1, 1, 0},
  {&__pyx_kp_793, __pyx_k_793, sizeof(__pyx_k_793), 1, 1, 0},
  {&__pyx_kp_794, __pyx_k_794, sizeof(__pyx_k_794), 1, 1, 0},
  {&__pyx_kp_xmlSchemaTypes, __pyx_k_xmlSchemaTypes, sizeof(__pyx_k_xmlSchemaTypes), 1, 1, 1},
  {&__pyx_kp_795, __pyx_k_795, sizeof(__pyx_k_795), 1, 1, 0},
  {&__pyx_kp_796, __pyx_k_796, sizeof(__pyx_k_796), 1, 1, 0},
  {&__pyx_kp_797, __pyx_k_797, sizeof(__pyx_k_797), 1, 1, 0},
  {&__pyx_kp_798, __pyx_k_798, sizeof(__pyx_k_798), 1, 1, 0},
  {&__pyx_kp_799, __pyx_k_799, sizeof(__pyx_k_799), 1, 1, 0},
  {&__pyx_kp___checkBool, __pyx_k___checkBool, sizeof(__pyx_k___checkBool), 1, 1, 1},
  {&__pyx_kp___lower_bool, __pyx_k___lower_bool, sizeof(__pyx_k___lower_bool), 1, 1, 1},
  {&__pyx_kp_800, __pyx_k_800, sizeof(__pyx_k_800), 1, 1, 0},
  {&__pyx_kp_801, __pyx_k_801, sizeof(__pyx_k_801), 1, 1, 0},
  {&__pyx_kp_802, __pyx_k_802, sizeof(__pyx_k_802), 1, 1, 0},
  {&__pyx_kp_803, __pyx_k_803, sizeof(__pyx_k_803), 1, 1, 0},
  {&__pyx_kp_804, __pyx_k_804, sizeof(__pyx_k_804), 1, 1, 0},
  {&__pyx_kp_805, __pyx_k_805, sizeof(__pyx_k_805), 1, 1, 0},
  {&__pyx_kp_806, __pyx_k_806, sizeof(__pyx_k_806), 1, 1, 0},
  {&__pyx_kp_807, __pyx_k_807, sizeof(__pyx_k_807), 1, 1, 0},
  {&__pyx_kp_808, __pyx_k_808, sizeof(__pyx_k_808), 1, 1, 0},
  {&__pyx_kp_809, __pyx_k_809, sizeof(__pyx_k_809), 1, 1, 0},
  {&__pyx_kp_810, __pyx_k_810, sizeof(__pyx_k_810), 1, 1, 0},
  {&__pyx_kp_811, __pyx_k_811, sizeof(__pyx_k_811), 1, 1, 0},
  {&__pyx_kp_812, __pyx_k_812, sizeof(__pyx_k_812), 1, 1, 0},
  {&__pyx_kp_813, __pyx_k_813, sizeof(__pyx_k_813), 1, 1, 0},
  {&__pyx_kp_817, __pyx_k_817, sizeof(__pyx_k_817), 1, 1, 0},
  {&__pyx_kp_818, __pyx_k_818, sizeof(__pyx_k_818), 1, 1, 0},
  {&__pyx_kp_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 1, 1, 1},
  {&__pyx_kp_iterchildren, __pyx_k_iterchildren, sizeof(__pyx_k_iterchildren), 1, 1, 1},
  {&__pyx_kp_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 1, 1, 1},
  {&__pyx_kp_copyreg, __pyx_k_copyreg, sizeof(__pyx_k_copyreg), 1, 1, 1},
  {&__pyx_kp_copy_reg, __pyx_k_copy_reg, sizeof(__pyx_k_copy_reg), 1, 1, 1},
  {&__pyx_kp_constructor, __pyx_k_constructor, sizeof(__pyx_k_constructor), 1, 1, 1},
  {&__pyx_kp_827, __pyx_k_827, sizeof(__pyx_k_827), 1, 1, 1},
  {&__pyx_kp_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 1, 1, 1},
  {&__pyx_kp__ElementTree, __pyx_k__ElementTree, sizeof(__pyx_k__ElementTree), 1, 1, 1},
  {&__pyx_kp_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 1, 1, 1},
  {&__pyx_kp_828, __pyx_k_828, sizeof(__pyx_k_828), 1, 1, 0},
  {&__pyx_kp_split, __pyx_k_split, sizeof(__pyx_k_split), 1, 1, 1},
  {&__pyx_kp_835, __pyx_k_835, sizeof(__pyx_k_835), 1, 1, 0},
  {&__pyx_kp_836, __pyx_k_836, sizeof(__pyx_k_836), 1, 1, 0},
  {&__pyx_kp_838, __pyx_k_838, sizeof(__pyx_k_838), 1, 1, 0},
  {&__pyx_kp_842, __pyx_k_842, sizeof(__pyx_k_842), 1, 1, 0},
  {&__pyx_kp_843, __pyx_k_843, sizeof(__pyx_k_843), 1, 1, 0},
  {&__pyx_kp_857, __pyx_k_857, sizeof(__pyx_k_857), 1, 1, 0},
  {&__pyx_kp_858, __pyx_k_858, sizeof(__pyx_k_858), 0, 1, 0},
  {&__pyx_kp_update, __pyx_k_update, sizeof(__pyx_k_update), 1, 1, 1},
  {&__pyx_kp___copy__, __pyx_k___copy__, sizeof(__pyx_k___copy__), 1, 1, 1},
  {&__pyx_kp_items, __pyx_k_items, sizeof(__pyx_k_items), 1, 1, 1},
  {&__pyx_kp_865, __pyx_k_865, sizeof(__pyx_k_865), 1, 1, 0},
  {&__pyx_kp_866, __pyx_k_866, sizeof(__pyx_k_866), 1, 1, 0},
  {&__pyx_kp_867, __pyx_k_867, sizeof(__pyx_k_867), 1, 1, 0},
  {&__pyx_kp_868, __pyx_k_868, sizeof(__pyx_k_868), 1, 1, 0},
  {&__pyx_kp_869, __pyx_k_869, sizeof(__pyx_k_869), 1, 1, 0},
  {&__pyx_kp_870, __pyx_k_870, sizeof(__pyx_k_870), 1, 1, 0},
  {&__pyx_kp_871, __pyx_k_871, sizeof(__pyx_k_871), 1, 1, 0},
  {&__pyx_kp_872, __pyx_k_872, sizeof(__pyx_k_872), 1, 1, 0},
  {&__pyx_kp_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 1, 1, 1},
  {&__pyx_kp_end, __pyx_k_end, sizeof(__pyx_k_end), 1, 1, 1},
  {&__pyx_kp_710, __pyx_k_710, sizeof(__pyx_k_710), 1, 0, 0},
  {&__pyx_kp_711, __pyx_k_711, sizeof(__pyx_k_711), 1, 0, 0},
  {&__pyx_kp_712, __pyx_k_712, sizeof(__pyx_k_712), 1, 0, 0},
  {&__pyx_kp_713, __pyx_k_713, sizeof(__pyx_k_713), 1, 0, 0},
  {&__pyx_kp_730, __pyx_k_730, sizeof(__pyx_k_730), 1, 0, 0},
  {&__pyx_kp_731, __pyx_k_731, sizeof(__pyx_k_731), 1, 0, 0},
  {&__pyx_kp_736, __pyx_k_736, sizeof(__pyx_k_736), 1, 0, 0},
  {&__pyx_kp_737, __pyx_k_737, sizeof(__pyx_k_737), 1, 0, 0},
  {&__pyx_kp_740, __pyx_k_740, sizeof(__pyx_k_740), 1, 0, 0},
  {&__pyx_kp_744, __pyx_k_744, sizeof(__pyx_k_744), 1, 0, 0},
  {&__pyx_kp_745, __pyx_k_745, sizeof(__pyx_k_745), 1, 0, 0},
  {&__pyx_kp_746, __pyx_k_746, sizeof(__pyx_k_746), 1, 0, 0},
  {&__pyx_kp_747, __pyx_k_747, sizeof(__pyx_k_747), 1, 0, 0},
  {&__pyx_kp_748, __pyx_k_748, sizeof(__pyx_k_748), 1, 0, 0},
  {&__pyx_kp_752, __pyx_k_752, sizeof(__pyx_k_752), 1, 0, 0},
  {&__pyx_kp_753, __pyx_k_753, sizeof(__pyx_k_753), 1, 0, 0},
  {&__pyx_kp_754, __pyx_k_754, sizeof(__pyx_k_754), 1, 0, 0},
  {&__pyx_kp_755, __pyx_k_755, sizeof(__pyx_k_755), 1, 0, 0},
  {&__pyx_kp_756, __pyx_k_756, sizeof(__pyx_k_756), 1, 0, 0},
  {&__pyx_kp_757, __pyx_k_757, sizeof(__pyx_k_757), 1, 0, 0},
  {&__pyx_kp_758, __pyx_k_758, sizeof(__pyx_k_758), 1, 0, 0},
  {&__pyx_kp_761, __pyx_k_761, sizeof(__pyx_k_761), 1, 0, 0},
  {&__pyx_kp_764, __pyx_k_764, sizeof(__pyx_k_764), 1, 0, 0},
  {&__pyx_kp_765, __pyx_k_765, sizeof(__pyx_k_765), 1, 0, 0},
  {&__pyx_kp_766, __pyx_k_766, sizeof(__pyx_k_766), 1, 0, 0},
  {&__pyx_kp_767, __pyx_k_767, sizeof(__pyx_k_767), 1, 0, 0},
  {&__pyx_kp_772, __pyx_k_772, sizeof(__pyx_k_772), 1, 0, 0},
  {&__pyx_kp_773, __pyx_k_773, sizeof(__pyx_k_773), 1, 0, 0},
  {&__pyx_kp_774, __pyx_k_774, sizeof(__pyx_k_774), 1, 0, 0},
  {&__pyx_kp_775, __pyx_k_775, sizeof(__pyx_k_775), 1, 0, 0},
  {&__pyx_kp_776, __pyx_k_776, sizeof(__pyx_k_776), 1, 0, 0},
  {&__pyx_kp_777, __pyx_k_777, sizeof(__pyx_k_777), 1, 0, 0},
  {&__pyx_kp_814, __pyx_k_814, sizeof(__pyx_k_814), 1, 0, 0},
  {&__pyx_kp_815, __pyx_k_815, sizeof(__pyx_k_815), 1, 0, 0},
  {&__pyx_kp_816, __pyx_k_816, sizeof(__pyx_k_816), 1, 0, 0},
  {&__pyx_kp_819, __pyx_k_819, sizeof(__pyx_k_819), 1, 0, 0},
  {&__pyx_kp_820, __pyx_k_820, sizeof(__pyx_k_820), 1, 0, 0},
  {&__pyx_kp_821, __pyx_k_821, sizeof(__pyx_k_821), 1, 0, 0},
  {&__pyx_kp_822, __pyx_k_822, sizeof(__pyx_k_822), 1, 0, 0},
  {&__pyx_kp_823, __pyx_k_823, sizeof(__pyx_k_823), 1, 0, 0},
  {&__pyx_kp_824, __pyx_k_824, sizeof(__pyx_k_824), 1, 0, 0},
  {&__pyx_kp_825, __pyx_k_825, sizeof(__pyx_k_825), 1, 0, 0},
  {&__pyx_kp_826, __pyx_k_826, sizeof(__pyx_k_826), 1, 0, 0},
  {&__pyx_kp_831, __pyx_k_831, sizeof(__pyx_k_831), 1, 0, 0},
  {&__pyx_kp_832, __pyx_k_832, sizeof(__pyx_k_832), 1, 0, 0},
  {&__pyx_kp_840, __pyx_k_840, sizeof(__pyx_k_840), 1, 0, 0},
  {&__pyx_kp_841, __pyx_k_841, sizeof(__pyx_k_841), 1, 0, 0},
  {&__pyx_kp_846, __pyx_k_846, sizeof(__pyx_k_846), 0, 0, 0},
  {&__pyx_kp_847, __pyx_k_847, sizeof(__pyx_k_847), 0, 0, 0},
  {&__pyx_kp_848, __pyx_k_848, sizeof(__pyx_k_848), 0, 0, 0},
  {&__pyx_kp_849, __pyx_k_849, sizeof(__pyx_k_849), 0, 0, 0},
  {&__pyx_kp_856, __pyx_k_856, sizeof(__pyx_k_856), 1, 0, 0},
  {&__pyx_kp_859, __pyx_k_859, sizeof(__pyx_k_859), 1, 0, 0},
  {&__pyx_kp_860, __pyx_k_860, sizeof(__pyx_k_860), 1, 0, 0},
  {&__pyx_kp_861, __pyx_k_861, sizeof(__pyx_k_861), 1, 0, 0},
  {&__pyx_kp_862, __pyx_k_862, sizeof(__pyx_k_862), 1, 0, 0},
  {&__pyx_kp_863, __pyx_k_863, sizeof(__pyx_k_863), 1, 0, 0},
  {&__pyx_kp_864, __pyx_k_864, sizeof(__pyx_k_864), 1, 0, 0},
  {&__pyx_kp_873, __pyx_k_873, sizeof(__pyx_k_873), 1, 0, 0},
  {&__pyx_kp_874, __pyx_k_874, sizeof(__pyx_k_874), 1, 0, 0},
  {&__pyx_kp_876, __pyx_k_876, sizeof(__pyx_k_876), 1, 0, 0},
  {&__pyx_kp_877, __pyx_k_877, sizeof(__pyx_k_877), 1, 0, 0},
  {&__pyx_kp_878, __pyx_k_878, sizeof(__pyx_k_878), 1, 0, 0},
  {&__pyx_kp_879, __pyx_k_879, sizeof(__pyx_k_879), 1, 0, 0},
  {&__pyx_kp_880, __pyx_k_880, sizeof(__pyx_k_880), 1, 0, 0},
  {&__pyx_kp_881, __pyx_k_881, sizeof(__pyx_k_881), 1, 0, 0},
  {&__pyx_kp_882, __pyx_k_882, sizeof(__pyx_k_882), 1, 0, 0},
  {&__pyx_kp_883, __pyx_k_883, sizeof(__pyx_k_883), 1, 0, 0},
  {&__pyx_kp_884, __pyx_k_884, sizeof(__pyx_k_884), 1, 0, 0},
  {&__pyx_kp_885, __pyx_k_885, sizeof(__pyx_k_885), 1, 0, 0},
  {&__pyx_kp_886, __pyx_k_886, sizeof(__pyx_k_886), 1, 0, 0},
  {&__pyx_kp_887, __pyx_k_887, sizeof(__pyx_k_887), 1, 0, 0},
  {&__pyx_kp_888, __pyx_k_888, sizeof(__pyx_k_888), 1, 0, 0},
  {&__pyx_kp_889, __pyx_k_889, sizeof(__pyx_k_889), 1, 0, 0},
  {&__pyx_kp_890, __pyx_k_890, sizeof(__pyx_k_890), 1, 0, 0},
  {&__pyx_kp_891, __pyx_k_891, sizeof(__pyx_k_891), 1, 0, 0},
  {&__pyx_kp_892, __pyx_k_892, sizeof(__pyx_k_892), 1, 0, 0},
  {&__pyx_kp_893, __pyx_k_893, sizeof(__pyx_k_893), 1, 0, 0},
  {&__pyx_kp_894, __pyx_k_894, sizeof(__pyx_k_894), 1, 0, 0},
  {0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_kp_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_kp_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_kp_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_oct = __Pyx_GetName(__pyx_b, __pyx_kp_oct); if (!__pyx_builtin_oct) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_hex = __Pyx_GetName(__pyx_b, __pyx_kp_hex); if (!__pyx_builtin_hex) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_kp_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_kp_map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __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;};
  #if PY_VERSION_HEX < 0x02040000
  if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__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_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef CYTHON_REFNANNY
  void* __pyx_refchk = NULL;
  __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
  if (!__Pyx_Refnanny) {
      PyErr_Clear();
      __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
      if (!__Pyx_Refnanny)
          Py_FatalError("failed to import refnanny module");
  }
  __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_objectify(void)", __LINE__, __FILE__);
  #endif
  __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;}
  /*--- Library function declarations ---*/
  __pyx_init_filenames();
  /*--- 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
  /*--- 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;}
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("objectify"), __pyx_methods, __pyx_mdoc, 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 (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 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_kp___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;}
  __pyx_skip_dispatch = 0;
  /*--- 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_islice = 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___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);
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __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 = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
  __pyx_ptype_4lxml_11etreepublic_ElementBase = __Pyx_ImportType("lxml.etree", "ElementBase", sizeof(struct LxmlElementBase)); if (unlikely(!__pyx_ptype_4lxml_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_11etreepublic_ElementBase;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __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 = 633; __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 = 633; __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 = 653; __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 = 653; __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 = 747; __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 = 747; __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 = 751; __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 = 751; __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 = 755; __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 = 755; __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 = 759; __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 = 759; __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 = 821; __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 = 821; __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 = 843; __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 = 843; __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 = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "_ObjectifyElementMakerCaller", (PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __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 = 1170; __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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
  __pyx_ptype_4lxml_11etreepublic_ElementClassLookup = __Pyx_ImportType("lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup)); if (unlikely(!__pyx_ptype_4lxml_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_11etreepublic_ElementClassLookup;
  if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ObjectifyElementClassLookup", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __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 (__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_6python_slice = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "slice", sizeof(PySliceObject)); if (unlikely(!__pyx_ptype_4lxml_6python_slice)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  __pyx_ptype_4lxml_6python_unicode = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "str", sizeof(PyUnicodeObject)); if (unlikely(!__pyx_ptype_4lxml_6python_unicode)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #else
  __pyx_ptype_4lxml_6python_unicode = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "unicode", sizeof(PyUnicodeObject)); if (unlikely(!__pyx_ptype_4lxml_6python_unicode)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  __pyx_ptype_4lxml_11etreepublic__Document = __Pyx_ImportType("lxml.etree", "_Document", sizeof(struct LxmlDocument)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__Document)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_11etreepublic__Element = __Pyx_ImportType("lxml.etree", "_Element", sizeof(struct LxmlElement)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__Element)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_11etreepublic__ElementTree = __Pyx_ImportType("lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementTree)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType("lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_11etreepublic__ElementTagMatcher = __Pyx_ImportType("lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementTagMatcher)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4lxml_11etreepublic__ElementIterator = __Pyx_ImportType("lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementIterator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":22
 *            u'fromstring', u'getRegisteredTypes', u'makeparser', u'parse',
 *            u'pyannotate', u'pytypename', u'set_default_parser',
 *            u'set_pytype_attribute_tag', u'xsiannotate']             # <<<<<<<<<<<<<<
 * 
 * cdef object etree
 */
  __pyx_t_1 = PyList_New(31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_677));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_677));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_677));
  __Pyx_INCREF(((PyObject *)__pyx_kp_678));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_678));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_678));
  __Pyx_INCREF(((PyObject *)__pyx_kp_679));
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_kp_679));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_679));
  __Pyx_INCREF(((PyObject *)__pyx_kp_680));
  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_kp_680));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_680));
  __Pyx_INCREF(((PyObject *)__pyx_kp_681));
  PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_kp_681));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_681));
  __Pyx_INCREF(((PyObject *)__pyx_kp_682));
  PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_kp_682));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_682));
  __Pyx_INCREF(((PyObject *)__pyx_kp_683));
  PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_kp_683));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_683));
  __Pyx_INCREF(((PyObject *)__pyx_kp_684));
  PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_kp_684));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_684));
  __Pyx_INCREF(((PyObject *)__pyx_kp_685));
  PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_kp_685));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_685));
  __Pyx_INCREF(((PyObject *)__pyx_kp_686));
  PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_kp_686));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_686));
  __Pyx_INCREF(((PyObject *)__pyx_kp_687));
  PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_kp_687));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_687));
  __Pyx_INCREF(((PyObject *)__pyx_kp_688));
  PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_kp_688));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_688));
  __Pyx_INCREF(((PyObject *)__pyx_kp_689));
  PyList_SET_ITEM(__pyx_t_1, 12, ((PyObject *)__pyx_kp_689));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_689));
  __Pyx_INCREF(((PyObject *)__pyx_kp_690));
  PyList_SET_ITEM(__pyx_t_1, 13, ((PyObject *)__pyx_kp_690));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_690));
  __Pyx_INCREF(((PyObject *)__pyx_kp_691));
  PyList_SET_ITEM(__pyx_t_1, 14, ((PyObject *)__pyx_kp_691));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_691));
  __Pyx_INCREF(((PyObject *)__pyx_kp_692));
  PyList_SET_ITEM(__pyx_t_1, 15, ((PyObject *)__pyx_kp_692));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_692));
  __Pyx_INCREF(((PyObject *)__pyx_kp_693));
  PyList_SET_ITEM(__pyx_t_1, 16, ((PyObject *)__pyx_kp_693));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_693));
  __Pyx_INCREF(((PyObject *)__pyx_kp_694));
  PyList_SET_ITEM(__pyx_t_1, 17, ((PyObject *)__pyx_kp_694));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_694));
  __Pyx_INCREF(((PyObject *)__pyx_kp_695));
  PyList_SET_ITEM(__pyx_t_1, 18, ((PyObject *)__pyx_kp_695));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_695));
  __Pyx_INCREF(((PyObject *)__pyx_kp_696));
  PyList_SET_ITEM(__pyx_t_1, 19, ((PyObject *)__pyx_kp_696));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_696));
  __Pyx_INCREF(((PyObject *)__pyx_kp_697));
  PyList_SET_ITEM(__pyx_t_1, 20, ((PyObject *)__pyx_kp_697));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_697));
  __Pyx_INCREF(((PyObject *)__pyx_kp_698));
  PyList_SET_ITEM(__pyx_t_1, 21, ((PyObject *)__pyx_kp_698));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_698));
  __Pyx_INCREF(((PyObject *)__pyx_kp_699));
  PyList_SET_ITEM(__pyx_t_1, 22, ((PyObject *)__pyx_kp_699));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_699));
  __Pyx_INCREF(((PyObject *)__pyx_kp_700));
  PyList_SET_ITEM(__pyx_t_1, 23, ((PyObject *)__pyx_kp_700));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_700));
  __Pyx_INCREF(((PyObject *)__pyx_kp_701));
  PyList_SET_ITEM(__pyx_t_1, 24, ((PyObject *)__pyx_kp_701));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_701));
  __Pyx_INCREF(((PyObject *)__pyx_kp_702));
  PyList_SET_ITEM(__pyx_t_1, 25, ((PyObject *)__pyx_kp_702));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_702));
  __Pyx_INCREF(((PyObject *)__pyx_kp_703));
  PyList_SET_ITEM(__pyx_t_1, 26, ((PyObject *)__pyx_kp_703));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_703));
  __Pyx_INCREF(((PyObject *)__pyx_kp_704));
  PyList_SET_ITEM(__pyx_t_1, 27, ((PyObject *)__pyx_kp_704));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_704));
  __Pyx_INCREF(((PyObject *)__pyx_kp_705));
  PyList_SET_ITEM(__pyx_t_1, 28, ((PyObject *)__pyx_kp_705));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_705));
  __Pyx_INCREF(((PyObject *)__pyx_kp_706));
  PyList_SET_ITEM(__pyx_t_1, 29, ((PyObject *)__pyx_kp_706));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_706));
  __Pyx_INCREF(((PyObject *)__pyx_kp_707));
  PyList_SET_ITEM(__pyx_t_1, 30, ((PyObject *)__pyx_kp_707));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_707));
  if (PyObject_SetAttr(__pyx_m, __pyx_kp___all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":25
 * 
 * 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 = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_etree);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_etree);
  __Pyx_GIVEREF(__pyx_kp_etree);
  __pyx_1 = __Pyx_Import(__pyx_kp_lxml, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_etree); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify_etree);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_etree);
  __Pyx_GIVEREF(__pyx_2);
  __pyx_v_4lxml_9objectify_etree = __pyx_2;
  __pyx_2 = 0;
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":27
 * from lxml import etree
 * # initialize C-API of lxml.etree
 * import_lxml__etree()             # <<<<<<<<<<<<<<
 * 
 * __version__ = etree.__version__
 */
  __pyx_t_2 = import_lxml__etree(); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":29
 * import_lxml__etree()
 * 
 * __version__ = etree.__version__             # <<<<<<<<<<<<<<
 * 
 * cdef object re
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp___version__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp___version__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":32
 * 
 * cdef object re
 * import re             # <<<<<<<<<<<<<<
 * 
 * cdef tuple IGNORABLE_ERRORS
 */
  __pyx_1 = __Pyx_Import(__pyx_kp_re, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify_re);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_re);
  __Pyx_GIVEREF(__pyx_1);
  __pyx_v_4lxml_9objectify_re = __pyx_1;
  __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":35
 * 
 * cdef tuple IGNORABLE_ERRORS
 * IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
 * 
 * cdef object islice
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_builtin_ValueError);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_ValueError);
  __Pyx_GIVEREF(__pyx_builtin_ValueError);
  __Pyx_INCREF(__pyx_builtin_TypeError);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_builtin_TypeError);
  __Pyx_GIVEREF(__pyx_builtin_TypeError);
  __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":38
 * 
 * cdef object islice
 * from itertools import islice             # <<<<<<<<<<<<<<
 * 
 * cdef object _typename(object t):
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_islice);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_islice);
  __Pyx_GIVEREF(__pyx_kp_islice);
  __pyx_2 = __Pyx_Import(__pyx_kp_itertools, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_islice); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify_islice);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_islice);
  __Pyx_GIVEREF(__pyx_1);
  __pyx_v_4lxml_9objectify_islice = __pyx_1;
  __pyx_1 = 0;
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":58
 * cdef char* _PYTYPE_ATTRIBUTE_NAME
 * 
 * PYTYPE_ATTRIBUTE = None             # <<<<<<<<<<<<<<
 * 
 * cdef object TREE_PYTYPE_NAME
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_PYTYPE_ATTRIBUTE, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":61
 * 
 * cdef object TREE_PYTYPE_NAME
 * TREE_PYTYPE_NAME = u"TREE"             # <<<<<<<<<<<<<<
 * 
 * cdef _unicodeAndUtf8(s):
 */
  __Pyx_INCREF(((PyObject *)__pyx_kp_708));
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_708));
  __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = ((PyObject *)__pyx_kp_708);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":98
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 * 
 * set_pytype_attribute_tag()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_709); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  __pyx_t_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":104
 * 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 char* _XML_SCHEMA_NS
 * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS_UTF8)
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_710)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
    __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":103
 * # 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 char* _XML_SCHEMA_NS
 */
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
    __Pyx_GIVEREF(__pyx_2);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_2;
    __pyx_2 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
    __Pyx_GIVEREF(__pyx_3);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_3;
    __pyx_3 = 0;
  } else {
    __pyx_1 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_2);
    __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_3);
    if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
    __Pyx_GIVEREF(__pyx_2);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_2;
    __pyx_2 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
    __Pyx_GIVEREF(__pyx_3);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_3;
    __pyx_3 = 0;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":106
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
 * cdef char* _XML_SCHEMA_NS
 * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS_UTF8)             # <<<<<<<<<<<<<<
 * 
 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
 */
  __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = PyString_AS_STRING(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":110
 * 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 char* _XML_SCHEMA_INSTANCE_NS
 * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS_UTF8)
 */
  __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_711)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
    PyObject* tuple = __pyx_t_1;
    __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
    __pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":109
 * 
 * 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 char* _XML_SCHEMA_INSTANCE_NS
 */
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
    __Pyx_GIVEREF(__pyx_2);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_2;
    __pyx_2 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
    __Pyx_GIVEREF(__pyx_3);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_3;
    __pyx_3 = 0;
  } else {
    __pyx_1 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_2);
    __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_3);
    if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
    __Pyx_GIVEREF(__pyx_2);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_2;
    __pyx_2 = 0;
    __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
    __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
    __Pyx_GIVEREF(__pyx_3);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_3;
    __pyx_3 = 0;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":112
 *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
 * cdef char* _XML_SCHEMA_INSTANCE_NS
 * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS_UTF8)             # <<<<<<<<<<<<<<
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
 */
  __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = PyString_AS_STRING(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":115
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
 * XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
 * XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS
 */
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_712), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":117
 * XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
 * XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_713), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1035
 * 
 * cdef dict _PYTYPE_DICT
 * _PYTYPE_DICT = {}             # <<<<<<<<<<<<<<
 * 
 * cdef dict _SCHEMA_TYPE_DICT
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));
  __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
  __Pyx_GIVEREF(((PyObject *)__pyx_1));
  __pyx_v_4lxml_9objectify__PYTYPE_DICT = __pyx_1;
  __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1038
 * 
 * cdef dict _SCHEMA_TYPE_DICT
 * _SCHEMA_TYPE_DICT = {}             # <<<<<<<<<<<<<<
 * 
 * cdef list _TYPE_CHECKS
 */
  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_2));
  __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
  __Pyx_GIVEREF(((PyObject *)__pyx_2));
  __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = __pyx_2;
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1041
 * 
 * cdef list _TYPE_CHECKS
 * _TYPE_CHECKS = []             # <<<<<<<<<<<<<<
 * 
 * cdef _lower_bool(b):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_v_4lxml_9objectify__TYPE_CHECKS = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1101
 * # non-registered PyType for inner tree elements
 * cdef PyType TREE_PYTYPE
 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)             # <<<<<<<<<<<<<<
 * 
 * _registerPyTypes()
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
  PyTuple_SET_ITEM(__pyx_t_1, 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_1, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1103
 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
 * 
 * _registerPyTypes()             # <<<<<<<<<<<<<<
 * 
 * def getRegisteredTypes():
 */
  __pyx_t_3 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1177
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
 *                  makeelement=None):
 *         if nsmap is None:
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_714 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_714);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1286
 * 
 * cdef bint __RECURSIVE_STR
 * __RECURSIVE_STR = 0 # default: off             # <<<<<<<<<<<<<<
 * 
 * def enable_recursive_str(on=True):
 */
  __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1288
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
 *     u"""enable_recursive_str(on=True)
 * 
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_715 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_715);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1362
 *     return (__unpickleElementTree, (etree.tostring(obj),))
 * 
 * _setupPickle(pickleReduceElement, pickleReduceElementTree)             # <<<<<<<<<<<<<<
 * del pickleReduceElement, pickleReduceElementTree
 * 
 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_pickleReduceElement); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_3);
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_716); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __pyx_t_3 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_3, __pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1363
 * 
 * _setupPickle(pickleReduceElement, pickleReduceElementTree)
 * del pickleReduceElement, pickleReduceElementTree             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElement") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElementTree") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1454
 *     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_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_717 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_717);
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_718 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_718);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1477
 *     _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_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_719 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_719);
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_720 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_720);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1505
 *     _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_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_721 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_721);
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_722 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_722);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1704
 * 
 * cdef object _strip_attributes
 * _strip_attributes = etree.strip_attributes             # <<<<<<<<<<<<<<
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_strip_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify__strip_attributes);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__strip_attributes);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_v_4lxml_9objectify__strip_attributes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1706
 * _strip_attributes = etree.strip_attributes
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):             # <<<<<<<<<<<<<<
 *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)
 * 
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_723 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_723);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_724 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_724);
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_725 = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_k_725);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1733
 * 
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<<
 * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_XMLParser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_2));
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_2, __pyx_kp_remove_blank_text, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __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_2)); __pyx_2 = 0;
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify___DEFAULT_PARSER = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1734
 * 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_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_kp_726); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 1734; __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 = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __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 = 1734; __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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1737
 * 
 * cdef object objectify_parser
 * objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
 * 
 * def set_default_parser(new_parser = None):
 */
  __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
  __Pyx_GOTREF(__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;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1784
 * 
 * cdef object _fromstring
 * _fromstring = etree.fromstring             # <<<<<<<<<<<<<<
 * 
 * def fromstring(xml, parser=None, *, base_url=None):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_fromstring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify__fromstring);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__fromstring);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_v_4lxml_9objectify__fromstring = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1819
 * 
 * cdef object _parse
 * _parse = etree.parse             # <<<<<<<<<<<<<<
 * 
 * def parse(f, parser=None, *, base_url=None):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_kp_parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify__parse);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__parse);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_v_4lxml_9objectify__parse = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1837
 * 
 * cdef dict _DEFAULT_NSMAP
 * _DEFAULT_NSMAP = { u"py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<<
 *                    u"xsi" : XML_SCHEMA_INSTANCE_NS,
 *                    u"xsd" : XML_SCHEMA_NS}
 */
  __pyx_3 = PyDict_New(); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_3));
  if (PyDict_SetItem(__pyx_3, ((PyObject *)__pyx_kp_727), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1838
 * cdef dict _DEFAULT_NSMAP
 * _DEFAULT_NSMAP = { u"py"  : PYTYPE_NAMESPACE,
 *                    u"xsi" : XML_SCHEMA_INSTANCE_NS,             # <<<<<<<<<<<<<<
 *                    u"xsd" : XML_SCHEMA_NS}
 * 
 */
  if (PyDict_SetItem(__pyx_3, ((PyObject *)__pyx_kp_728), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1839
 * _DEFAULT_NSMAP = { u"py"  : PYTYPE_NAMESPACE,
 *                    u"xsi" : XML_SCHEMA_INSTANCE_NS,
 *                    u"xsd" : XML_SCHEMA_NS}             # <<<<<<<<<<<<<<
 * 
 * E = ElementMaker()
 */
  if (PyDict_SetItem(__pyx_3, ((PyObject *)__pyx_kp_729), __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
  __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
  __Pyx_GIVEREF(((PyObject *)__pyx_3));
  __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = __pyx_3;
  __pyx_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/lxml.objectify.pyx":1841
 *                    u"xsd" : XML_SCHEMA_NS}
 * 
 * E = ElementMaker()             # <<<<<<<<<<<<<<
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
 */
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ElementMaker)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_E, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_kp_compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/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_kp_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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_kp_730));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_730));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_730));
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), 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_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_kp_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/objectpath.pxi":89
 * 
 * cdef object _RELATIVE_PATH_SEGMENT
 * _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
 * 
 * cdef _parseObjectPathString(path):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GOTREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
  __Pyx_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/cstd.pxd":2
 * 
 * cdef extern from "string.h":             # <<<<<<<<<<<<<<
 *     cdef int strlen(char* s) nogil
 *     cdef char* strstr(char* haystack, char* needle) nogil
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("lxml.objectify");
  Py_DECREF(__pyx_m); __pyx_m = 0;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

static const char *__pyx_filenames[] = {
  "lxml.objectify.pyx",
  "objectpath.pxi",
  "python.pxd",
  "etreepublic.pxd",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}

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 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 *number, *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";
    }
    number = (num_expected == 1) ? "" : "s";
    PyErr_Format(PyExc_TypeError,
        #if PY_VERSION_HEX < 0x02050000
            "%s() takes %s %d positional argument%s (%d given)",
        #else
            "%s() takes %s %zd positional argument%s (%zd given)",
        #endif
        func_name, more_or_less, num_expected, number, num_found);
}

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_CheckExact(key)) && 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 {
                    /* unexpected keyword found */
                    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 int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (obj == Py_None || PyObject_TypeCheck(obj, type))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
        Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}


static INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
    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_CheckExact(key)) && 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;
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_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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;
    PyErr_NormalizeException(type, value, tb);
    if (PyErr_Occurred())
        goto bad;
    Py_INCREF(*type);
    Py_INCREF(*value);
    Py_INCREF(*tb);
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    /* Make sure tstate is in a consistent state when we XDECREF
    these objects (XDECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
    return 0;
bad:
    Py_XDECREF(*type);
    Py_XDECREF(*value);
    Py_XDECREF(*tb);
    return -1;
}



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 INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
    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);
}

static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
    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);
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!__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;
    module = PyObject_CallFunctionObjArgs(__import__,
        name, global_dict, empty_dict, list, NULL);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
        #if PY_VERSION_HEX < 0x02050000
                 "need more than %d value%s to unpack", (int)index,
        #else
                 "need more than %zd value%s to unpack", index,
        #endif
                 (index == 1) ? "" : "s");
}

static INLINE void __Pyx_RaiseTooManyValuesError(void) {
    PyErr_SetString(PyExc_ValueError, "too many values to unpack");
}

static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
    PyObject *item;
    if (!(item = PyIter_Next(iter))) {
        if (!PyErr_Occurred()) {
            __Pyx_RaiseNeedMoreValuesError(index);
        }
    }
    return item;
}

static int __Pyx_EndUnpack(PyObject *iter) {
    PyObject *item;
    if ((item = PyIter_Next(iter))) {
        Py_DECREF(item);
        __Pyx_RaiseTooManyValuesError();
        return -1;
    }
    else if (!PyErr_Occurred())
        return 0;
    else
        return -1;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    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;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        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;
}

static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();

#if PY_MAJOR_VERSION >= 3
    /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
    if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
        tmp_type = tstate->exc_type;
        tmp_value = tstate->exc_value;
        tmp_tb = tstate->exc_traceback;
        PyErr_NormalizeException(&type, &value, &tb);
        PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
        tstate->exc_type = 0;
        tstate->exc_value = 0;
        tstate->exc_traceback = 0;
        PyException_SetContext(value, tmp_value);
        Py_DECREF(tmp_type);
        Py_XDECREF(tmp_tb);
    }
#endif

    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
    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;
}


static 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 0;
}

static INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
     return *s1 == *s2;
}

static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    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()))
                return (unsigned char)-1;
            if (unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned char");
                return (unsigned char)-1;
            }
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to unsigned char");
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    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()))
                return (unsigned short)-1;
            if (unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned short");
                return (unsigned short)-1;
            }
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to unsigned short");
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    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()))
                return (unsigned int)-1;
            if (unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned int");
                return (unsigned int)-1;
            }
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to unsigned int");
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (unlikely(val == -1 && PyErr_Occurred()))
                return (char)-1;
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to char");
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (unlikely(val == -1 && PyErr_Occurred()))
                return (short)-1;
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to short");
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (unlikely(val == -1 && PyErr_Occurred()))
                return (int)-1;
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to int");
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    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()))
                return (signed char)-1;
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to signed char");
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    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()))
                return (signed short)-1;
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to signed short");
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    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()))
                return (signed int)-1;
            PyErr_SetString(PyExc_OverflowError,
                           "value too large to convert to signed int");
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (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_CheckExact(x) || PyLong_Check(x))) {
        if (unlikely(Py_SIZE(x) < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return PyLong_AsUnsignedLong(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 INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (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_CheckExact(x) || PyLong_Check(x))) {
        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 PyLong_AsUnsignedLongLong(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 INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        return (long)val;
    } else
#endif
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
        return 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 INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
        return 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 INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
        return 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 INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
        return 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) {
    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);
    }
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    long size)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;

    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(class_name);
    #else
    py_name = PyUnicode_FromString(class_name);
    #endif
    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 (((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError, 
            "%s.%s does not appear to be the correct type object",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return 0;
}
#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;

    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(name);
    #else
    py_name = PyUnicode_FromString(name);
    #endif
    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

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(const char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;

    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #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_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    #if PY_MAJOR_VERSION < 3
    empty_string = PyString_FromStringAndSize("", 0);
    #else
    empty_string = PyBytes_FromStringAndSize("", 0);
    #endif
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*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,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) 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 = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_string);
    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->is_identifier)) {
            *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_identifier || (t->is_unicode && t->intern)) {
            *t->p = PyUnicode_InternFromString(t->s);
        } else if (t->is_unicode) {
            *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 INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   if (x == Py_True) return 1;
   else if ((x == Py_False) | (x == Py_None)) return 0;
   else return PyObject_IsTrue(x);
}

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